Differential equations

Differential Equation Calculator with Steps (ODE Solver)

Enter a first or higher order ordinary differential equation (ODE). Our ODE solver instantly classifies the equation, determines the general solution, builds the mathematical steps, and plots solution families when graph data is available.

D

Use y', y'', ^, and functions like sin

Automatic methods

Linear, separable, exact, constant coefficient, and Cauchy-Euler style equations.

SymPy solver API
Equation preview appears here
Try one

Example equations

6
Syntax

Accepted notation

y', y'', y''' for derivatives.

d2y/dx2 style parsing is planned; prime notation is the cleanest path today.

sin, cos, exp, powers, products, and parentheses work with the current solver.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

How to Use the ODE Solver

Differential equations are often considered the most complex subject in undergraduate mathematics because there is no single "formula" to solve them. You must classify the Ordinary Differential Equation (ODE) by its exact mathematical structure and apply the correct theorem. Using an advanced ODE calculator automates this entire process: our engine classifies the equation and outputs the exact steps for you.

Separable Differential Equations

A first-order ODE in the form dydx=g(x)h(y)\frac{dy}{dx} = g(x)h(y).

  • The Method: The engine algebraically manipulates the equation to isolate all instances of yy and dydy on the left side, and all instances of xx and dxdx on the right side.
  • The Solution: It then integrates both sides independently. The integration constant CC is added to the xx side to form the general solution family.

Stuck on the integration step? Plug your separated variables into our Integral Calculator for a step-by-step breakdown.

First-Order Linear Equations (Integrating Factors)

Equations in the standard form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x).

  • The Method: The engine computes the Integrating Factor, defined as μ(x)=eP(x)dx\mu(x) = e^{\int P(x)dx}.
  • The Magic: By multiplying the entire ODE by this specific factor μ(x)\mu(x), the left side perfectly condenses into the exact derivative of a product: ddx[μ(x)y]\frac{d}{dx}[\mu(x)y].
  • The Solution: The engine integrates both sides and isolates yy algebraically.

Exact Differential Equations

Equations in the form M(x,y)dx+N(x,y)dy=0M(x,y)dx + N(x,y)dy = 0.

  • The Test: The engine first takes the partial derivative of MM with respect to yy, and the partial derivative of NN with respect to xx. If My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}, the equation is exact.
  • The Method: It integrates M(x,y)M(x,y) with respect to xx to find the potential function F(x,y)F(x,y), adding an unknown function g(y)g(y). It then differentiates this result with respect to yy and sets it equal to N(x,y)N(x,y) to solve for g(y)g(y).

Bernoulli Equations

Non-linear equations in the form dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x)y = Q(x)y^n.

  • The Transformation: The engine applies the clever algebraic substitution v=y1nv = y^{1-n}. This brilliantly transforms the impossible non-linear ODE into a standard first-order linear ODE.
  • The Solution: It solves the new linear ODE for vv using an integrating factor, and then back-substitutes y1ny^{1-n} to find the final curve.

Initial Value Problems (IVPs)

A general solution to an ODE contains an unknown constant CC (or multiple constants C1,C2C_1, C_2 for higher-order ODEs), which represents an infinite family of parallel curves. In real-world physics and engineering, you need a single, exact curve.

If you provide initial conditions (e.g., y(0)=5y(0) = 5), our engine will solve the general ODE, plug the initial coordinates into the resulting equation, and solve for the exact numerical value of CC, providing the true Particular Solution.

Exhaustive Step-by-Step Worked Examples

Example 1: Solving a Separable Initial Value Problem (IVP)
Solve: dydx=xy\frac{dy}{dx} = \frac{x}{y} with initial condition y(0)=4y(0) = 4.

  1. Separate the Variables: Multiply both sides by yy and by dxdx to get ydy=xdxy \, dy = x \, dx.
  2. Integrate Both Sides: ydy=xdx\int y \, dy = \int x \, dx.
  3. Compute Integrals: This yields 12y2=12x2+C\frac{1}{2}y^2 = \frac{1}{2}x^2 + C.
  4. General Solution: Multiply by 2: y2=x2+2Cy^2 = x^2 + 2C. Since 2C2C is just an arbitrary constant, we call it C1C_1. So, y2=x2+C1y^2 = x^2 + C_1. Taking the square root gives y=±x2+C1y = \pm\sqrt{x^2 + C_1}.
  5. Apply Initial Condition (IVP): We know that when x=0x = 0, y=4y = 4. Plug these in: 4=02+C1    4=C14 = \sqrt{0^2 + C_1} \implies 4 = \sqrt{C_1}. Squaring both sides gives C1=16C_1 = 16.
  6. Final Particular Solution: y=x2+16y = \sqrt{x^2 + 16}.
What is the difference between an ODE and a PDE?

An Ordinary Differential Equation (ODE) contains derivatives with respect to only a single independent variable (usually xx or tt). A Partial Differential Equation (PDE) involves multiple independent variables and partial derivatives. Our calculator specifically solves Ordinary Differential Equations.

Why does my solution have a C in it?

The CC represents an arbitrary constant of integration. Because taking the derivative of any constant yields zero, there are infinitely many valid "original functions" that satisfy a differential equation. This is called the "General Solution." To find a specific curve, you must provide Initial Value Problem (IVP) coordinates.

Does the solver support second-order differential equations?

Yes! The engine supports solving homogeneous and non-homogeneous linear second-order differential equations with constant coefficients (e.g., y3y+2y=exy'' - 3y' + 2y = e^x).

What is an Initial Value Problem (IVP)?

An Initial Value Problem (IVP) is a differential equation paired with a specific starting coordinate, such as y(0)=5y(0) = 5. Because a standard differential equation outputs a "General Solution" with an unknown constant CC, providing this initial coordinate allows the solver to calculate the exact numerical value of CC and return a single, exact "Particular Solution."

What does 'separable' mean in differential equations?

A separable ODE is one of the easiest forms to solve. It means you can algebraically manipulate the equation to get all of the yy variables and dydy on one side of the equals sign, and all of the xx variables and dxdx on the other side. Once separated, you simply integrate both sides independently.

How does the calculator use integrating factors?

For first-order linear ODEs, the calculator automatically computes a special expression called an Integrating Factor, defined as eP(x)dxe^{\int P(x)dx}. By multiplying the entire equation by this factor, the left side brilliantly condenses into the exact derivative of a product, allowing the engine to integrate it easily.

Can it solve exact differential equations?

Yes! The mathematical engine checks if the equation is "exact" by verifying if the cross-partial derivatives are equal (My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}). If they match, the engine knows it can integrate the components to reconstruct the underlying multidimensional potential function F(x,y)F(x,y).

What is a Bernoulli differential equation?

A Bernoulli equation is a specific type of non-linear differential equation. While non-linear equations are notoriously difficult to solve, the calculator recognizes the Bernoulli structure and applies a clever substitution trick (v=y1nv = y^{1-n}). This transforms the impossible non-linear equation into a standard, solvable linear equation.

Why are differential equations so important in real life?

Differential equations are the fundamental language of physics, engineering, and economics! Because derivatives represent "rates of change," differential equations are used to model any system that changes over time—such as population growth, radioactive decay, heat transfer, planetary orbits, and financial markets.

How do I format y' or dy/dx in the calculator?

The engine is highly flexible. You can use standard prime notation by typing y' for the first derivative and y'' for the second derivative. Alternatively, you can use explicit Leibniz notation like dy/dx. Just ensure your dependent and independent variables match what you've selected in the settings.