Mathematics, Statistics & Geometry

Differential Equation Solver

Solve first-order ordinary differential equations (ODEs) numerically using Euler's method. See step-by-step evaluations of dy/dx with custom intervals.

y(1)
3.187
Method UsedEuler's Method
Calculation StepsDifferential Equation: dy/dx = x + y Initial Value: y(0) = 1 Target X: 1, Step Size: 0.1 Using Euler's Method: y_new = y_old + h * f(x, y) Step 1: y(0.1000) = 1 + 0.1 * 1.0000 = 1.100000 ... Final Step: y(1) ≈ 3.187485

Calculated locally in your browser. Inputs and results are not sent to analytics.

Simulating the Real World

The Differential Equation Solver allows you to approximate the solutions to complex First-Order Ordinary Differential Equations (ODEs) directly in your browser. Using the robust Euler Method, this calculator steps through time to predict future states.

yn+1=yn+hf(xn,yn)\begin{aligned} y_{n+1} = y_n + h \cdot f(x_n, y_n) \end{aligned}

Where:
yn+1y_{n+1}=
The approximated value at the next step
h=
The small increment added to x
f(x,y)=
The slope function (dy/dx)

Quick Example: Solving dy/dx = x + y

If you want to solve the differential equation dy/dx = x + y, starting at (0, 1) with a step size of 0.1:

  1. Initial slope at (0, 1): 0 + 1 = 1.
  2. Move forward by step size: x_new = 0 + 0.1 = 0.1.
  3. Calculate new y: y_new = y + slope × step = 1 + (1 × 0.1) = 1.1.
  4. The approximate value at x = 0.1 is y ≈ 1.1.

How Euler's Method Works

Euler's method is the foundation of all computer simulations. It works on a very simple premise:

  1. Start at your known initial point $(x_0, y_0)$.
  2. Use the differential equation $\frac{dy}{dx}$ to calculate the exact slope at that point.
  3. Move forward a tiny amount (the Step Size, $h$) along that slope to find your new point.
  4. Repeat the process.

Real-World Applications

Differential equations are the language of continuous change. They are used to model:

  • Epidemiology: Predicting the spread of a virus over time (SIR models).
  • Physics: Modeling the trajectory of a pendulum with air resistance.
  • Biology: Calculating population growth in environments with limited resources (Logistic Growth).
  • Finance: Modeling the continuous compounding of interest or Black-Scholes options pricing.

Frequently Asked Questions

It is an equation that relates one or more functions and their derivatives. Essentially, it is an equation that describes a 'rate of change' rather than a static value.

Euler's method is a first-order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It uses tangent lines to approximate the curve.

Many real-world differential equations cannot be solved exactly using analytical algebra. Numerical methods allow computers to approximate the solution curve to a high degree of accuracy.

A smaller step size (e.g., 0.01) makes the approximation much more accurate because it follows the curves more tightly. However, it requires significantly more calculations.

An IVP is a differential equation combined with a known starting point (e.g., at time t=0, population y=100). Euler's method requires an IVP to start iterating.