To find the solution of the linear homogeneous differential equation wiith constant coefficients y(n)+an−1y(n−1)+…+a2y′′+a1y′+a0=0, we assume that the solution has the form y(x)=erx.
Plugging this solution into the equation and noting that y(n)=rnerx gives
rnerx+an−1rn−1erx+…+a2r2erx+a1rerx+a0erx=0, or
rn+an−1rn−1+…+a2r2+a1r+a0=0.
This is called the characteristic equation of the differential equation. Solving it, we will find n solutions r1,r2,…,rn; so, the solutions of the homogeneous equation are y1(x)=er1x, y2(x)=er2x, …, yn(x)=ernx.
Depending on the roots of the characteristic equation, there are different general solutions.
Case 1. The roots are distinct and real. In this case, y1(x)=er1x, y2(x)=er2x, …, yn(x)=ernx are all different and thus linearly independent (exponents with different powers are linearly independent); so, the solution can be written as y=c1er1x+c2er2x+…+cnernx.
Example 1. Solve y′′′−6y′′+11y′−6y=0.
The characteristic equation is r3−6r2+11r−6=0, which can be factored into (r−1)(r−2)(r−3)=0. The roots are r1=1, r2=2, r3=3. They are real and distinct; so, the general solution is yh=c1ex+c2e2x+c3e3x.
Case 2. The roots are complex. Since the coefficients in the differential equation are assumed to be real, there is a complex root a+bi and the corresponding complex conjugate a−bi. For this pair of roots, the part of the solution is given by d1e(a+bi)x+d2e(a−bi)x.
Now, using Euler's formula, we can write that e(a+bi)x=eaxebix=eax(cos(bx)+isin(bx)) and e(a−bi)x=eaxe−bix=eax(cos(bx)−isin(b(x)).
So, d1e(a+bi)x+d2e(a−bi)x=(d1+d2)eaxcos(bx)+(d1−d2)ieaxsin(bx).
Taking c1=d1+d2 and c2=(d1−d2)i, we can write the solution as c1eaxcos(bx)+c2eaxsin(bx).
Example 2. Solve y′′+2y′+5y=0.
The characteristic equation is r2+2r+5=0. This equation has the roots r1=−1−2i and r2=−1+2i; so, the general solution is
y=c1e−xcos(2x)+c2e−xsin(2x).
Case 3. Some roots have the multiplicity p>1 (if the root rk is of the multiplicity p, we have that (r−rk)p is a factor of the characteristic equation, but (r−rk)p+1 is not). In this case, some solutions are the same and, therefore, are not linearly independent. Here, the solutions are y1=erkx, y2=xerkx, ...,yp=xp−1erkx.
Example 3. Solve y′′′+3y′′+3y′+y=0.
The characteristic equation is r3+3r2+3r+1=0 or (r+1)3=0. So, the roots are r1=−1, r2=−1, r3=−1.
Here, one root is of the multiplicity 3; so, the general solution is y=c1e−x+c2xe−x+c3x2e−x.
Now, let's do some more work.
Example 4. Solve y′′′′+2y′′+y=0.
The characteristic equation is r4+2r2+1=0, or (r2+1)2=0. So, here are the complex roots of the multiplicity 2: r1=i,r2=−i, r3=i, r4=−i.
Hence, the general solution is y=c1cos(x)+c2sin(x)+c3xcos(x)+c4xsin(x).
Note that, in general, there will be some roots of the multiplicity more than one, some roots are complex, and some are real and distinct. In this case, we just combine the corresponding solutions.
Example 5. Solve y(6)−3y(5)−3y(4)+25y′′′−46y′′+38y′−12y=0.
The characteristic equation is r6−3r5−3r4+25r3−46r2+38r−12=0. It has the roots r1=1+i, r2=1−i, r3=2, r4=−3, r5=1, r6=1.
There are a pair of complex roots, 2 distinct roots, and one root of the multiplicity 2; so, the general solution is y=c1excos(x)+c2exsin(x)+c3e2x+c4e−3x+c5ex+c6xex.
In theory, it is always possible to factor the characteristic equation, but in practice this can be extremely difficult, especially for differential equations of higher order. In such cases, one often has to use numerical techniques to approximate the solutions.
Warning: A characteristic equation is valid only for a linear differential equation with constant coefficients. Consider, for example, the equation y′′−x2y=0. The characteristic equation is r2−x2=0; it has the roots r1=x and r2=−x, but the solution is not y=c1e(x)x+c2e(−x)x=c1ex2+c2e−x2.