#set document(title: "2.2 Constant coefficient second order linear ODEs", author: "Jiří Lebl") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 2.2#h(0.6em)Constant coefficient second order linear ODEs === Solving Constant Coefficient Equations Suppose we have the problem #math.equation(block: true, alt: "y double prime minus 6 y prime plus 8 y equals 0 , y open parenthesis 0 close parenthesis equals minus 2 , y prime open parenthesis 0 close parenthesis equals 6")[$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 #math.equation(block: false, alt: "y double prime")[$y^(″)$], #math.equation(block: false, alt: "y prime")[$y^(′)$], and #math.equation(block: false, alt: "y")[$y$] are constants and do not depend on #math.equation(block: false, alt: "x")[$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 try#math.equation(block: false, alt: "to the power 1")[$1$] a solution of the form #math.equation(block: false, alt: "y equals e to the power r x")[$y = e^(r x)$]. Then #math.equation(block: false, alt: "y prime equals r e to the power r x")[$y^(′) = r e^(r x)$] and #math.equation(block: false, alt: "y double prime equals r squared e to the power r x")[$y^(″) = r^(2) e^(r x)$]. Plug in to get #math.equation(block: true, alt: "y double prime minus 6 y prime plus 8 y equals 0 ,; r squared e to the power r x ⏟ y double prime minus 6 r e to the power r x ⏟ y prime plus 8 e to the power r x ⏟ y equals 0 ,; r squared minus 6 r plus 8 equals 0 (divide through by e to the power r x ) ,; open parenthesis r minus 2 close parenthesis open parenthesis r minus 4 close parenthesis equals 0 .")[$y^(″) − 6 y^(′) + 8 y = 0 , \ limits(underbrace(r^(2) e^(r x)))_(y^(″)) − 6 limits(underbrace(r e^(r x)))_(y^(′)) + 8 limits(underbrace(e^(r x)))_(y) = 0 , \ r^(2) − 6 r + 8 = 0 #h(2em) "(divide through by " e^(r x) ")" , \ ( r − 2 ) ( r − 4 ) = 0 .$] Hence, if #math.equation(block: false, alt: "r equals 2")[$r = 2$] or #math.equation(block: false, alt: "r equals 4")[$r = 4$], then #math.equation(block: false, alt: "e to the power r x")[$e^(r x)$] is a solution. So let #math.equation(block: false, alt: "y sub 1 equals e to the power 2 x")[$y_(1) = e^(2 x)$] and #math.equation(block: false, alt: "y sub 2 equals e to the power 4 x")[$y_(2) = e^(4 x)$]. #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Check that #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] are solutions. #strong[Solution] The functions #math.equation(block: false, alt: "e to the power 2 x")[$e^(2 x)$] and #math.equation(block: false, alt: "e to the power 4 x")[$e^(4 x)$] are linearly independent. If they were not linearly independent we could write #math.equation(block: false, alt: "e to the power 4 x equals C e to the power 2 x")[$e^(4 x) = C e^(2 x)$] for some constant #math.equation(block: false, alt: "C")[$C$], implying that #math.equation(block: false, alt: "e to the power 2 x equals C")[$e^(2 x) = C$]for all #math.equation(block: false, alt: "x")[$x$], which is clearly not possible. Hence, we can write the general solution as #math.equation(block: true, alt: "y equals C sub 1 e to the power 2 x plus C sub 2 e to the power 4 x")[$y = C_(1) e^(2 x) + C_(2) e^(4 x)$] We need to solve for #math.equation(block: false, alt: "C sub 1")[$C_(1)$] and #math.equation(block: false, alt: "C sub 2")[$C_(2)$]. To apply the initial conditions we first find #math.equation(block: false, alt: "y prime equals 2 C sub 1 e to the power 2 x plus 4 C sub 2 e to the power 4 x")[$y^(′) = 2 C_(1) e^(2 x) + 4 C_(2) e^(4 x)$]. We plug in #math.equation(block: false, alt: "x equals 0")[$x = 0$] and solve. #math.equation(block: true, alt: "minus 2 equals y open parenthesis 0 close parenthesis equals C sub 1 plus C sub 2; 6 equals y prime open parenthesis 0 close parenthesis equals 2 C sub 1 plus 4 C sub 2")[$− 2 = y ( 0 ) = C_(1) + C_(2) \ 6 = y^(′) ( 0 ) = 2 C_(1) + 4 C_(2)$] Either apply some matrix algebra, or just solve these by high school math. For example, divide the second equation by 2 to obtain #math.equation(block: false, alt: "3 equals C sub 1 plus 2 C sub 2")[$3 = C_(1) + 2 C_(2)$], and subtract the two equations to get #math.equation(block: false, alt: "5 equals C sub 2")[$5 = C_(2)$]. Then #math.equation(block: false, alt: "C sub 1 equals minus 7")[$C_(1) = − 7$] as #math.equation(block: false, alt: "minus 2 equals C sub 1 plus 5")[$− 2 = C_(1) + 5$]. Hence, the solution we are looking for is #math.equation(block: true, alt: "y equals minus 7 e to the power 2 x plus 5 e to the power 4 x")[$y = − 7 e^(2 x) + 5 e^(4 x)$] Let us generalize this example into a method. Suppose that we have an equation #math.equation(block: true, alt: "a y double prime plus b y prime plus c y equals 0 ,")[$a y^(″) + b y^(′) + c y = 0 ,$] where #math.equation(block: false, alt: "a , b , c")[$a , b , c$] are constants. Try the solution #math.equation(block: false, alt: "y equals e to the power r x")[$y = e^(r x)$] to obtain #math.equation(block: true, alt: "a r squared e to the power r x plus b r e to the power r x plus c e to the power r x equals 0")[$a r^(2) e^(r x) + b r e^(r x) + c e^(r x) = 0$] Divide by #math.equation(block: false, alt: "e to the power r x")[$e^(r x)$] to obtain the so-called #emph[characteristic equation] of the ODE: #math.equation(block: true, alt: "a r squared plus b r plus c equals 0")[$a r^(2) + b r + c = 0$] Solve for the #math.equation(block: false, alt: "r")[$r$] by using the quadratic formula. #math.equation(block: true, alt: "r sub 1 , r sub 2 equals the fraction minus b ± the square root of b squared minus 4 a c over 2 a")[$r_(1) , r_(2) = frac(− b ± sqrt(b^(2) − 4 a c), 2 a)$] Therefore, we have #math.equation(block: false, alt: "e to the power r sub 1 x")[$e^(r_(1) x)$] and #math.equation(block: false, alt: "e to the power r sub 2 x")[$e^(r_(2) x)$] as solutions. There is still a difficulty if #math.equation(block: false, alt: "r sub 1 equals r sub 2")[$r_(1) = r_(2)$], but it is not hard to overcome. ] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Suppose that #math.equation(block: false, alt: "r sub 1")[$r_(1)$] and #math.equation(block: false, alt: "r sub 2")[$r_(2)$] are the roots of the characteristic equation. If #math.equation(block: false, alt: "r sub 1")[$r_(1)$] and #math.equation(block: false, alt: "r sub 2")[$r_(2)$] are distinct and real (when #math.equation(block: false, alt: "b squared minus 4 a c greater than 0")[$b^(2) − 4 a c > 0$] ), then (2.2.1) has the general solution #math.equation(block: true, alt: "y equals C sub 1 e to the power r sub 1 x plus C sub 2 e to the power r sub 2 x")[$y = C_(1) e^(r_(1) x) + C_(2) e^(r_(2) x)$] If #math.equation(block: false, alt: "r sub 1 equals r sub 2")[$r_(1) = r_(2)$] (happens when #math.equation(block: false, alt: "b squared minus 4 a c equals 0")[$b^(2) − 4 a c = 0$] ), then (2.2.1) has the general solution #math.equation(block: true, alt: "y equals open parenthesis C sub 1 plus C sub 2 x close parenthesis e to the power r sub 1 x")[$y = ( C_(1) + C_(2) x ) e^(r_(1) x)$] ] For another example of the first case, take the equation #math.equation(block: false, alt: "y double prime minus k squared y equals 0")[$y^(″) − k^(2) y = 0$]. Here the characteristic equation is #math.equation(block: false, alt: "r squared minus k squared equals 0")[$r^(2) − k^(2) = 0$] or #math.equation(block: false, alt: "open parenthesis r minus k close parenthesis open parenthesis r plus k close parenthesis equals 0")[$( r − k ) ( r + k ) = 0$]. Consequently, #math.equation(block: false, alt: "e to the power minus k x")[$e^(− k x)$] and #math.equation(block: false, alt: "e to the power k x")[$e^(k x)$] are the two linearly independent solutions. #examplebox("Example 1")[][ Solve #math.equation(block: true, alt: "y double prime minus k squared y equals 0 .")[$y^(″) − k^(2) y = 0 .$] #solutionbox[ The characteristic equation is #math.equation(block: false, alt: "r squared minus k squared equals 0")[$r^(2) − k^(2) = 0$] or #math.equation(block: false, alt: "open parenthesis r minus k close parenthesis open parenthesis r plus k close parenthesis equals 0")[$( r − k ) ( r + k ) = 0$]. Consequently, #math.equation(block: false, alt: "e to the power minus k x")[$e^(− k x)$] and #math.equation(block: false, alt: "e to the power k x")[$e^(k x)$] are the two linearly independent solutions, and the general solution is #math.equation(block: true, alt: "y equals C sub 1 e to the power k x plus C sub 2 e sub minus k x .")[$y = C_(1) e^(k x) + C_(2) e_(− k x) .$] Since #math.equation(block: false, alt: "cosh s equals the fraction e to the power s plus e to the power minus s over 2")[$cosh s = frac(e^(s) + e^(− s), 2)$] and #math.equation(block: false, alt: "sinh s equals the fraction e to the power s minus e to the power minus s over 2")[$sinh s = frac(e^(s) − e^(− s), 2)$], we can also write the general solution as #math.equation(block: true, alt: "y equals D sub 1 cosh open parenthesis k x close parenthesis plus D sub 2 sinh open parenthesis k x close parenthesis .")[$y = D_(1) cosh ( k x ) + D_(2) sinh ( k x ) .$] ] ] #examplebox("Example 2")[][ Find the general solution of #math.equation(block: true, alt: "y double prime minus 8 y prime plus 16 y equals 0")[$y^(″) − 8 y^(′) + 16 y = 0$] #solutionbox[ The characteristic equation is #math.equation(block: false, alt: "r squared minus 8 r plus 16 equals open parenthesis r minus 4 close parenthesis squared equals 0")[$r^(2) − 8 r + 16 = attach(( r − 4 ), t: 2) = 0$]. The equation has a double root #math.equation(block: false, alt: "r sub 1 equals r sub 2 equals 4")[$r_(1) = r_(2) = 4$]. The general solution is, therefore, #math.equation(block: true, alt: "y equals open parenthesis C sub 1 plus C sub 2 x close parenthesis e to the power 4 x equals C sub 1 e to the power 4 x plus C sub 2 x e to the power 4 x")[$y = ( C_(1) + C_(2) x ) e^(4 x) = C_(1) e^(4 x) + C_(2) x e^(4 x)$] ] ] #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Linear Independence] Check that #math.equation(block: false, alt: "e to the power 4 x")[$e^(4 x)$]and #math.equation(block: false, alt: "x e to the power 4 x")[$x e^(4 x)$] #emph[are linearly independent.] Answer That #math.equation(block: false, alt: "e to the power 4 x")[$e^(4 x)$] solves the equation is clear. If #math.equation(block: false, alt: "x e to the power 4 x")[$x e^(4 x)$] solves the equation, then we know we are done. Let us compute #math.equation(block: false, alt: "y prime equals e to the power 4 x plus 4 x e to the power 4 x")[$y^(′) = e^(4 x) + 4 x e^(4 x)$] and #math.equation(block: false, alt: "y double prime equals 8 e to the power 4 x plus 16 x e to the power 4 x")[$y^(″) = 8 e^(4 x) + 16 x e^(4 x)$]. Plug in #math.equation(block: true, alt: "y double prime minus 8 y prime plus 16 y equals 8 e to the power 4 x plus 16 x e to the power 4 x minus 8 open parenthesis e to the power 4 x plus 4 x e to the power 4 x close parenthesis plus 16 x e to the power 4 x equals 0")[$y^(″) − 8 y^(′) + 16 y = 8 e^(4 x) + 16 x e^(4 x) − 8 ( e^(4 x) + 4 x e^(4 x) ) + 16 x e^(4 x) = 0$] We should note that in practice, doubled root rarely happens. If coefficients are picked truly randomly we are very unlikely to get a doubled root. ] Let us give a short proof for why the solution #math.equation(block: false, alt: "x e to the power r x")[$x e^(r x)$] 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 #math.equation(block: false, alt: "the fraction e to the power r 2 to the power x minus e to the power x 1 to the power x over r sub 2 minus r sub 1")[$frac(e^(r) 2^(x) − e^(x) 1^(x), r_(2) − r_(1))$] is a solution when the roots are distinct. When we take the limit as #math.equation(block: false, alt: "r sub 1")[$r_(1)$] goes to #math.equation(block: false, alt: "r sub 2")[$r_(2)$], we are really taking the derivative of #math.equation(block: false, alt: "e to the power r x")[$e^(r x)$] using #math.equation(block: false, alt: "r")[$r$] as the variable. Therefore, the limit is #math.equation(block: false, alt: "x e to the power r x")[$x e^(r x)$], 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 #math.equation(block: false, alt: "r squared plus 1 equals 0")[$r^(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, #math.equation(block: false, alt: "open parenthesis a , b close parenthesis")[$( a , b )$]. We can think of a complex number as a point in the plane. We add complex numbers in the straightforward way, #math.equation(block: false, alt: "open parenthesis a , b close parenthesis plus open parenthesis c , d close parenthesis equals open parenthesis a plus c , b plus d close parenthesis")[$( a , b ) + ( c , d ) = ( a + c , b + d )$]. We define multiplication by #math.equation(block: true, alt: "open parenthesis a , b close parenthesis times open parenthesis c , d close parenthesis equals def open parenthesis a c minus b d , a d plus b c close parenthesis .")[$( a , b ) × ( c , d ) limits(=)^("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 #math.equation(block: false, alt: "open parenthesis 0 , 1 close parenthesis times open parenthesis 0 , 1 close parenthesis equals open parenthesis minus 1 , 0 close parenthesis")[$( 0 , 1 ) × ( 0 , 1 ) = ( − 1 , 0 )$]. Generally we just write #math.equation(block: false, alt: "open parenthesis a , b close parenthesis")[$( a , b )$] as #math.equation(block: false, alt: "open parenthesis a plus i b close parenthesis")[$( a + i b )$], and we treat #math.equation(block: false, alt: "i")[$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 #math.equation(block: false, alt: "i squared equals minus 1")[$i^(2) = − 1$]. So whenever we see #math.equation(block: false, alt: "i squared")[$i^(2)$], we replace it by #math.equation(block: false, alt: "minus 1")[$− 1$]. The numbers #math.equation(block: false, alt: "i")[$i$] and #math.equation(block: false, alt: "minus i")[$− i$] are the two roots of #math.equation(block: false, alt: "r squared plus 1 equals 0")[$r^(2) + 1 = 0$]. Note that engineers often use the letter #math.equation(block: false, alt: "j")[$j$] instead of #math.equation(block: false, alt: "i")[$i$] for the square root of #math.equation(block: false, alt: "minus 1")[$− 1$]. We will use the mathematicians’ convention and use #math.equation(block: false, alt: "i")[$i$]. #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Make sure you understand (that you can justify) the following identities: + #math.equation(block: false, alt: "i squared equals minus 1 , i cubed equals minus 1 , i to the power 4 equals 1")[$i^(2) = − 1 , i^(3) = − 1 , i^(4) = 1$], + #math.equation(block: false, alt: "the fraction 1 over i equals minus i")[$frac(1, i) = − i$], + #math.equation(block: false, alt: "open parenthesis 3 minus 7 i close parenthesis open parenthesis minus 2 minus 9 i close parenthesis equals and so on equals minus 69 minus 13 i")[$( 3 − 7 i ) ( − 2 − 9 i ) = … = − 69 − 13 i$], + #math.equation(block: false, alt: "open parenthesis 3 minus 2 i close parenthesis open parenthesis 3 plus 2 i close parenthesis equals 3 squared minus open parenthesis 2 i close parenthesis squared equals 3 squared plus 2 squared equals 13")[$( 3 − 2 i ) ( 3 + 2 i ) = 3^(2) − attach(( 2 i ), t: 2) = 3^(2) + 2^(2) = 13$], + #math.equation(block: false, alt: "the fraction 1 over 3 minus 2 i equals the fraction 1 over 3 minus 2 i the fraction 3 plus 2 i over 3 plus 2 i equals the fraction 3 plus 2 i over 13 equals the fraction 3 over 13 plus the fraction 2 over 13 i")[$frac(1, 3 − 2 i) = frac(1, 3 − 2 i) frac(3 + 2 i, 3 + 2 i) = frac(3 + 2 i, 13) = frac(3, 13) + frac(2, 13) i$]. ] We can also define the exponential #math.equation(block: false, alt: "e to the power a plus i b")[$e^(a + i b)$] 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: #math.equation(block: false, alt: "e to the power x plus y equals e to the power x e to the power y")[$e^(x + y) = e^(x) e^(y)$]. This means that #math.equation(block: false, alt: "e to the power a plus i b equals e to the power a e to the power i b")[$e^(a + i b) = e^(a) e^(i b)$]. Hence if we can compute #math.equation(block: false, alt: "e to the power i b")[$e^(i b)$], we can compute #math.equation(block: false, alt: "e to the power a plus i b")[$e^(a + i b)$]. For #math.equation(block: false, alt: "e to the power i b")[$e^(i b)$] we use the so-called Euler’s formula. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #strong[Euler's Formula] #math.equation(block: true, alt: "e to the power i θ equals cos θ plus i sin θ a n d e to the power minus i θ equals cos θ minus i sin θ")[$e^(i θ) = cos θ + i sin θ #h(1em) " " italic(a) italic(n) italic(d) " " #h(1em) e^(− i θ) = cos θ − i sin θ$] In other words, #math.equation(block: false, alt: "e to the power a plus i b equals e to the power a open parenthesis cos open parenthesis b close parenthesis plus i sin open parenthesis b close parenthesis close parenthesis equals e to the power a cos open parenthesis b close parenthesis plus i e to the power a sin open parenthesis b close parenthesis")[$e^(a + i b) = e^(a) ( cos ( b ) + i sin ( b ) ) = e^(a) cos ( b ) + i e^(a) sin ( b )$]. ] #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Using Euler’s formula, check the identities: #math.equation(block: true, alt: "cos θ equals the fraction e to the power i θ plus e to the power minus i θ over 2 and sin θ equals the fraction e to the power i θ minus e to the power minus i θ over 2 i")[$cos θ = frac(e^(i θ) + e^(− i θ), 2) #h(1em) "and" #h(1em) sin θ = frac(e^(i θ) − e^(− i θ), 2 i)$] ] #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Double angle identities: Start with #math.equation(block: false, alt: "e to the power i open parenthesis 2 θ close parenthesis equals open parenthesis e to the power i θ close parenthesis squared")[$e^(i ( 2 θ )) = attach(( e^(i θ) ), t: 2)$]. Use Euler on each side and deduce: Answer #math.equation(block: true, alt: "cos open parenthesis 2 θ close parenthesis equals cos squared θ minus sin squared θ and sin open parenthesis 2 θ close parenthesis equals 2 sin θ cos θ")[$cos ( 2 θ ) = cos^(2) θ − sin^(2) θ #h(1em) "and" #h(1em) sin ( 2 θ ) = 2 sin θ cos θ$] For a complex number #math.equation(block: false, alt: "a plus i b")[$a + i b$] we call #math.equation(block: false, alt: "a")[$a$] the real part and #math.equation(block: false, alt: "b")[$b$] the imaginary part of the number. Often the following notation is used, #math.equation(block: true, alt: "Re open parenthesis a plus i b close parenthesis equals a and Im open parenthesis a plus i b close parenthesis equals b")[$"Re" ( a + i b ) = a #h(1em) "and" #h(1em) "Im" ( a + i b ) = b$] ] === 2.2.3 Complex roots Suppose that the equation #math.equation(block: false, alt: "a y double prime plus b y prime plus c y equals 0")[$a y^(″) + b y^(′) + c y = 0$] has the characteristic equation #math.equation(block: false, alt: "a r squared plus b r plus c equals 0")[$a r^(2) + b r + c = 0$] that has complex roots. By the quadratic formula, the roots are #math.equation(block: false, alt: "the fraction minus b ± the square root of b squared minus 4 a c over 2 a")[$frac(− b ± sqrt(b^(2) − 4 a c), 2 a)$]. These roots are complex if #math.equation(block: false, alt: "b squared minus 4 a c less than 0")[$b^(2) − 4 a c < 0$]. In this case the roots are #math.equation(block: true, alt: "r sub 1 , r sub 2 equals the fraction minus b over 2 a ± i the fraction the square root of 4 a c minus b squared over 2 a")[$r_(1) , r_(2) = frac(− b, 2 a) ± i frac(sqrt(4 a c − b^(2)), 2 a)$] As you can see, we always get a pair of roots of the form #math.equation(block: false, alt: "α ± i β")[$α ± i β$]. In this case we can still write the solution as #math.equation(block: true, alt: "y equals C sub 1 e to the power open parenthesis α plus i β close parenthesis x plus C sub 2 e to the power open parenthesis α minus i β close parenthesis x")[$y = C_(1) e^(( α + i β ) x) + C_(2) e^(( α − i β ) x)$] However, the exponential is now complex valued. We would need to allow #math.equation(block: false, alt: "C sub 1")[$C_(1)$] and #math.equation(block: false, alt: "C sub 2")[$C_(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 #link("http://www.jirka.org/diffyqs/htmlver/diffyqsse11.html#x16-36005r2")[Euler’s formula]. Let #math.equation(block: true, alt: "y sub 1 equals e to the power open parenthesis α plus i β close parenthesis x and y sub 2 equals e to the power open parenthesis α minus i β close parenthesis x")[$y_(1) = e^(( α + i β ) x) #h(1em) "and" #h(1em) y_(2) = e^(( α − i β ) x)$] Then note that #math.equation(block: true, alt: "y sub 1 equals e to the power a x cos open parenthesis β x close parenthesis plus i e to the power a x sin open parenthesis β x close parenthesis; y sub 2 equals e to the power a x cos open parenthesis β x close parenthesis minus i e to the power a x sin open parenthesis β x close parenthesis")[$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, #math.equation(block: true, alt: "y sub 3 equals the fraction y sub 1 plus y sub 2 over 2 equals e to the power a x cos open parenthesis β x close parenthesis; y sub 4 equals the fraction y sub 1 minus y sub 2 over 2 i equals e to the power a x sin open parenthesis β x close parenthesis")[$y_(3) = frac(y_(1) + y_(2), 2) = e^(a x) cos ( β x ) \ y_(4) = frac(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. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ For the homegneous second order ODE #math.equation(block: true, alt: "a y double prime plus b y prime plus c y equals 0")[$a y^(″) + b y^(′) + c y = 0$] If the characteristic equation has the roots #math.equation(block: false, alt: "α ± i β")[$α ± i β$] (when #math.equation(block: false, alt: "b squared minus 4 a c less than 0")[$b^(2) − 4 a c < 0$]), then the general solution is #math.equation(block: true, alt: "y equals C sub 1 e to the power a x cos open parenthesis β x close parenthesis plus C sub 2 e to the power a x sin open parenthesis β x close parenthesis")[$y = C_(1) e^(a x) cos ( β x ) + C_(2) e^(a x) sin ( β x )$] ] #examplebox("Example 3")[][ Find the general solution of #math.equation(block: false, alt: "y double prime plus k squared y equals 0")[$y^(″) + k^(2) y = 0$], for a constant #math.equation(block: false, alt: "k greater than 0")[$k > 0$]. #solutionbox[ The characteristic equation is #math.equation(block: false, alt: "r squared plus k squared equals 0")[$r^(2) + k^(2) = 0$]. Therefore, the roots are #math.equation(block: false, alt: "r equals ± i k")[$r = ± i k$] and by the theorem we have the general solution #math.equation(block: true, alt: "y equals C sub 1 cos open parenthesis k x close parenthesis plus C sub 2 sin open parenthesis k x close parenthesis")[$y = C_(1) cos ( k x ) + C_(2) sin ( k x )$] ] ] #examplebox("Example 4")[][ Find the solution of #math.equation(block: false, alt: "y double prime minus 6 y prime plus 13 y equals 0 , y open parenthesis 0 close parenthesis equals 0 , y prime open parenthesis 0 close parenthesis equals 10 .")[$y^(″) − 6 y^(′) + 13 y = 0 , y ( 0 ) = 0 , y^(′) ( 0 ) = 10 .$] #solutionbox[ The characteristic equation is #math.equation(block: false, alt: "r squared minus 6 r plus 13 equals 0")[$r^(2) − 6 r + 13 = 0$]. By completing the square we get #math.equation(block: false, alt: "open parenthesis r minus 3 close parenthesis squared plus 2 squared equals 0")[$attach(( r − 3 ), t: 2) + 2^(2) = 0$] and hence the roots are #math.equation(block: false, alt: "r equals 3 ± 2 i")[$r = 3 ± 2 i$]. By the theorem we have the general solution #math.equation(block: true, alt: "y equals C sub 1 e to the power 3 x cos open parenthesis 2 x close parenthesis plus C sub 2 e to the power 3 x sin open parenthesis 2 x close parenthesis")[$y = C_(1) e^(3 x) cos ( 2 x ) + C_(2) e^(3 x) sin ( 2 x )$] To find the solution satisfying the initial conditions, we first plug in zero to get #math.equation(block: true, alt: "0 equals y open parenthesis 0 close parenthesis equals C sub 1 e to the power 0 cos 0 plus C sub 2 e to the power 0 sin 0 equals C sub 1")[$0 = y ( 0 ) = C_(1) e^(0) cos 0 + C_(2) e^(0) sin 0 = C_(1)$] Hence #math.equation(block: false, alt: "C sub 1 equals 0")[$C_(1) = 0$] and #math.equation(block: false, alt: "y equals C sub 2 e to the power 3 x sin open parenthesis 2 x close parenthesis")[$y = C_(2) e^(3 x) sin ( 2 x )$]. We differentiate #math.equation(block: true, alt: "y prime equals 3 C sub 2 e to the power 3 x sin open parenthesis 2 x close parenthesis plus 2 C sub 2 e to the power 3 x cos open parenthesis 2 x close parenthesis")[$y^(′) = 3 C_(2) e^(3 x) sin ( 2 x ) + 2 C_(2) e^(3 x) cos ( 2 x )$] We again plug in the initial condition and obtain #math.equation(block: false, alt: "10 equals y prime open parenthesis 0 close parenthesis equals 2 C sub 2")[$10 = y^(′) ( 0 ) = 2 C_(2)$], or #math.equation(block: false, alt: "C sub 2 equals 5")[$C_(2) = 5$]. Hence the solution we are seeking is #math.equation(block: true, alt: "y equals 5 e to the power 3 x sin open parenthesis 2 x close parenthesis")[$y = 5 e^(3 x) sin ( 2 x )$] ] ] === 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: #emph[ansatz], German for “initial placement of a tool at a work piece.” Yes, the Germans have a word for that.