I have found links for plot the direction field of a differential equation. For example:
How can I plot the direction field for a differential equation?
And:
Plotting the direction field of a differential equation
But when I am teaching differential equations in the spring 2015, these are not the forms I would prefer. I am struggling mightily with the VectorScale options unitlen, aratio, sfun, so much so that I fear my students would not be able to handle these.
The equation I am dealing with is:
$$ \frac{dy}{dt}=e^{-t}-2y$$
If I do the following:
VectorPlot[{1, Exp[-t] - 2 y}, {t, -2, 3}, {y, -1, 2}, Axes -> True]
I get the following image:
Now, the difficulty here is that some of the arrows overlap, some are too small to interpret. I've spent about 4 hours this morning playing with the VectorScale command, trying to understand unitlen, a ratio, and sfun, but minimal success. So far, here is the best image I have come up with. I normalized all the vectors so they had length one, then I set the VectorScale to 0.03.
VectorPlot[Normalize[{1, Exp[-t] - 2*y}], {t, -2, 3}, {y, -1, 2}, VectorScale -> .03, Axes -> True ]
Here is the resulting image:
This is the one I like the best so far, but I am just a beginner. If folks on this site have better suggestions so that I can easily help students who have never used Mathematica before, I'd love to hear them.
VectorPoints
(15), or deal with the slightly off lengths due to theAspectRatio
. $\endgroup$