Differential Equation Calculator
CalculusFreeNo sign-up
Type an ODE such as y′′ + 3y′ + 2y = eˣ. The characteristic equation \(r^{2} + 3r + 2 = 0\) has roots −1 and −2, so \(y = C_{1}e^{-x} + C_{2}e^{-2x} + \frac{e^{x}}{6}\). Add initial conditions to get the one particular solution, and every answer is checked by substitution.
Write derivatives as y’, y”, y”’ or dy/dx. Use x (or t) as the variable.
One condition per order of the equation.
Several solutions from the general solution.
| Type | Linear, constant coefficients, order 2 (non-homogeneous) |
| Characteristic equation | \(r^{2} + 3r + 2 = 0\) |
| Roots | \(r = -1,\ r = -2\) |
| Particular solution | \(y_{p} = \frac{e^{x}}{6}\) |
| Check | Substituting y back into the equation gives 0 = 0 ✓ |
Show steps
- This is a linear equation with constant coefficients of order 2: \(y^{\prime\prime} + 3 y^{\prime} + 2 y = e^{x}\)
- Characteristic equation (replace \(y^{(k)}\) by \(r^{k}\)): \(r^{2} + 3r + 2 = 0\)
- Roots: \(r = -1,\quad r = -2\)
- Homogeneous solution: \(y_{h} = C_{1} e^{-x} + C_{2} e^{-2x}\)
- Find a particular solution yₚ for the right side \(g(x) = e^{x}\) (undetermined coefficients, checked with the Laplace transform): \(y_{p} = \frac{e^{x}}{6}\)
How to use the differential equation calculator
- Type the equation with y′ written as y’ (and y′′ as y”), or use dy/dx.
- Add initial conditions like y(0) = 1, y'(0) = 0 to solve an initial value problem, or leave them blank for the general solution.
- Press Solve. The method, each step, a check by substitution and a graph appear below.
Supported exactly: separable and linear first-order equations, and linear equations of any order up to 4 with constant coefficients whose right side is built from polynomials, exponentials, sines and cosines. Other first-order equations with an initial condition are solved numerically.
Linear equations with constant coefficients
For \(ay^{\prime\prime} + by^{\prime} + cy = g(x)\):
- Solve the characteristic equation \(ar^{2} + br + c = 0\).
- Build the homogeneous solution \(y_{h}\) from the roots (table below).
- Find a particular solution \(y_{p}\) for g(x) by undetermined coefficients.
- General solution: \(y = y_{h} + y_{p}\). Use initial conditions to find the constants.
| Roots | Homogeneous solution |
|---|---|
| Real, different: \(r_{1}, r_{2}\) | \(C_{1}e^{r_{1}x} + C_{2}e^{r_{2}x}\) |
| Repeated: \(r\) | \((C_{1} + C_{2}x)e^{rx}\) |
| Complex: \(\alpha \pm \beta i\) | \(e^{\alpha x}(C_{1}\cos\beta x + C_{2}\sin\beta x)\) |
First-order equations
Separable: \(\frac{dy}{dx} = g(x)h(y)\). Separate and integrate: \(\int \frac{dy}{h(y)} = \int g(x)\,dx + C\). Example: \(\frac{dy}{dx} = xy\) gives \(\ln|y| = \frac{x^{2}}{2} + C\), so \(y = Ce^{x^{2}/2}\).
Linear: \(\frac{dy}{dx} + P(x)y = Q(x)\). Multiply by the integrating factor \(\mu = e^{\int P\,dx}\): \((\mu y)^{\prime} = \mu Q\), so \(y = \frac{1}{\mu}\left(\int \mu Q\,dx + C\right)\). Example: \(y^{\prime} + 2y = 4x\) gives \(y = 2x – 1 + Ce^{-2x}\).
Worked example: initial value problem
\(y^{\prime\prime} + 3y^{\prime} + 2y = e^{x}\), \(y(0) = 1\), \(y^{\prime}(0) = 0\). The general solution is \(C_{1}e^{-x} + C_{2}e^{-2x} + \frac{e^{x}}{6}\). The conditions give \(C_{1} + C_{2} + \frac{1}{6} = 1\) and \(-C_{1} – 2C_{2} + \frac{1}{6} = 0\), so \(C_{1} = \frac{3}{2}\) and \(C_{2} = -\frac{2}{3}\):
\(y = \frac{3}{2}e^{-x} – \frac{2}{3}e^{-2x} + \frac{1}{6}e^{x}\)
Resonance and repeated terms
If g(x) already solves the homogeneous equation, the usual guess fails and must be multiplied by x. For \(y^{\prime\prime} + y = \sin x\), the particular solution is \(y_{p} = -\frac{x\cos x}{2}\), whose amplitude grows: this is resonance.
Differential equations practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Quiz complete
Frequently asked questions
What types of differential equations can this solve?
Separable and linear first-order equations; linear equations up to order 4 with constant coefficients and right sides made of polynomials, exponentials, sines and cosines; and, with an initial condition, other first-order equations numerically.
How do I enter derivatives?
Type y' for the first derivative, y'' for the second and y''' for the third, or use dy/dx and d^2y/dx^2.
What is the difference between the general and the particular solution?
The general solution contains arbitrary constants (C₁, C₂, …) and describes every solution. Initial conditions pick out one particular solution.
How do I know the solution is right?
The calculator substitutes the solution back into the equation symbolically and checks that both sides agree at many points.
What if there is no formula?
For a first-order equation with an initial condition, the calculator uses the fourth-order Runge–Kutta method and shows a table of values and the curve over the slope field.
Sources
- Paul’s Online Math Notes: Second Order Differential Equations
- Paul’s Online Math Notes: Linear First Order Equations
- Paul’s Online Math Notes: Separable Equations
- Paul’s Online Math Notes: Undetermined Coefficients
- MIT OpenCourseWare 18.03: Differential Equations
Related calculators
- Laplace Transform Calculator
- Inverse Laplace Transform Calculator
- Integral Calculator
- Derivative Calculator
- Exponential Growth Calculator
More calculus calculators
Related to This Article
More math articles
- Genetic Variation, Common Ancestry, and Cladograms
- The Best Grade 7 Math Book for Alabama Students
- 3rd Grade LEAP Math Worksheets: FREE & Printable
- Dog Food Calculator: How Much Should I Feed My Dog?
- How to Ace the GED Math Formulas
- 6th Grade PARCC Math FREE Sample Practice Questions
- 49 Free Grade 5 Math Worksheets for Mississippi MAAP Prep, Built Around the Real Skill List
- Rule of law
- The Best Grade 5 Math Book for Vermont Students
- Central Limit Theorem and Standard Error


What people say about "Differential Equation Calculator (ODE Solver) with Steps"?
No one replied yet.