| > | with(plots):with(DEtools): |
| > |
| > | r1:= diff(y(x),x)=z(x);r2:= diff(z(x),x)=-.3*y(x)-.02*z(x); |
| > | in1 :=y(0)=1,z(0)=0;in2 :=y(0)=3,z(0)=0; |
| > | dsolve( {r1,r2,in1},{y(x),z(x)}): |
| > | dsolve( {r1,r2,in2},{y(x),z(x)}): |
| > | y1(x) := exp(-1/100*x)*(1/2999*2999^(1/2)*sin(1/100*2999^(1/2)*x)+cos(1/100*2999^(1/2)*x)): |
| > | z1(x) := -30/2999*exp(-1/100*x)*2999^(1/2)*sin(1/100*2999^(1/2)*x): |
| > | y2(x) := exp(-1/100*x)*(3/2999*2999^(1/2)*sin(1/100*2999^(1/2)*x)+3*cos(1/100*2999^(1/2)*x)): |
| > | z2(x) := -90/2999*exp(-1/100*x)*2999^(1/2)*sin(1/100*2999^(1/2)*x): |
| > | with(plots):opts := thickness=1, numpoints=1000, color=blue:
G:=animate( spacecurve, [[y2(x),z2(x), A*x],x=0..A, opts], A=0..300 ): |
| > | opts := thickness=2, numpoints=1000, color=black: |
| > | F:=animate( spacecurve, [[y1(x),z1(x), x*x],x=0..300, opts], A=0..300 ): |
| > | display({F, G},labels=["y","z","x"], axes=boxed, title=`Asymptotic stability`); |
![[Plot]](images/banik4apokus1.mws_5.gif)
| > |
Optimal solution of the given system of differential equation is represented by black trajectory. The disturbed solution (starting with new initial conditions) is represented by blue trajectory. We see, that for increasing time blue trajectory tends to the optimal black trajectory.