# Drawing Direction Fields Online

I am looking for a convenient and free online tool for plotting Direction Fields and Solution Curves of Ordinary Differential Equations. I tried the "Slope Field Plotter" on Geogebra; it worked tolerably well with direction fields, but for solution curves, some funny thing happens like this: My Questions:

1. Why does the solution curve appear to be very different from circles?
2. Is there any alternative online free resources that will do a better job on this?

Edit:

I would love to use WolframaAlpha for this, if it works. Any suggestions on this?

• The curves for the solution are scripted. GeoGebra does it well, but it doesn't draw the solutions directly, it needs commands on how to do it. I can link a good GeoGebra sheet for ODE's. I'll do later... Mar 18 '17 at 12:37
• Thanks for the comment! May I know what you mean by "scripted"? Mar 18 '17 at 12:38
• Sorry, better said "you need a lot of construction steps". :) Mar 18 '17 at 12:42
• Thanks @RafaBudría! I found it works well with other equations such as $y'=y^2+xy$; not sure why it does not do $y'=-x/y$ well. Mar 18 '17 at 12:46
• I am checking that particular slope field. Mar 18 '17 at 12:50

Take a look at this tool:

https://www.bluffton.edu/homepages/facstaff/nesterd/java/slopefields.html

Found it from the Wikipedia slope field page.

You can use the command streamplot in wolframalpha like this:

streamplot[{1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}]

where in the example above

$\dot{x}=1-x^2+y$ and $\dot{y}=1+x-y^2$

and the plot range is $x,y \in [-3,3]$

• Thanks for the answer! How to put in equation like $y'=-x/y$? Using streamplot[{1,-x/y},{x,-3,3},{y,-3,3}]? Mar 18 '17 at 17:31
• Is $y$ a function of $x$, i.e. $y=y(x)$? If so, then your system is 1-dimensional. Or is your system 2-dimensional with $x=x(t), y=y(t)$ and $\dot{x}=?, \dot{y}=-x/y$?
– rpa
Mar 18 '17 at 18:15
• It is one dimensional; that is, $y$ is a function of $x$. Mar 18 '17 at 18:27
• In that case, then your vector field will be on the real line, not on a plane. You could use streamplot[{0,-x/y},{x,-3,3},{y,-3,3}] to visualize it, where every vertical line will give you the vector field for a given constant $x$. Alternatively, you can solve the ODE directly and plot the solutions for different initial conditions $y_0$ vs $t$ as in the last plot here: WolframAlpha solve y'=-x/t
– rpa
Mar 19 '17 at 3:14