Skip to content
FoundationSource checked

Euler Integration

Approximates motion by stepping forward using the current rate of change.

Quick Facts

Compact metadata for implementation and discovery.

Category
Simulation
Difficulty
Beginner
Family
Numerical Integration
Tier
Foundation
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
17
Code example
Not ready
Visualization
Ready
Aliases
Forward Euler

Overview

Euler Integration updates a value by adding the current derivative multiplied by a time step.

Core Concepts

state derivativetime stepexplicit updateintegration errorsimulated statephysical stateintegral approximationiterative update

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(t)

Average

O(t)

Worst

O(t)

Space

O(1)

When to Use

  • Use it for simple simulations, prototypes, and teaching numerical integration.
  • Use it when small time steps make its error acceptable.
  • Use semi-implicit variants for some physical systems when stability is more important.

When Not to Use

  • Avoid it for stiff systems or long simulations where error accumulation dominates.
  • Avoid large time steps that make the update unstable.
  • Avoid it when energy preservation or high accuracy is required.

What It Does

  • Advances state in fixed steps
  • Uses current velocity or derivative

Use Cases

  • Simple physics demos
  • Quick differential equation approximations
  • Teaching numerical integration

Inputs

  • Current state
  • Derivative or velocity
  • Time step

Outputs

  • Next state

Key Formulas (1)

Euler update

statenext = state + dt · derivative(state)
state_next = state + dt * derivative(state)

Advances a state using the derivative at the start of the time step.

Pseudocode

  1. 1.Read the current state
  2. 2.Compute the current derivative
  3. 3.Multiply the derivative by the time step
  4. 4.Add the result to the state
  5. 5.Repeat for each time step

Canonical Example

Input
position = 0, velocity = 2, dt = 0.5
Output
position = 1
Explanation
The update adds velocity * dt, so 0 + 2 * 0.5 = 1.

Implementation Notes

  • Use new_state = state + derivative(state, time) * dt.
  • Keep units consistent across state, derivative, and time step.
  • Compare against a smaller time step to estimate integration error.

Common Pitfalls

  • Using a time step that is too large for the dynamics.
  • Confusing explicit Euler with semi-implicit Euler.
  • Assuming small local error will not accumulate over many steps.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show a moving point advancing with straight step estimates.

Euler Integration mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Read the current state
time-step-motion

Notes

Euler integration is simple and cheap, but its error and stability limits should be visible in tests.

Sources (1)

What each reference supports for this entry.

Numerical Recipes

Book

Numerical methods reference for scalar optimization, interpolation, integration, and practical algorithm tradeoffs.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Semi-implicit Euler modifies the ordering of velocity and position updates.

Alternative toVerlet Integration

Euler and Verlet are simple time integration schemes with different stability behavior.

Tags

SimulationPhysicsNumerical IntegrationIterative