Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ 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

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

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 tryto the power 1 a solution of the form y=erx. Then y=rerx and y=r2erx. 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 .

Hence, if r=2 or r=4, then erx is a solution. So let y1=e2x and y2=e4x.

For another example of the first case, take the equation yk2y=0. Here the characteristic equation is r2k2=0 or (rk)(r+k)=0. Consequently, ekx and ekx are the two linearly independent solutions.

Let us give a short proof for why the solution xerx 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 is a solution when the roots are distinct. When we take the limit as r1 goes to r2, we are really taking the derivative of erx using r as the variable. Therefore, the limit is xerx, 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=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). 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). We define multiplication by

( a , b ) × ( c , d ) = def ( a c b d , a d + b c ) .

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).

Generally we just write (a,b) as (a+ib), and we treat i 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=1. So whenever we see i2, we replace it by 1. The numbers i and i are the two roots of r2+1=0.

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

We can also define the exponential ea+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=exey. This means that ea+ib=eaeib. Hence if we can compute eib, we can compute ea+ib. For eib we use the so-called Euler’s formula.

2.2.3 Complex roots

Suppose that the equation ay+by+cy=0 has the characteristic equation ar2+br+c=0 that has complex roots. By the quadratic formula, the roots are b±b24ac2a. These roots are complex if b24ac<0. In this case the roots are

r 1 , r 2 = b 2 a ± i 4 a c b 2 2 a

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

y = C 1 e ( α + i β ) x + C 2 e ( α i β ) x

However, the exponential is now complex valued. We would need to allow C1 and C2 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

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 )

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 )

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 (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.