Ordinary Differential Equations (ODE) Calculator
Solve common first-order differential equations with step-by-step work, initial value problems, slope fields, solution curves, and student-friendly explanations.
Background
A differential equation describes how a quantity changes. Instead of only asking what y is, an ODE often tells you how fast y changes through dy/dx. This calculator helps identify the equation type, solve it, and visualize the behavior.
How to use this ODE Calculator
- Enter a first-order differential equation such as dy/dx = 2y.
- Choose Auto-detect or select the method manually.
- Add an initial condition such as y(0)=1 to find a particular solution.
- Use the graph window settings to control the slope field and solution curve.
- Click Solve & Visualize ODE to see classification, solution, steps, visual behavior, and numerical approximations.
How this calculator works
- The calculator first classifies the differential equation by structure.
- For separable equations, it separates variables and integrates both sides.
- For first-order linear equations, it uses the integrating factor method.
- For exponential and logistic models, it identifies the standard form and solves directly.
- For numerical cases, it uses Euler’s method to approximate the solution from the initial condition.
- The slope field shows the direction of solutions across the coordinate plane.
Formula & Concepts Used
First-order ODE: dy/dx = f(x,y)
Separable form: dy/dx = g(x)h(y)
First-order linear form: dy/dx + P(x)y = Q(x)
Integrating factor: μ(x)=e^{∫P(x)dx}
Exponential model: dy/dx = ky
Logistic model: dy/dx = ry(1-y/K)
Euler’s method: y_{n+1}=y_n+h f(x_n,y_n)
Example Problems & Step-by-Step Solutions
Example 1: Exponential growth
Solve the initial value problem:
dy/dx = 2y, y(0)=1The solution is y = e^{2x}. The slope field shows curves growing faster as y increases.
Example 2: Exponential decay
Solve:
dy/dx = -0.5y, y(0)=10The solution is y = 10e^{-0.5x}. The graph decreases quickly at first, then levels off toward zero.
Example 3: Logistic growth
Solve a population model:
dy/dx = 0.4y(1-y/100), y(0)=10The solution grows quickly at first, then slows as it approaches the carrying capacity K=100.
FAQs
What is an ordinary differential equation?
An ordinary differential equation relates a function to one or more of its derivatives with respect to a single independent variable.
What is a first-order differential equation?
A first-order differential equation contains the first derivative, such as dy/dx, but no higher derivatives like d²y/dx².
What does a slope field show?
A slope field shows the tiny local slopes determined by the differential equation. Solution curves follow those slope directions.
What is an initial value problem?
An initial value problem gives both a differential equation and a starting point, such as y(0)=1, so the calculator can find one specific solution curve.
Does this calculator solve every ODE?
No. This version focuses on common first-order ODEs and numerical approximations. More advanced ODEs, systems, Laplace transforms, and second-order equations can be added later.