Solving a nonlinear system of differential equations in MATLAB or Mathematica

323 Views Asked by At

Is it possible to solve the system $$\dot{W}=A\left(k-\frac{M}{W}\right)$$ $$\dot{M}=B\left(k-\frac{M}{W}\right)$$ with initial conditions $$W(0)=w_0$$ $$M(0)=m_0$$ in MATLAB or Mathematica? If so, how can I get started?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes. In Mathemtica use the function DSolve.

But you can do it by hand. We have $$ \frac{\dot W}{A}=\frac{\dot M}{B}\implies W=\frac{A}{B}(M-m_0)+w_0. $$ Substitution in the second equation yields $$ \dot M=B\Bigl(k-\frac{B\,M}{A(M-m_0)+B\,w_0)}\Bigr). $$ This is a first order ODE in separated variables that can be integrated explicitly.