Second-Order ODE Solver Calculator
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
- Set up the problem.
- Write the method.
- Write the characteristic equation.
- Solve the characteristic equation.
- Write the homogeneous solution.
- Choose the form of the particular solution.
- Differentiate the guess.
- Substitute and compare coefficients.
- Find the unknown numbers.
- 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.
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
- How to solve the characteristic equation, covered in the Quadratic Equation Calculator.
- How to differentiate the guess, covered in the Derivative Calculator.
- How to solve for the unknown numbers, covered in the Linear Equation Calculator.
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
Approach
Step-by-step method
- Set up the problem.
- Write the method.
- Write the characteristic equation.
- Solve the characteristic equation.
- Write the homogeneous solution.
- Choose the form of the particular solution.
- Differentiate the guess.
- Substitute and compare coefficients.
- Find the unknown numbers.
- 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.
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.
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}\).
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\).
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Rewrite the equation in standard form, with every term on the left and 0 on the right.
- Identify the coefficients a, b and c.
- Write the quadratic formula.
- Substitute the coefficients into the formula.
- Work out the numbers in the formula.
- Split the \(\pm\) into the two solutions.
Depending on the equation, some of these steps are not needed, so they are skipped.
Formula
Formula: Quadratic Formula
This formula is used to solve any equation in the form ax² + bx + c = 0. Put in a, b and c, then work out the + and − versions to get the two solutions.
Step 1
Step 1 - Set up the problem.
In this problem: The equation to solve is \(r^{2} - 1 = 0\), and the unknown is \(r\).
Step 2
Step 2 - Identify the coefficients a, b and c.
In this problem: Matching \(r^{2} - 1 = 0\) with \(ax^{2} + bx + c = 0\) gives \(a = 1\), \(b = 0\) and \(c = -1\).
Step 3
Step 3 - Write the quadratic formula.
In this problem: The quadratic formula solves any equation in the form \(ax^{2} + bx + c = 0\).
Step 4
Step 4 - Substitute the coefficients into the formula.
In this problem: Putting \(a = 1\), \(b = 0\) and \(c = -1\) into the formula gives \(r = \frac{-0 \pm \sqrt{0^{2} - 4(1)(-1)}}{2(1)}\).
Step 5
Step 5 - Work out the numbers in the formula.
In this problem: Under the square root, \(0^{2} = 0\) and \(4(1)(-1) = -4\), so \(0 + 4 = 4\). Underneath, \(2(1) = 2\). Then \(\sqrt{4} = 2\).
Step 6
Step 6 - Split the \(\pm\) into the two solutions.
In this problem: The \(\pm\) means there are two solutions, one with \(+\) and one with \(-\).
Step 6a
Step 6a - Take the \(+\) sign.
In this problem: Using \(+\) gives \(r = \frac{0 + 2}{2} = \frac{2}{2} = 1\).
Step 6b
Step 6b - Take the \(-\) sign.
In this problem: Using \(-\) gives \(r = \frac{0 - 2}{2} = \frac{-2}{2} = -1\).
Final Answer
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}\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the method.
- Write the characteristic equation.
- Solve the characteristic equation.
- Write the homogeneous solution.
- Choose the form of the particular solution.
- Differentiate the guess.
- Substitute and compare coefficients.
- Find the unknown numbers.
- 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.
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.
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}\).
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\).
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\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Rewrite the equation in standard form, with every term on the left and 0 on the right.
- Identify the coefficients a, b and c.
- Write the quadratic formula.
- Substitute the coefficients into the formula.
- Work out the numbers in the formula.
- Split the \(\pm\) into the two solutions.
Depending on the equation, some of these steps are not needed, so they are skipped.
Formula
Formula: Quadratic Formula
This formula is used to solve any equation in the form ax² + bx + c = 0. Put in a, b and c, then work out the + and − versions to get the two solutions.
Step 1
Step 1 - Set up the problem.
In this problem: The equation to solve is \(r^{2} + 2r + 5 = 0\), and the unknown is \(r\).
Step 2
Step 2 - Identify the coefficients a, b and c.
In this problem: Matching \(r^{2} + 2r + 5 = 0\) with \(ax^{2} + bx + c = 0\) gives \(a = 1\), \(b = 2\) and \(c = 5\).
Step 3
Step 3 - Write the quadratic formula.
In this problem: The quadratic formula solves any equation in the form \(ax^{2} + bx + c = 0\).
Step 4
Step 4 - Substitute the coefficients into the formula.
In this problem: Putting \(a = 1\), \(b = 2\) and \(c = 5\) into the formula gives \(r = \frac{-2 \pm \sqrt{2^{2} - 4(1)(5)}}{2(1)}\).
Step 5
Step 5 - Work out the numbers in the formula.
In this problem: Under the square root, \(2^{2} = 4\) and \(4(1)(5) = 20\), so \(4 - 20 = -16\). Underneath, \(2(1) = 2\). A negative number has no real square root, so the equation has no real solutions.
Final Answer
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}\).
Final Answer
Notes and Practice Mode
Want to understand the method more deeply? The Second Order ODE Solver Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. When you are ready to test yourself, Second Order ODE Solver Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode for this calculator is available on the Pro plan.
Login and upgrade to Pro to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.