Differential equation: slope field and Euler's method
Write the right-hand side of y′ = f(x, y): the grapher draws the slope field, the solutions through the chosen points and, if you wish, the Euler polygon with the table of the first values.
Export:
Axes and grid
Window x … y …
Tick spacing on x on y
Grid Subdivisions
1 unit on x = 1 unit on y =
For an exact size on paper, print at 100% (no “fit to page”); the SVG and TikZ keep this scale too, and the PNG is saved at 300 dpi.
How to do it
- Type the right-hand side: y (exponential solutions), x − y, 0.5y(1 − y) (logistic)…
- Enter the initial conditions: (0 ; 1) ; (0 ; −1)…
- Tick Euler's method and choose the step h: the polygon and the table of values appear.
- Compare with the exact solution plotted in the list of functions (here e^x).
Tips
- At each point (x ; y), the small segment has slope f(x, y): solutions are tangent to the field.
- The smaller the step h, the closer Euler's method is to the exact solution.
- Parameters (a, k…) in the equation follow the grapher's sliders.
Frequently asked questions
What is Euler's method?
Start from (x₀ ; y₀) and move in steps h: yₖ₊₁ = yₖ + h·f(xₖ, yₖ). It approximates the curve by its tangent on each small interval.
How are the solutions drawn?
With the fourth-order Runge-Kutta method, much more accurate than Euler, in both directions from the given point.
Is my data uploaded?
No, everything is computed in your browser.