3

I have the equation $$\dot{x}=F(x(t);\mu,\lambda)=\mu x-\lambda x^2+3$$ and I want to use StreamPlot and Manipulate to vary $\lambda$ and $\mu$.

The code for an example how it should look like:

Manipulate[
StreamPlot[{y, -λ - μ x + x^3}, {x, -3, 3}, {y, -3, 3}, 
   StreamScale -> Large, 
   PlotLabel -> Row[{"λ = ", λ, " ,  μ = ", μ}]], 
{λ, -1, 1}, {μ, -1, 1}]
David G. Stork
  • 41,180
  • 3
  • 34
  • 96
Manu
  • 337
  • 2
  • 10

1 Answers1

2

The problem as stated makes little sense. A StreamPlot shows $y$ and $x$. If you let the horizontal axis be $x$ and the vertical be the derivative of $x$, then:

Manipulate[
 StreamPlot[{x, -λ x^2 + μ x + 3}, 
    {x, -3, 3}, {y, -3, 3},
    StreamScale -> Large, 
    PlotLabel -> Row[{"λ = ", λ, " ,  μ = ", μ}]], 
  {λ, -1, 1}, {μ, -1, 1}]
David G. Stork
  • 41,180
  • 3
  • 34
  • 96
  • I tried it with
    `Manipulate[StreamPlot[{y, -λ x^2 + μ x + 3}, {x, -3, 3}, {y, -3, 3},
    StreamScale -> Large, PlotLabel -> Row[{"λ = ", λ, " ,  μ = ", μ}]], 
    {λ, -1, 1}, {μ, -1, 1}]`
    
    

    I want to characterize my equlibrium points with analysing the and direction of the field lines, and this only possible when I use $y$ instead of $x$ in your code... I dont know if this make sense, but I get my fieldlines.

    – Manu Mar 16 '17 at 18:59