I need to plot a graph of system differential equation in Matlab. I am new in this program. $$ \begin{cases} \dot x=2*x+y \\ \dot y=2*(x^2-1)*x \end{cases}$$
This system in nonlinear and functions in Matlab as "quiver" don't help me and there are three equilibrium points. There are one focus and two saddles. I didn't find any useful information in the internet. Thanks for the help. Sorry for my English!
Here is a Matlab program that does the job :
with the result displayed on the figure.
How can we check the obtained curves ? For example, on the curves situated on the right, one sees that the slope is negative, resp. positive for values of $x$ that are $<1$, resp. $>1$. This is easily explainable with the sign of the following expression
$$\dfrac{dy}{dx}=\dfrac{dy:dt}{dx/dt}=\dfrac{\dot y}{\dot x}=\frac{2(x^2-1)x}{2x+y}$$
The $(x^2-1)$ factor being "entirely responsible" for the change of sign in the area $x>0$ and $y>0$. But a complementary fact brings new light : the change of sign at the boundary given by the transition
If one day, you want to visualize the phase portrait, for example of $x$, i.e. work with generalized coordinates $(x,\dot x)$, plainly
replace (10 th line) "plot V(:,1),V(:,2)" by "plot V(:,1),2*V(:,1)+V(:,2)" (by reference to equation $\dot x=2x+y$)
replace V0=[0;k] (8 th line) for example by V0=0.2*(rand(2,1)-0.1.