0
$\begingroup$

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:

enter image description here

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?

$\endgroup$
9
  • $\begingroup$ 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... $\endgroup$ Mar 18 '17 at 12:37
  • $\begingroup$ Thanks for the comment! May I know what you mean by "scripted"? $\endgroup$
    – Zuriel
    Mar 18 '17 at 12:38
  • $\begingroup$ Sorry, better said "you need a lot of construction steps". :) $\endgroup$ Mar 18 '17 at 12:42
  • $\begingroup$ 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. $\endgroup$
    – Zuriel
    Mar 18 '17 at 12:46
  • $\begingroup$ I am checking that particular slope field. $\endgroup$ Mar 18 '17 at 12:50
1
$\begingroup$

Take a look at this tool:

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

Found it from the Wikipedia slope field page.

$\endgroup$
0
$\begingroup$

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]$

$\endgroup$
4
  • $\begingroup$ Thanks for the answer! How to put in equation like $y'=-x/y$? Using streamplot[{1,-x/y},{x,-3,3},{y,-3,3}]? $\endgroup$
    – Zuriel
    Mar 18 '17 at 17:31
  • $\begingroup$ 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$? $\endgroup$
    – rpa
    Mar 18 '17 at 18:15
  • $\begingroup$ It is one dimensional; that is, $y$ is a function of $x$. $\endgroup$
    – Zuriel
    Mar 18 '17 at 18:27
  • $\begingroup$ 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 $\endgroup$
    – rpa
    Mar 19 '17 at 3:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.