Skip to main content
added 169 characters in body
Source Link
ybeltukov
  • 44.2k
  • 5
  • 112
  • 220

I think you use StreamPlot incorrectly. Let you have a differential equation

x''[t] == f[x[t],x'[t]] 

In your particular case

f[x_,v_] := 1; 

StreamPlot plots streams based on the vector field. In our case

StreamPlot[{dx,dv},{x,-2,2},{-2,2}] 

Here dx and dv is the time derivatives of x and v respectively. By definition dx=v and dv=f[x,v]. Therefore, the command must be

StreamPlot[{v, f[x,v]}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

Another example: phase diagram of a pendulum

f[x_, v_] := -Sin[x]; StreamPlot[{v, f[x, v]}, {x, -5, 5}, {v, -3, 3}] 

enter image description here

I think you use StreamPlot incorrectly. Let you have a differential equation

x''[t] == f[x[t],x'[t]] 

In your particular case

f[x_,v_] := 1; 

StreamPlot plots streams based on the vector field. In our case

StreamPlot[{dx,dv},{x,-2,2},{-2,2}] 

Here dx and dv is the time derivatives of x and v respectively. By definition dx=v and dv=f[x,v]. Therefore, the command must be

StreamPlot[{v, f[x,v]}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

I think you use StreamPlot incorrectly. Let you have a differential equation

x''[t] == f[x[t],x'[t]] 

In your particular case

f[x_,v_] := 1; 

StreamPlot plots streams based on the vector field. In our case

StreamPlot[{dx,dv},{x,-2,2},{-2,2}] 

Here dx and dv is the time derivatives of x and v respectively. By definition dx=v and dv=f[x,v]. Therefore, the command must be

StreamPlot[{v, f[x,v]}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

Another example: phase diagram of a pendulum

f[x_, v_] := -Sin[x]; StreamPlot[{v, f[x, v]}, {x, -5, 5}, {v, -3, 3}] 

enter image description here

added 228 characters in body
Source Link
ybeltukov
  • 44.2k
  • 5
  • 112
  • 220

I think you use StreamPlot incorrectly. Try thisLet you have a differential equation

x''[t] == f[x[t],x'[t]] 

In your particular case

f[x_,v_] := 1; 

StreamPlot plots streams based on the vector field. In our case

StreamPlot[{vdx, 1dv}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

or this Here dx and dv is the time derivatives of x and v respectively. By definition dx=v and dv=f[x,v]. Therefore, the command must be

StreamPlot[{xv, vf[x,v]}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

I don't know what you really wants.enter image description here

I think you use StreamPlot incorrectly. Try this

StreamPlot[{v, 1}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

or this

StreamPlot[{x, v}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

I don't know what you really wants.

I think you use StreamPlot incorrectly. Let you have a differential equation

x''[t] == f[x[t],x'[t]] 

In your particular case

f[x_,v_] := 1; 

StreamPlot plots streams based on the vector field. In our case

StreamPlot[{dx,dv},{x,-2,2},{-2,2}] 

Here dx and dv is the time derivatives of x and v respectively. By definition dx=v and dv=f[x,v]. Therefore, the command must be

StreamPlot[{v, f[x,v]}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

Source Link
ybeltukov
  • 44.2k
  • 5
  • 112
  • 220

I think you use StreamPlot incorrectly. Try this

StreamPlot[{v, 1}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

or this

StreamPlot[{x, v}, {x, -2, 2}, {v, -2, 2}] 

enter image description here

I don't know what you really wants.