Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

2.2 Constant coefficient second order linear ODEs

Solving Constant Coefficient Equations

Suppose we have the problem

y 6 y + 8 y = 0 , y ( 0 ) = 2 , y ( 0 ) = 6 y'' - 6y' + 8y = 0, y(0) = -2, y'(0) = 6 \nonumber

This is a second order linear homogeneous equation with constant coefficients. Constant coefficients means that the functions in front of yy'', yy', and yy are constants and do not depend on xx.

4,24,\; 2
Roots of the characteristic equation r^2 - 6r + 8 = 0 ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text Roots of the characteristic equation r^2 - 6r + 8 = 0, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.The characteristic equation of y'' - 6y' + 8y = 0, solved at build time. The text factors it as (r - 2)(r - 4) = 0 and takes r = 2 and r = 4; the roots are compared as a set, so the order the book prints them in does not matter.

To guess a solution, think of a function that you know stays essentially the same when we differentiate it, so that we can take the function and its derivatives, add some multiples of these together, and end up with zero.

Let us try1 a solution of the form y=erxy = e^{rx}. Then y=rerxy' = re^{rx} and y=r2erxy'' = r^2e^{rx}. Plug in to get

y 6 y + 8 y = 0 , r 2 e r x y 6 r e r x y + 8 e r x y = 0 , r 2 6 r + 8 = 0 (divide through by  e r x ) , ( r 2 ) ( r 4 ) = 0 . \begin{align}\begin{aligned} y''-6y'+8y & = 0, \\ \underbrace{r^2 e^{rx}}_{y''} -6 \underbrace{r e^{rx}}_{y'}+8 \underbrace{e^{rx}}_{y} & = 0, \\ r^2 -6 r +8 & = 0 \qquad \text{(divide through by } e^{rx} \text{)},\\ (r-2)(r-4) & = 0.\end{aligned}\end{align} \nonumber

Hence, if r=2r = 2 or r=4r = 4, then erxe^{rx} is a solution. So let y1=e2xy_1 = e^{2x} and y2=e4xy_2 = e^{4x}.

For another example of the first case, take the equation yk2y=0y'' - k^2y = 0. Here the characteristic equation is r2k2=0r^2 - k^2 = 0 or (rk)(r+k)=0(r - k)(r + k) = 0. Consequently, ekxe^{-kx} and ekxe^{kx} are the two linearly independent solutions.

Let us give a short proof for why the solution xerxxe^{rx} works when the root is doubled. This case is really a limiting case of when the two roots are distinct and very close. Note that er2xex1xr2r1\frac {e^r2^x - e^x1^x}{r_2 - r_1} is a solution when the roots are distinct. When we take the limit as r1r_1 goes to r2r_2, we are really taking the derivative of erxe^{rx} using rr as the variable. Therefore, the limit is xerxxe^{rx}, and hence this is a solution in the doubled root case.

2.2.2 Complex numbers and Euler’s formula

It may happen that a polynomial has some complex roots. For example, the equation r2+1=0r^2 + 1 = 0 has no real roots, but it does have two complex roots. Here we review some properties of complex numbers.

Complex numbers may seem a strange concept, especially because of the terminology. There is nothing imaginary or really complicated about complex numbers. A complex number is simply a pair of real numbers, (a,b)(a, b). We can think of a complex number as a point in the plane. We add complex numbers in the straightforward way, (a,b)+(c,d)=(a+c,b+d)(a, b) + (c, d) = (a + c, b + d). We define multiplication by

( a , b ) × ( c , d ) = def ( a c b d , a d + b c ) . (a,b) \times (c,d) \overset{\text{def}}{=} (ac-bd,ad+bc). \nonumber

It turns out that with this multiplication rule, all the standard properties of arithmetic hold. Further, and most importantly (0,1)×(0,1)=(1,0)( 0, 1) \times (0,1) = (-1, 0 ).

Generally we just write (a,b)(a, b) as (a+ib)(a + ib), and we treat ii as if it were an unknown. We do arithmetic with complex numbers just as we would with polynomials. The property we just mentioned becomes i2=1i^2 = -1. So whenever we see i2i^2, we replace it by 1-1. The numbers ii and i-i are the two roots of r2+1=0r^2 + 1 = 0.

Note that engineers often use the letter jj instead of ii for the square root of 1-1. We will use the mathematicians’ convention and use ii.

We can also define the exponential ea+ibe^{a+ib} of a complex number. We do this by writing down the Taylor series and plugging in the complex number. Because most properties of the exponential can be proved by looking at the Taylor series, these properties still hold for the complex exponential. For example the very important property: ex+y=exeye^{x+y} = e^xe^y. This means that ea+ib=eaeibe^{a+ib} = e^ae^{ib}. Hence if we can compute eibe^{ib}, we can compute ea+ibe^{a+ib}. For eibe^{ib} we use the so-called Euler’s formula.

2.2.3 Complex roots

Suppose that the equation ay+by+cy=0ay'' + by' + cy = 0 has the characteristic equation ar2+br+c=0ar^2 + br + c = 0 that has complex roots. By the quadratic formula, the roots are b±b24ac2a\dfrac{-b \pm \sqrt {b^2 - 4ac}}{2a}. These roots are complex if b24ac<0b^2 - 4ac < 0. In this case the roots are

r 1 , r 2 = b 2 a ± i 4 a c b 2 2 a r_1, r_2 = \frac {-b}{2a} \pm i \dfrac { \sqrt {4ac - b^2}}{2a} \nonumber

As you can see, we always get a pair of roots of the form α±iβ\alpha \pm i \beta. In this case we can still write the solution as

y = C 1 e ( α + i β ) x + C 2 e ( α i β ) x y = C_1e^{(\alpha + i \beta )x} + C_2e^{(\alpha - i\beta)x} \nonumber

However, the exponential is now complex valued. We would need to allow C1C_1 and C2C_2 to be complex numbers to obtain a real-valued solution (which is what we are after). While there is nothing particularly wrong with this approach, it can make calculations harder and it is generally preferred to find two real-valued solutions.

Here we can use Euler’s formula. Let

y 1 = e ( α + i β ) x and y 2 = e ( α i β ) x y_1 = e^{(\alpha + i\beta)x} \quad\text{and}\quad y_2 = e^{( \alpha - i \beta ) x} \nonumber

Then note that

y 1 = e a x cos ( β x ) + i e a x sin ( β x ) y 2 = e a x cos ( β x ) i e a x sin ( β x ) \begin{align}\begin{aligned} y_1 &= e^{ax} \cos (\beta x) + ie^{ax} \sin ( \beta x) \\ y_2 &= e^{ax} \cos (\beta x) - ie^{ax} \sin (\beta x) \end{aligned}\end{align} \nonumber

Linear combinations of solutions are also solutions. Hence,

y 3 = y 1 + y 2 2 = e a x cos ( β x ) y 4 = y 1 y 2 2 i = e a x sin ( β x ) \begin{align}\begin{aligned} y_3 &= \frac {y_1 + y_2}{2} = e^{ax} \cos (\beta x) \\ y_4 &= \frac {y_1 - y_2}{2i} = e^{ax} \sin (\beta x) \end{aligned}\end{align} \nonumber

are also solutions. Furthermore, they are real-valued. It is not hard to see that they are linearly independent (not multiples of each other). Therefore, we have the following theorem.

Footnotes

[1] Making an educated guess with some parameters to solve for is such a central technique in differential equations, that people sometimes use a fancy name for such a guess: ansatz, German for “initial placement of a tool at a work piece.” Yes, the Germans have a word for that.

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.