Online Tool Store Online Tool Store

Differential Equation Solver

Solve first-order and second-order differential equations numerically with RK4, a live chart, a step-by-step value table, and CSV export.

This works right here on your device — nothing gets sent out.

Supports + − × ÷ ^, parentheses, sin, cos, tan, sqrt, exp, ln, abs, and the constants pi and e. Use x and y.

How Differential Equation Solver works

  1. Pick 1st order (dy/dx = f(x, y)) or 2nd order (y'' = f(x, y, y')), or load a preset to see a worked example.
  2. Type the right-hand side of the equation, then set the starting point (x₀, y and, for 2nd order, y') and how far to solve along x.
  3. The solver steps forward using the fourth-order Runge-Kutta (RK4) method and plots y(x) — and y'(x) in 2nd-order mode — on the chart.
  4. Scroll the step table to see the value at every computed point, or download the full table as a CSV.

The method

RK4 estimates each step by sampling the equation's slope at four points across the interval and combining them with a weighted average, which is far more accurate per step than simply following the slope at the start of the interval (Euler's method). For a step size h:

y(x + h) ≈ y(x) + h/6 · (k₁ + 2k₂ + 2k₃ + k₄)

where k₁ through k₄ are the slope estimates at the start, two midpoints, and the end of the interval. 2nd-order equations are solved the same way by treating y' as a second unknown alongside y.

FAQ

Does this give an exact formula, or a numeric answer?

It's numeric, not symbolic — it uses the classic fourth-order Runge-Kutta (RK4) method to step the solution forward from your starting point, the same technique taught in any numerical methods course. For equations with a known closed-form solution (like exponential growth or a simple oscillator), RK4's result matches the exact formula to about 8-10 significant figures at the step counts used here.

What equations can I type in?

Any combination of + − × ÷ ^, parentheses, sin, cos, tan, sqrt, exp, ln, log, abs, and the constants pi and e, using x and y (and v for y' in 2nd-order mode). For example: 0.3*y*(1-y/10), or sin(x)-y.

What's the difference between 1st order and 2nd order mode?

1st order solves dy/dx = f(x, y) from a single starting point (x0, y0) — growth, decay, and similar rate equations. 2nd order solves y'' = f(x, y, y') from a starting position and starting velocity (x0, y0, y'(x0)) — oscillators, springs, and anything with acceleration.

Why did it say the solution diverges?

Some equations grow without bound in finite (or near-finite) x — the numbers overflow before reaching the end of your chosen x range. Try a shorter range, a different starting value, or fewer steps.

Does anything I type get sent anywhere?

No. The equation is parsed and solved entirely in your browser — nothing is uploaded.

How we compare

FeatureOnline Tool StoreSymbolabMathDF
Free-form f(x, y) input, not limited to named equation formsIncludedLimited to recognized patternsLimited to recognized patterns
2nd-order (oscillator/spring) equationsIncludedIncludedIncluded
Runs fully in your browser, nothing uploadedIncludedServer-side solvingServer-side solving
Chart of the solution as it solvesIncludedIncludedIncluded
Step-by-step numeric value table with CSV exportIncludedNot includedValues table, no export
Symbolic step-by-step algebra (CAS)Not includedIncludedIncluded

Choose Symbolab or MathDF when you need the symbolic algebra steps for a textbook-style closed-form answer. Choose Differential Equation Solver when you want a fast numeric solution and chart for any equation you can type — including ones without a tidy closed form — with the full step table exportable as CSV.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.