1
$\begingroup$

This question already has an answer here:

I am new to Mathematica, please help me to handle the following problem:

I have the following system of equations:

\begin{cases} \dot x = 2xy \\ \dot y = 1 - x^2 - y^2 \end{cases}

What I want is to draw the phase portrait in the rectangle $[-4,4]\times[-4,4]$. This looks like the most natural thing one want to do as long as he wants to study phase portraits, since drawing them manually will take a lot of time. Unfortunately I was not able to find Mathematica code and since I am newbie I can not write it myself. I am sure this type of question is relevant for all ODE students, but I was not able to find the answer here.

Can you please help me to draw the phase portrait for this particular system?

$\endgroup$

marked as duplicate by C. E., m_goldberg plotting May 27 '17 at 15:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3
$\begingroup$

I suggest, you study the documentation about StreamPlot.

For your example:

StreamPlot[{2 x*y, 1 - x^2 - y^2}, {x, -4, 4}, {y, -4, 4}]

enter image description here

Explanation:

{2 x*y, 1 - x^2 - y^2}

Is your ode system.

{x, -4, 4}

Is the range for your x-coord. (from -4 to 4)

{y, -4, 4}

vice versa with y.

Perhaps also interesting: LineIntegralConvolutionPlot

Related

Hope this helps.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.