Second-Order Homogeneous ODE Solutions (finding real, repeat, imaginary roots)

Home»Math Guides»Second Order Homogeneous ODEs (root finding, real, imaginary, repeated)

How to find solutions of second-order homogeneous ODEs (factoring to get real, repeated, or imaginary roots)

A homogeneous second-order ODE is just one that has only “y” terms and the derivatives of the y terms, with only real-number coefficients in front of those terms. You’ll recognize them quickly.

There are basically three cases, when you factor these you will get either real distinct, repeated, or complex roots, which are all different cases we will cover.

First case: real, distinct roots

Example: Find the general solution to the second-order ODE: \(y” + 11y’ + 24y = 0\)

To find general solution, let \(y = {e^{mx}}\), then \(y’ = m{e^{mx}}\) and \(y” = {m^2}{e^{mx}}\)

You don’t have to show all the algebra steps, to summarize these substitutions will turn the second-order ODE into what looks like a quadratic equation, which we can factor and find the solution to.

\[\left( {{m^2} + 11m + 24} \right) = 0\]

Factor it. Basically find two numbers that sum to 11, and multiply to 24.

\[\left( {m + 3} \right)\left( {m + 8} \right) = 0\]

The roots are real and distinct, m = -3 and m = -8.

The general solution will always be in the form: \(y = {c_1}{e^{{m_1}x}} + {c_2}{e^{{m_2}x}}\)

Here, we weren’t given the initial conditions, so we don’t need to solve for \({c_1}\) or \({c_2}\). So we raise e to the power of -3 and -8. Remember that negative exponents can just be moved to the denominator.

So the general solution is, and the \({c_1}\) or \({c_2}\) can correspond to either root, it’s fine:

\[y = \frac{{{c_1}}}{{{e^{3x}}}} + \frac{{{c_2}}}{{{e^{8x}}}}\]

Second case: real, repeated roots

Example: Find the general solution to the second-order ODE: \(y” + 4y’ + 4y = 0\)

We repeat the same procedure as the previous example. Let \(y = {e^{mx}}\), then \(y’ = m{e^{mx}}\) and \(y” = {m^2}{e^{mx}}\)

\[\left( {{m^2} + 4m + 4} \right) = 0\]

\[{\left( {m + 2} \right)^2} = 0\]

So the two repeated roots are -2. The general solution for the case of repeated roots is:

\[y = {c_1}{e^{{m_1}x}} + x{c_2}{e^{{m_2}x}}\]

(If you did have a higher-order ODE and used factoring, you’d keep adding \({x^2}\), \({x^3}\), etc.)

Then just plug in the roots you found into the solution equation:

\[y = \frac{{{c_1}}}{{{e^{2x}}}} + \frac{{x{c_2}}}{{{e^{2x}}}}\]

Third case: complex roots

This happens when you just can’t factor the polynomial.

Example: Find the general solution to the second-order ODE: \(y” + 2y’ + 5y = 0\)

Again, let \(y = {e^{mx}}\), then \(y’ = m{e^{mx}}\) and \(y” = {m^2}{e^{mx}}\)

We obtain the following polynomial:

\[\left( {{m^2} + 2m + 5} \right) = 0\]

You can’t factor this polynomial, use a calculator to find the imaginary roots, which will be \(m = – 1 – 2i\) and \(m = – 1 + 2i\). Note that in the scope of an ODE course, the imaginary roots will always be “complex conjugates”, or in other words, the sign of the imaginary part is the only difference between the complex roots.

Just put the “real” part of the complex roots, which is -1 (negative exponent I move to the denominator), as the exponent for e, and put the imaginary part, 2, into the trigonometric functions as shown below.

The general solution is:

\[y = \frac{{{c_1}\cos (2x) + {c_2}\sin (2x)}}{{{e^x}}}\]

How to solve a second-order ordinary differential equation using MATLAB and double checking your answer

If you have the program MATLAB, you can easily use its symbolic tools to get the exact solution to the problem, feel free to use our following script and modify it for the problem you’re trying to solve.

It’s extremely handy for double-checking your answers before handing them in for an assignment. You can even make your own problems and solve them if you want extra practice solving second-order ODEs.

%bai-gaming.com/math-guides
syms y(x) x
eqn = diff(y,x,2) +11*diff(y,x,1) + 24*y == 0;
S = dsolve(eqn)

Click here to return to the Math Guides hubpage

Leave a Comment