- #1
steelphantom
- 159
- 0
I just picked up a copy of Mathematica through Penn State, and I'm trying to figure out how to plot a direction field of a differential equation. For example, I have the differential equation [tex]dv/dt = 32 - 8v[/tex]
I've found http://support.wolfram.com/mathematica/graphics/2d/directionfield.html" on Wolfram's site that shows you how to do it, but in the line
kind of confuses me with the arguments that are used. I understand the second two sets of arguments (x and y arguments), but what's up with the first one {1, Last[eqn]}? Where did the 1 and Last come from?
Also, there's another page on Wolfram's site that displays the following as the format for the PlotVectorField function:
What do (xu) and (yu) represent? The rest of it I understand (I think! ). Sorry for all of these questions. I'm definitely a Mathematica n00b and I think it's going to take a little getting used to. Thanks!
I've found http://support.wolfram.com/mathematica/graphics/2d/directionfield.html" on Wolfram's site that shows you how to do it, but in the line
Code:
In[3]:= field=PlotVectorField[{1,Last[eqn]},{x,-2,2},{y[x],-2,2}]
Also, there's another page on Wolfram's site that displays the following as the format for the PlotVectorField function:
Code:
PlotVectorField[f, {x, x0, x1, (xu)}, {y, y0, y1, (yu)}, (options)]
Last edited by a moderator: