Richtungsfelder von  y' = f(x,y)

Programm

Remove["Global`*"];
<< Graphics`PlotField`;
g[f_, ax_, bx_, hy_, ay_, by_, hy_] := 
        PlotVectorField[{1, f[x, y]}, {x, ax, bx, hx}, {y, ay, by, hy}, 
          Epilog -> {Hue[1], Line[{{ax, 0}, {bx, 0}}], 
              Line[{{0, ay}, {0, by}}]}, 
          AspectRatio -> Automatic];
?PlotVectorField

Beispiele

1

f[x_, y_] :=  x  y^3;
ax = -2;   bx = 2;   hx = 0.2;
ay = -2;   by = 2;   hy = 0.2;
g[f, ax, bx, hx, ay, by, hy];

2

f[x_, y_] := x/y;
ax = -2;   bx = 2;   hx = 0.2;
ay = 0.2;   by = 4;   hy = 0.2;
g1 = g[f, ax, bx, hx, ay, by, hy];

f[x_, y_] := x/y;
ax = -2;   bx = 2;   hx = 0.2;
ay = -4;   by = -0.2;   hy = 
      0.2;
g2 = g[f, ax, bx, hx, ay, by, hy];

Show[g1, g2];

3

f[x_, y_] := -x/y;
ax = -2;   bx = 2;   hx = 0.2;
ay = 0.1;   by = 2;   hy = 0.2;
g1 = g[f, ax, bx, hx, ay, by, hy];

ax = -2;   bx = 2;   hx = 0.2;
ay = -2;   by = -0.1;   hy = 
      0.2;
g2 = g[f, ax, bx, hx, ay, by, hy];

Show[g1, g2];

4

f[x_, y_] := Sin[x y];
ax = -2;   bx = 2;   hx = 0.2;
ay = -2;   by = 2;   hy = 0.2;
g1 = g[f, ax, bx, hx, ay, by, hy];

5   eigene Beispiele

Testbereich