Numerical phase plane?

229 Views Asked by At

In my Differential Dynamical Systems text book, I came across the following question:

Sketch the local behavior you obtained in the phase plane and compare with a numerical phase plane plotter that shows the global solutions.

and here, what is the "numerical phase plane plotter"? I solved the system and sketched the phase plane but still don't get what it is.

the system I solved is this:

$x'=y$

$y'=x-x^3-ay$

since $a$ is an arbitrary constant, I had to plot 3 different phase planes such that $a>0$, $a=0$, $a<0$. if you don't mind please show me how to plot the numerical thing at least $a=0$ case.

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

Solve the differential equation $$ \frac{d}{dt}\left[ \begin{array}{c}x \\ y\end{array} \right] = \left[ \begin{array}{c} y \\ x - x^3 - ay \end{array} \right] $$ numerically with different initial conditions $x_0$ and for a fixed $a$ and superpose the plots. In Octave syntax this would be sth like

x0 = rand(2,10);
tf = 1;
figure(1)
hold on
for k = 1 : length(x0)
    [t,sol] = ode45(@f,[0 tf],x0(:,i));
    plot(sol(:,1),sol(:,2))
end
hold off

where $f$ denotes the rhs of the ode saved in a separate file.