Euler method
yₙ₊₁ = yₙ + h f(xₙ,yₙ)
Euler uses the slope at the beginning of each step. It is first-order, transparent, and useful for learning, but often needs small steps.
Approximate an initial-value problem in the form y′ = f(x,y), y(x₀) = y₀. Choose RK4, improved Euler, or Euler to calculate the value at a target x, inspect solution points, and export the data. Everything runs locally in your browser.
Use ^ for powers. Functions include sin, cos, exp, ln, sqrt, and abs. Trigonometric inputs use radians.
Keyboard shortcut: Ctrl/⌘ + Enter.
This is a numerical approximation, not a symbolic general solution. The estimate compares the selected step count with twice as many steps.
The graph connects the numerical solution points from the initial x to the target x.
The table will show the calculated points. Long results are sampled on screen; the CSV contains every point.
| Step n | xₙ | yₙ | f(xₙ,yₙ) |
|---|---|---|---|
| Calculate to generate the table. | |||
y′=f(x,y) with one condition y(x₀)=y₀.The interval from x₀ to the target x is split into N equal steps. The signed step size is:
h = (x_target − x₀) / N
A target below x₀ produces a negative h, so the same formulas integrate backward. Each method estimates the next y value from slopes supplied by f(x,y).
yₙ₊₁ = yₙ + h f(xₙ,yₙ)
Euler uses the slope at the beginning of each step. It is first-order, transparent, and useful for learning, but often needs small steps.
yₙ₊₁ = yₙ + h(k₁+k₂)/2
Here k₁=f(xₙ,yₙ) and k₂=f(xₙ+h,yₙ+hk₁). Averaging the predicted endpoint slope makes it second-order.
yₙ₊₁ = yₙ + h(k₁+2k₂+2k₃+k₄)/6
RK4 combines one starting slope, two midpoint slopes, and one endpoint slope. It is fourth-order and the recommended general-purpose option here.
The calculator solves the problem once with N steps and again with 2N steps. For the displayed N-step result, it reports 2ᵖ|y₂N−yN|/(2ᵖ−1), where p is 1 for Euler, 2 for Heun, and 4 for RK4. This estimate assumes the solution and numerical method are behaving regularly over the interval. Reduce the step size and check that the answer stabilizes.
For y′=y and y(0)=1, the exact comparison value is y(1)=e≈2.71828. RK4 approaches it rapidly as the step count increases.
For y′=x+y and y(0)=1, the exact solution is y=2eˣ−x−1. At x=1, the value is about 3.43656.
y′=−0.2(y−20) models a value moving toward ambient level 20. With y(0)=90, the numerical curve decays toward 20.
It numerically approximates explicit first-order initial-value problems written as y′=f(x,y) with one initial condition y(x₀)=y₀. It does not directly accept implicit equations, systems, boundary-value problems, or derivatives above first order.
RK4 is the best general-purpose choice here. Improved Euler is useful for learning a second-order method. Euler shows the basic tangent-step idea, but it usually needs more steps for similar accuracy.
No. The displayed value is a numerical approximation using the selected method and step count. The error estimate compares it with a calculation using twice as many steps; it is not a guaranteed bound.
Start with RK4 and 20 to 100 steps for a smooth classroom problem. Then double the count and check whether the digits you need remain stable. Difficult or stiff equations can require a specialized adaptive or implicit solver.
Yes. Enter a target x smaller than the initial x. The calculator automatically uses a negative step size and lists the points in integration order.
The expression may be undefined there, the numerical solution may have grown beyond the supported range, or the chosen step size may be too large. Check the equation's domain and try a shorter interval or more steps.
No. It solves one numerical initial-value problem over one interval. It does not derive a symbolic family containing an arbitrary constant. Use the numerical graph and table only over the interval you entered.
No. Expression parsing, numerical integration, graphing, copying, permalink creation, and CSV generation all run locally in your browser.