4

The toolkits dfield and pplane are staples in ODE courses. First in MATLAB, now in Java. Do they have a Mathematica expression?

Sample outputs follow:

pplane dfield


@Michael E2

Your suggestions were great. Here are the results.

EquationTrekker:

trekker

Nice example by @David Slater in Plotting a Phase Portrait


Phase portraits

@Chris Degnen: Phase Portrait Trajectories

@chris: Plotting a Phase Portrait

@Kuba♦, @Jens: Phase portrait on a cylinder

@Alexei Boulbitch: How to make program for phase portrait?

@yarchik: Cleaner Approach to Plotting Multiple Solution Curves on Phase Portrait

@Artes, @Sektor, @Michael E2: Phase portraits and StreamPlot

@Rahul: Why isn't my Stream code plotting multiple solution curves?

@ubpdqn: Posted to this question


Direction Field

@Jens: Plotting the direction field of a differential equation

@Jens: Graphics Grid Direction Field Animations as GIF

@Dr. belisarius, @Wesley Wolfe: How can I plot the direction field for a differential equation?

@Kuba♦: How to plot a vector field on a geographic map?

dantopa
  • 1,060
  • 5
  • 10
  • 7
    Have you seen EquationTrekker or search this site for phase portrait or direction field? – Michael E2 Apr 07 '17 at 02:41
  • @Michael E2: Had not seen EquationTrekker; will tinker with it immediately. Had not searched with those keywords. Found many promising links. Thanks, very helpful insights. My hope is to find a package and avoid writing code. Many homework problems are written around the functionality of pplane and dfield, so a close match is desirable. – dantopa Apr 07 '17 at 02:53
  • @ Michael E2: Please consider promoting your comment to an answer; it deserves a vote. – dantopa Apr 07 '17 at 04:20
  • @Michael E2: Should the post be deleted, or should the search result be summarized and appended to the OP? – dantopa Apr 07 '17 at 05:22
  • 1
    I'm a bit involved in a family situation and don't have the time to consider answering. If a good duplicate or two can be found, it might be better to "close" it as a duplicate. The advantage is that others searching for an equivalent to dfield or pplane would likely find this question and the linked solutions. – Michael E2 Apr 07 '17 at 10:17
  • 1
    @Michael E2: Thanks for the idea. Here is a hasty collection, not a curation. Your further insights are welcome. Readers: Please remember to upvote these clever solutions. – dantopa Apr 20 '17 at 23:45

1 Answers1

5

There are a lot of resources on this site (as suggested in the comments and likely to make the question reasonably deemed a duplicate). You can do a lot yourself, e.g.:

sp = StreamPlot[{2 x - y + 3 (x^2 - y^2) + 2 x y, 
    x - 3 y - 3 (x^2 - y^2) + 3 x  y}, {x, -2, 4}, {y, -4, 2}];
cp = {x, y} /. 
   NSolve[{2 x - y + 3 (x^2 - y^2) + 2 x y, 
      x - 3 y - 3 (x^2 - y^2) + 3 x  y} == {0, 0}, {x, y}
    ];
sn = ParametricNDSolve[{{x'[t], 
      y'[t]} == {2 x[t] - y[t] + 3 (x[t]^2 - y[t]^2) + 2 x[t] y[t], 
      x[t] - 3 y[t] - 3 (x[t]^2 - y[t]^2) + 3 x[t]  y[t]}, {x[0], 
      y[0]} == {a, b}}, {x, y}, {t, 0, 1}, {a, b}];
Manipulate[
 Show[sp, ParametricPlot[{x[a, b][t], y[a, b][t]} /. sn, {t, 0, 1}, 
   PlotStyle -> Red], 
  Epilog -> {PointSize[0.02], Black, Point[{a, b}], Green, Point[cp]},
   PlotLabel -> 
   Column[Thread[{x', y'} == {2 x - y + 3 (x^2 - y^2) + 2 x y, 
       x - 3 y - 3 (x^2 - y^2) + 3 x  y}]]], {a, 0, 2}, {b, 0, 2}]

enter image description here

ubpdqn
  • 60,617
  • 3
  • 59
  • 148