Solution of a system of ordinary differential equations

89 Views Asked by At

I have the following system: $$dx/dt=y ;$$

$$dy/dt=x+yz ;$$

$$dz/dt=x+y^2+xz.$$ I work on this system that it has no first integral and invariant algebraic surface. So I want to solve it by numerical methods. Can I solve it by Runge-Kutta method? How can I choose the initial point?

1

There are 1 best solutions below

0
On

Yes, you can solve this system using the Runge-Kutta Method, but this problem has singularities that you have to watch out for.

Here is the solution using Mathematica's built in numerical solver.

  system = {x'[t] == y[t], y'[t] == x[t] + y[t]*z[t],z'[t] == x[t] + y[t]^2 + x[t]*z[t], x[0] == 1, z[0] == 1, y[0] == 1}

  NDSolve[system, {x[t], y[t], z[t]}, {t, 0, 0.5}]

  Plot[Evaluate[{x[t], y[t], z[t]} /. First[%]], {t, 0, 1/2}]

enter image description here

Here it is using Runge-Kutta

  mma = NDSolve[system, {x[t], y[t], z[t]}, {t, 0, 0.5}, Method -> "ExplicitRungeKutta", "StartingStepSize" -> 1/5]

  Plot[{{x[t], y[t], z[t]} /. mma}, {t, 0, 0.5}]

enter image description here

In both cases, I just selected a random IC of $(x(0), y(0), z(0)) = (1,1,1)$, but I'd certainly play around with different values.