Skip to content
/ Differential equation

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

How to do it

  1. Type the right-hand side: y (exponential solutions), x − y, 0.5y(1 − y) (logistic)…
  2. Enter the initial conditions: (0 ; 1) ; (0 ; −1)…
  3. Tick Euler's method and choose the step h: the polygon and the table of values appear.
  4. 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.