I need to construct a direction field plot for a differential equation and I have this code(adsbygoogle = window.adsbygoogle || []).push({});

Needs["Graphics`PlotField`"];

PlotDirectionField[ff_, {x_, a_, b_}, {y_, c_, d_}] := Module[{f}, f = \

Compile[{x, y}, ff]; PlotVectorField[{190, f[x, y]}, {x, a, b}, {y, c,

d}, ScaleFunction -> (1 &), Axes -> True, Ticks -> None, Frame -> True,

AspectRatio -> 1] ];

and after that I plot the field entering the following code

PlotDirectionField[f[x,y], {x,a,b}, {y,c,d}]

where f[x,y] is the right hand side of my equation.

My problem is that I need to show field for x in quite big interval (from 0 to 30 - a=0,b=30) and I know that the solution curve behaves differently between 0 and 1 than what the field shows. How can I make the plot so that on the x axis I have intervals of, let's say, 0.1 instead of 1 all the way between 0 and 30?

Thanks for help!

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica help needed, please (very simple?)

**Physics Forums | Science Articles, Homework Help, Discussion**