Complex Roots of the Characteristic Equation We have already addressed how to solve a second order linear homogeneous differential equation with constant coefficients where the roots of the characteristic equation are real and distinct.  We will now explain how to handle these differential equations when the roots are complex.  The example below demonstrates the method.   Example Solve          y'' - 4y' + 13y  =  0   Solution As before we assume that y  =  ert is a solution.  We have         y'  =  rert        y''  =  r2ert  Substituting back into the original differential equation gives         r2ert - 4rert + 13ert  =  0         r2 - 4r + 13  =  0        dividing by ert  This quadratic does not factor, so we use the quadratic formula and get the roots         r  =  2 + 3i         and        r  =  2 - 3i We can conclude that the general solution to the differential equation is         y  =  a1e(2+3i)t + a2e(2-3i)t         =  a1e2te3it + a2e2te-3it      Using the rule of exponents         =  e2t(a1e3it + a2e-3it)     Factoring out the e2t  Although this gives the general solution, it it not satisfactory since the solution involves complex exponents.  To deal with this we use Euler's formula         eiq  =  cos q + i sin q This gives          y  =  e2t[a1(cos(3t) + i sin(3t)) + a2(cos(-3t) + i sin(-3t))] Since the cos x is an even function and sin x is an odd function, we get         y  =  e2t[a1(cos(3t) + i sin(3t)) + a2(cos(3t) - i sin(3t))] or         y  =  e2t[(a1 + a2)cos(3t)  + (a1 - a2)i sin(3t)] Finally let          c1  =  a1 + a2         and        c2  =  i(a1 - a2)   and we get          y  =  e2t[c1cos(3t)  + c2 sin(3t)]   In general if          ay'' + by' + cy  =  0 is a second order linear differential equation with constant coefficients such that the characteristic equation has complex roots         r  =  l + mi     and    r  =  l - mi Then the general solution to the differential equation is given by          y  =  elt[c1 cos(mt) + c2sin(mt)]   Example Solve          y'' - 10y' + 29  =  0        y(0)  =  1    y'(0)  =  3   Solution The characteristic equation is         r2 - 10r + 29  =  0 which has roots          r  =  5 + 2i        and        r  =  5 - 2i The general solution is          y  =  e5t[c1 cos(2t) + c2 sin(2t)] We use the initial values to find the constants.  Plug in y(0)  =  1.         1  =  1[c1(1) + c2(0)] so that c1  =  1.  We have         y'  =  5e5t[cos(2t) + c2 sin(2t)] + e5t[-2 sin(2t) + 2c2 cos(2t)] Plugging in y'(0)  =  3         3  =  5[1 + 0]  + 1[0 + 2c2]  =  5 + 2c2  Hence c2  =  -1 The final solution is          y  =  e5t[cos(2t) - sin(2t)]          Let's investigate the graphs of solutions of the form                 y  =  elt[c1 cos(mt) + c2sin(mt)] For  l  =  0, the graph is periodic. For l  >  0, the amplitude increases exponentially For l < 0, the amplitude approaches 0 exponentially. The three types are pictured below.   Back to the Differential Equations Home Page