Modelowanie matematyczne, ostatnie laboratoria : (

sol=Solve[{μ(1-(x^2))v-x==0,v==0},{x,v}][[1]]

{v,x}/.sol
ReplaceAll[{v,x},sol]

D[{μ(1-(x^2))v-x,v},{{v,x}}]

Eigenvalues[{{(1-(x^2)) μ,-1-2 v x μ},{1,0}}]
Eigenvectors[{{(1-(x^2)) μ,-1-2 v x μ},{1,0}}]
Eigensystem[{{(1-(x^2)) μ,-1-2 v x μ},{1,0}}]

{(1/2) (μ-(x^2) μ-(Sqrt[-4-8 v x μ+(μ^2)-2 (x^2) (μ^2)+(x^4) (μ^2)])),(1/2) (μ-(x^2) μ+(Sqrt[-4-8 v x μ+(μ^2)-2 (x^2) (μ^2)+(x^4) (μ^2)]))}//FullSimplify

{(1/2) (μ-(x^2) μ-(Sqrt[-4-8 v x μ+(((-1+(x^2)))^2) (μ^2)])),(1/2) (μ-(x^2) μ+(Sqrt[-4-8 v x μ+(((-1+(x^2)))^2) (μ^2)]))}/.sol

Plot[Re/@{(1/2) (μ-(Sqrt[-4+(μ^2)])),(1/2) (μ+(Sqrt[-4+(μ^2)]))},{μ,0,5}]

Manipulate[StreamPlot[{μ(1-(x^2))v-x,v},{v,-4,4},{x,-4,4}],{{μ,2},0,5}]

Plot[Evaluate[{v[t],x[t]}/.NDSolve[{v'[t]==2(1-((x[t])^2))v[t]-x[t],x'[t]==v[t],v[0]==1,x[0]==1},{v,x},{t,0,20}]],{t,0,20}]

ParametricPlot[Evaluate[{v[t],x[t]}/.NDSolve[{v'[t]==2(1-((x[t])^2))v[t]-x[t],x'[t]==v[t],v[0]==1,x[0]==1},{v,x},{t,0,20}]],{t,0,20}]

Manipulate[Show[StreamPlot[{μ(1-(x^2))v-x,v},{v,-4,4},{x,-4,4},PlotTheme->"Scientific"],ParametricPlot[Evaluate[{v[t],x[t]}/.NDSolve[{v'[t]==μ(1-((x[t])^2))v[t]-x[t],x'[t]==v[t],v[0]==u[[1]],x[0]==u[[2]]},{v,x},{t,0,100}]],{t,0,s},PlotStyle->Directive[Thick,Black],PlotTheme->"Scientific"]],{{μ,2},0,5},{{s,5},{2,5,10,15,20}},{u,{-4,-4},{4,4}},ControlType->{Automatic,Automatic,Slider2D},ControlPlacement->Left]