Skip to main content

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.

Solve a first-order ODE

Equation setup

Version 1 focuses on common first-order ODEs: separable equations, linear equations, exponential growth/decay, logistic growth, and Euler’s method.

Enter the differential equation

Supported examples include dy/dx = 2y, dy/dx = x y, dy/dx + 2y = 6, and dy/dx = 0.5y(1-y/100).

Supported formats

dy/dx = 2y dy/dx = -0.5y dy/dx = xy dy/dx + 2y = 6 dy/dx = 0.4y(1-y/100) dy/dx = x + y
  • Use first-order formats such as dy/dx = f(x,y).
  • Use multiplication like x*y or 2y.
  • Use parentheses when needed.
  • This version does not yet support higher-order ODEs or systems of ODEs.

Initial condition

Add an initial condition to find a particular solution and draw the solution curve.

Graph window and numerical settings

Options

Result

Copied!

No result yet. Enter a first-order differential equation, then click Solve & Visualize ODE.

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)=1

The 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)=10

The 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)=10

The 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.

All Calculators & ConvertersAll calculators