Phase portrait of $y_2 = y_{20}*exp(\lambda*t)$ $y_1 = y_{10}*exp(\lambda*t)+ y_{20}*t*exp(\lambda*t)$

162 Views Asked by At

$y_2 = y_{20}*exp(\lambda*t)$

$y_1 = y_{10}*exp(\lambda*t)+ y_{20}*t*exp(\lambda*t)$

I am struggling to reproduce the diagram corresponding to the equations above.

I have tried to code it in matlab but am unable to do so successfully. Can someone please explain where my code is wrong

enter image description here

thank you

1

There are 1 best solutions below

3
On

You weren't very far from your objective. You hadn't "nice looking" results because you chose $\lambda >0$ giving divergent curves instead of convergent curves (converging to $0$).

Here is a convenient code :

clear all;close all;hold on;
L=-1;% lambda
t=0:0.1:5;
a=-1;
for b=0:0.2:2 
    plot(a,b,'ob');
    plot((a+b*t).*exp(L*t),b.*exp(L*t),'b');
end;
a=1;
for b=-2:0.2:0 
    plot(a,b,'or');
    plot((a+b*t).*exp(L*t),b.*exp(L*t),'r');
end;

giving the following figure :

enter image description here

The two families of curves have initial points (a,b) represented by little round shapes, with either $a=-1$ or $a=1$.

Reminder : we are in a case where

$$\binom{x}{y}=\exp(tA)\binom{a}{b}$$

with $$A:=\begin{pmatrix}L&1\\0&L\end{pmatrix} \ \ \implies \ \ \exp(tA)=\begin{pmatrix}\exp(Lt)&t \exp(Lt)\\0&\exp(Lt)\end{pmatrix}$$