Second-Order ODE Solver Calculator

Published on: July 18, 2026
Final Answer: Free | Full Steps: Pro

This Second Order ODE Solver Calculator solves a linear equation with constant coefficients that involves the second derivative, and shows the working line by line. Trying a solution of exponential shape turns the equation into an ordinary quadratic, called the characteristic equation. The kind of roots that quadratic has decides the shape of the answer, whether exponential, repeated or oscillating. When the right side is not zero, a particular solution is added, found by guessing its shape and matching coefficients. Following the same pattern every time keeps the three cases apart.

Step-by-step method

  1. Set up the problem.
  2. Write the method.
  3. Write the characteristic equation.
  4. Solve the characteristic equation.
  5. Write the homogeneous solution.
  6. Choose the form of the particular solution.
  7. Differentiate the guess.
  8. Substitute and compare coefficients.
  9. Find the unknown numbers.
  10. Write the general solution.

Formula: Characteristic Equation

Trying y = e^(rx) turns the equation into a quadratic in r. Its roots decide the form of the homogeneous solution.

\(ay'' + by' + cy = 0 \;\Rightarrow\; ar^{2} + br + c = 0\)

Useful Tips to Remember

Replace \(y''\) with \(r^{2}\), \(y'\) with \(r\) and \(y\) with 1 to write the characteristic equation straight away. Two different real roots give two exponentials, a repeated root needs an extra factor of x, and complex roots \(\alpha \pm \beta i\) give \(e^{\alpha x}\) times cosine and sine. For a right side that is not 0, guess a particular solution with the same shape, and multiply the guess by x if part of it already solves the homogeneous equation. The general solution always has two constants.

Required knowledge

Where Are Second Order Differential Equations Used?

Second-order equations come from Newton's second law, because acceleration is the second derivative of position. A mass on a spring, a swinging pendulum and a car's suspension are all modelled this way, and the roots of the characteristic equation decide whether they oscillate or settle. RLC circuits follow the same equation, and engineers use the forcing term to study resonance in bridges and buildings.

  • Springs and vibrating systems
  • Pendulums for small swings
  • RLC electrical circuits
  • Car suspension and damping
  • Resonance in bridges and buildings

Second Order ODE Practice Problems

Example 1 solves \(y'' - y = 0\), whose characteristic roots are real and different, and Example 2 solves \(y'' + 2y' + 5y = 0\), whose roots are complex. Write the characteristic equation, solve it and pick the matching form. For two more free worked examples, check out the Second-Order ODE Solver Notes.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(y'' - y = 0\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the method.
  3. Write the characteristic equation.
  4. Solve the characteristic equation.
  5. Write the homogeneous solution.
  6. Choose the form of the particular solution.
  7. Differentiate the guess.
  8. Substitute and compare coefficients.
  9. Find the unknown numbers.
  10. Write the general solution.

Formula

Formula: Characteristic Equation

Trying y = e^(rx) turns the equation into a quadratic in r. Its roots decide the form of the homogeneous solution.

\(ay'' + by' + cy = 0 \;\Rightarrow\; ar^{2} + br + c = 0\)

Step 1

Step 1 - Set up the problem.

In this problem: We are solving \(y'' - y = 0\). It is a second-order linear equation with constant coefficients, and the right side is 0, so it is homogeneous.

\(y'' - y = 0\)

Step 2

Step 2 - Write the method.

In this problem: Trying \(y = e^{rx}\) turns every derivative into a power of \(r\), which gives the characteristic equation. Its roots give the homogeneous solution \(y_{h}\).

\(ay'' + by' + cy = 0 \;\Rightarrow\; ar^{2} + br + c = 0\)

Step 3

Step 3 - Write the characteristic equation.

In this problem: Putting \(y = e^{rx}\), \(y' = re^{rx}\) and \(y'' = r^{2}e^{rx}\) into \(y'' - y = 0\) and dividing by \(e^{rx}\), which is never 0, gives \(r^{2} - 1 = 0\).

\(r^{2} - 1 = 0\)

Step 4

Step 4 - Solve the characteristic equation.

In this problem: Solving \(r^{2} - 1 = 0\), covered in the Quadratic Equation Calculator, gives \(r = -1\) and \(r = 1\).

\(r^{2} - 1 = 0 \;\Rightarrow\; r_{1} = -1,\; r_{2} = 1\)

Step 5

Step 5 - Write the general solution.

In this problem: The roots are real and different, so each one gives its own exponential, which gives the general solution \(y = C_{1} e^{- x} + C_{2} e^{x}\).

\(y = C_{1} e^{- x} + C_{2} e^{x}\)

Final Answer

\(y = C_{1} e^{- x} + C_{2} e^{x}\)
See Example 2 Hide Example 2

Problem

\(y'' + 2 y' + 5 y = 0\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the method.
  3. Write the characteristic equation.
  4. Solve the characteristic equation.
  5. Write the homogeneous solution.
  6. Choose the form of the particular solution.
  7. Differentiate the guess.
  8. Substitute and compare coefficients.
  9. Find the unknown numbers.
  10. Write the general solution.

Formula

Formula: Characteristic Equation

Trying y = e^(rx) turns the equation into a quadratic in r. Its roots decide the form of the homogeneous solution.

\(ay'' + by' + cy = 0 \;\Rightarrow\; ar^{2} + br + c = 0\)

Step 1

Step 1 - Set up the problem.

In this problem: We are solving \(y'' + 2 y' + 5 y = 0\). It is a second-order linear equation with constant coefficients, and the right side is 0, so it is homogeneous.

\(y'' + 2 y' + 5 y = 0\)

Step 2

Step 2 - Write the method.

In this problem: Trying \(y = e^{rx}\) turns every derivative into a power of \(r\), which gives the characteristic equation. Its roots give the homogeneous solution \(y_{h}\).

\(ay'' + by' + cy = 0 \;\Rightarrow\; ar^{2} + br + c = 0\)

Step 3

Step 3 - Write the characteristic equation.

In this problem: Putting \(y = e^{rx}\), \(y' = re^{rx}\) and \(y'' = r^{2}e^{rx}\) into \(y'' + 2 y' + 5 y = 0\) and dividing by \(e^{rx}\), which is never 0, gives \(r^{2} + 2 r + 5 = 0\).

\(r^{2} + 2 r + 5 = 0\)

Step 4

Step 4 - Solve the characteristic equation.

In this problem: Solving \(r^{2} + 2 r + 5 = 0\), covered in the Quadratic Equation Calculator, gives \(r = -1 - 2 i\) and \(r = -1 + 2 i\).

\(r^{2} + 2 r + 5 = 0 \;\Rightarrow\; r_{1} = -1 - 2 i,\; r_{2} = -1 + 2 i\)

Step 5

Step 5 - Write the general solution.

In this problem: The roots are complex, \(\alpha \pm \beta i\) with \(\alpha = -1\) and \(\beta = 2\), so the solution uses \(e^{\alpha x}\) with cosine and sine of \(\beta x\), which gives the general solution \(y = \left(C_{1} \cos {2 x} + C_{2} \sin {2 x}\right) e^{- x}\).

\(y = \left(C_{1} \cos {2 x} + C_{2} \sin {2 x}\right) e^{- x}\)

Final Answer

\(y = \left(C_{1} \cos {2 x} + C_{2} \sin {2 x}\right) e^{- x}\)

Notes and Practice Mode

Example Problems

Click one to load it into the box and solve it.