#set document(title: "2.1 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.1#h(0.6em)Second order linear ODEs Let us consider the general second order linear differential equation #math.equation(block: true, alt: "A open parenthesis x close parenthesis y double prime plus B open parenthesis x close parenthesis y prime plus C open parenthesis x close parenthesis y equals F open parenthesis x close parenthesis .")[$A ( x ) y^(″) + B ( x ) y^(′) + C ( x ) y = F ( x ) .$] We usually divide through by #math.equation(block: false, alt: "A open parenthesis x close parenthesis")[$A ( x )$] to get #math.equation(block: true, alt: "y double prime plus p open parenthesis x close parenthesis y prime plus q open parenthesis x close parenthesis y equals f open parenthesis x close parenthesis ,")[$y^(″) + p ( x ) y^(′) + q ( x ) y = f ( x ) ,$] where #math.equation(block: false, alt: "p open parenthesis x close parenthesis equals the fraction B open parenthesis x close parenthesis over A open parenthesis x close parenthesis")[$p ( x ) = frac(B ( x ), A ( x ))$], #math.equation(block: false, alt: "q open parenthesis x close parenthesis equals the fraction C open parenthesis x close parenthesis over A open parenthesis x close parenthesis")[$q ( x ) = frac(C ( x ), A ( x ))$], and #math.equation(block: false, alt: "f open parenthesis x close parenthesis equals the fraction F open parenthesis x close parenthesis over A open parenthesis x close parenthesis")[$f ( x ) = frac(F ( x ), A ( x ))$]. The word #emph[linear]means that the equation contains no powers nor functions of #math.equation(block: false, alt: "y")[$y$], #math.equation(block: false, alt: "y prime")[$y^(′)$], and #math.equation(block: false, alt: "y double prime")[$y^(″)$]. In the special case when #math.equation(block: false, alt: "f open parenthesis x close parenthesis equals 0")[$f ( x ) = 0$] we have a so-called #emph[homogeneous equation] #math.equation(block: true, alt: "y double prime plus p open parenthesis x close parenthesis y prime plus q open parenthesis x close parenthesis y equals 0 ,")[$y^(″) + p ( x ) y^(′) + q ( x ) y = 0 ,$] We have already seen some second order linear homogeneous equations: #math.equation(block: true, alt: "y double prime plus k squared y equals 0 Two solutions are: y sub 1 equals cos open parenthesis k x close parenthesis , y sub 2 equals sin open parenthesis k x close parenthesis .; y double prime minus k squared y equals 0 Two solutions are: y sub 1 equals e to the power k x , y sub 2 equals e to the power minus k x .")[$y^(″) + k^(2) y = 0 "Two solutions are:" y_(1) = cos ( k x ) , #h(1em) y_(2) = sin ( k x ) . \ y^(″) − k^(2) y = 0 "Two solutions are:" y_(1) = e^(k x) , #h(1em) y_(2) = e^(− k x) .$] If we know two solutions of a linear homogeneous equation, we know a lot more of them. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Superposition] Suppose #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] are two solutions of the homogeneous equation (2.1.1). Then #math.equation(block: true, alt: "y open parenthesis x close parenthesis equals C sub 1 y sub 1 open parenthesis x close parenthesis plus C sub 2 y sub 2 open parenthesis x close parenthesis ,")[$y ( x ) = C_(1) y_(1) ( x ) + C_(2) y_(2) ( x ) ,$] also solves (2.1.1) for arbitrary constants #math.equation(block: false, alt: "C sub 1")[$C_(1)$] and #math.equation(block: false, alt: "C sub 2")[$C_(2)$]. ] That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We call the expression #math.equation(block: false, alt: "C sub 1 y sub 1 plus C sub 2 y sub 2")[$C_(1) y_(1) + C_(2) y_(2)$] a#emph[linear combination]of #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$]. Let us prove this theorem; the proof is very enlightening and illustrates how linear equations work. Proof Let #math.equation(block: false, alt: "y equals C sub 1 y sub 1 plus C sub 2 y sub 2")[$y = C_(1) y_(1) + C_(2) y_(2)$]. Then #math.equation(block: true, alt: "y double prime plus p y prime plus q y equals open parenthesis C sub 1 y sub 1 plus C sub 2 y sub 2 close parenthesis double prime plus p open parenthesis C sub 1 y sub 1 plus C sub 2 y sub 2 close parenthesis prime plus q open parenthesis C sub 1 y sub 1 plus C sub 2 y sub 2 close parenthesis; equals C sub 1 y 1 ″ plus C sub 2 y 2 ″ plus C sub 1 p y 1 ′ plus C sub 2 p y 2 ′ plus C sub 1 q y sub 1 plus C sub 2 q y sub 2; equals C sub 1 open parenthesis y 1 ″ plus p y 1 ′ plus q y sub 1 close parenthesis plus C sub 2 open parenthesis y 2 ″ plus p y 2 ′ plus q y sub 2 close parenthesis; equals C sub 1 .0 plus C sub 2 .0 equals 0")[$y^(″) + p y^(′) + q y = ( C_(1) y_(1) + C_(2) y_(2) )^(″) + p ( C_(1) y_(1) + C_(2) y_(2) )^(′) + q ( C_(1) y_(1) + C_(2) y_(2) ) \ = C_(1) y_(1)^(″) + C_(2) y_(2)^(″) + C_(1) p y_(1)^(′) + C_(2) p y_(2)^(′) + C_(1) q y_(1) + C_(2) q y_(2) \ = C_(1) ( y_(1)^(″) + p y_(1)^(′) + q y_(1) ) + C_(2) ( y_(2)^(″) + p y_(2)^(′) + q y_(2) ) \ = C_(1) ".0" + C_(2) ".0" = 0$] The proof becomes even simpler to state if we use the operator notation. An #emph[operator]is an object that eats functions and spits out functions (kind of like what a function, which eats numbers and spits out numbers). Define the operator #math.equation(block: false, alt: "L")[$L$] by #math.equation(block: true, alt: "L y equals y double prime plus p y prime plus q y .")[$L y = y^(″) + p y^(′) + q y .$] The differential equation now becomes #math.equation(block: false, alt: "L y equals 0")[$L y = 0$]. The operator (and the equation) #math.equation(block: false, alt: "L")[$L$] being linear means that #math.equation(block: false, alt: "L open parenthesis C sub 1 y sub 1 plus C sub 2 y sub 2 close parenthesis equals C sub 1 L y sub 1 plus C sub 2 L y sub 2")[$L ( C_(1) y_(1) + C_(2) y_(2) ) = C_(1) L y_(1) + C_(2) L y_(2)$]. The proof above becomes #math.equation(block: true, alt: "L y equals L open parenthesis C sub 1 y sub 1 plus C sub 2 y sub 2 close parenthesis equals C sub 1 L y sub 1 plus C sub 2 L y sub 2 equals C sub 1 .0 plus C sub 2 .0 equals 0")[$L y = L ( C_(1) y_(1) + C_(2) y_(2) ) = C_(1) L y_(1) + C_(2) L y_(2) = C_(1) ".0" + C_(2) ".0" = 0$] Two different solutions to the second equation #math.equation(block: false, alt: "y double prime minus k squared y equals 0")[$y^(″) − k^(2) y = 0$] are #math.equation(block: false, alt: "y sub 1 equals cosh open parenthesis k x close parenthesis")[$y_(1) = cosh ( k x )$] and #math.equation(block: false, alt: "y sub 2 equals sinh open parenthesis k x close parenthesis")[$y_(2) = sinh ( k x )$]. Let us remind ourselves of the definition, #math.equation(block: false, alt: "cosh x equals the fraction e to the power x plus e to the power minus x over 2")[$cosh x = frac(e^(x) + e^(− x), 2)$] and #math.equation(block: false, alt: "sinh x equals the fraction e to the power x minus e to the power minus x over 2")[$sinh x = frac(e^(x) − e^(− x), 2)$]. Therefore, these are solutions by superposition as they are linear combinations of the two exponential solutions. The functions #math.equation(block: false, alt: "sinh")[$sinh$] and #math.equation(block: false, alt: "cosh")[$cosh$] are sometimes more convenient to use than the exponential. Let us review some of their properties. #math.equation(block: true, alt: "cosh 0 equals 1 sinh 0 equals 0 ,; the fraction d over d x [ cosh x ] equals sinh x , the fraction d over d x [ sinh x ] equals cosh x ,; cosh squared x minus sinh squared x equals 1 .")[$cosh 0 = 1 #h(1em) sinh 0 = 0 , \ frac(d, d x) [ cosh x ] = sinh x , #h(1em) frac(d, d x) [ sinh x ] = cosh x , \ cosh^(2) x − sinh^(2) x = 1 .$] #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Derive these properties using the definitions of #math.equation(block: false, alt: "sinh")[$sinh$] and #math.equation(block: false, alt: "cosh")[$cosh$] in terms of exponentials. Linear equations have nice and simple answers to the existence and uniqueness question. ] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Existence and Uniqueness] Suppose #math.equation(block: false, alt: "p open parenthesis x close parenthesis")[$p ( x )$], #math.equation(block: false, alt: "q open parenthesis x close parenthesis")[$q ( x )$], and #math.equation(block: false, alt: "f open parenthesis x close parenthesis")[$f ( x )$] are continuous functions on some interval #math.equation(block: false, alt: "I")[$I$] containing #math.equation(block: false, alt: "a")[$a$] with #math.equation(block: false, alt: "a")[$a$], #math.equation(block: false, alt: "b sub 0")[$b_(0)$] and #math.equation(block: false, alt: "b sub 1")[$b_(1)$] constants. The equation #math.equation(block: true, alt: "y double prime plus p open parenthesis x close parenthesis y prime plus q open parenthesis x close parenthesis y equals f open parenthesis x close parenthesis .")[$y^(″) + p ( x ) y^(′) + q ( x ) y = f ( x ) .$] has exactly #emph[one]solution #math.equation(block: false, alt: "y open parenthesis x close parenthesis")[$y ( x )$] defined on the same interval #math.equation(block: false, alt: "I")[$I$] satisfying the initial conditions #math.equation(block: true, alt: "y open parenthesis a close parenthesis equals b sub 0 , y prime open parenthesis a close parenthesis equals b sub 1 .")[$y ( a ) = b_(0) , #h(1em) y^(′) ( a ) = b_(1) .$] ] For example, the equation #math.equation(block: false, alt: "y double prime plus k squared y equals 0")[$y^(″) + k^(2) y = 0$] with #math.equation(block: false, alt: "y open parenthesis 0 close parenthesis equals b sub 0")[$y ( 0 ) = b_(0)$] and #math.equation(block: false, alt: "y prime open parenthesis 0 close parenthesis equals b sub 1")[$y^(′) ( 0 ) = b_(1)$] has the solution #math.equation(block: true, alt: "y open parenthesis x close parenthesis equals b sub 0 cos open parenthesis k x close parenthesis plus the fraction b sub 1 over k sin open parenthesis k x close parenthesis")[$y ( x ) = b_(0) cos ( k x ) + frac(b_(1), k) sin ( k x )$] The equation #math.equation(block: false, alt: "y double prime minus k squared y equals 0")[$y^(″) − k^(2) y = 0$] with #math.equation(block: false, alt: "y open parenthesis 0 close parenthesis equals b sub 0")[$y ( 0 ) = b_(0)$] and #math.equation(block: false, alt: "y prime open parenthesis 0 close parenthesis equals b sub 1")[$y^(′) ( 0 ) = b_(1)$] has the solution #math.equation(block: true, alt: "y open parenthesis x close parenthesis equals b sub 0 cosh open parenthesis k x close parenthesis plus the fraction b sub 1 over k sinh open parenthesis k x close parenthesis")[$y ( x ) = b_(0) cosh ( k x ) + frac(b_(1), k) sinh ( k x )$] Using #math.equation(block: false, alt: "cosh")[$cosh$] and #math.equation(block: false, alt: "sinh")[$sinh$] in this solution allows us to solve for the initial conditions in a cleaner way than if we have used the exponentials. The initial conditions for a second order ODE consist of two equations. Common sense tells us that if we have two arbitrary constants and two equations, then we should be able to solve for the constants and find a solution to the differential equation satisfying the initial conditions. #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Suppose we find two different solutions #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] to the homogeneous equation (2.1.1). Can every solution be written (using superposition) in the form #math.equation(block: false, alt: "y equals C sub 1 y sub 1 plus C sub 2 y sub 2")[$y = C_(1) y_(1) + C_(2) y_(2)$]? Answer Answer is affirmative! Provided that #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] are different enough in the following sense. We will say #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] are linearly independent if one is not a constant multiple of the other. ] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Let #math.equation(block: false, alt: "p open parenthesis x close parenthesis")[$p ( x )$] and #math.equation(block: false, alt: "q open parenthesis x close parenthesis")[$q ( x )$] be continuous functions and let #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] be two linearly independent solutions to the homogeneous equation (2.1.1). Then every other solution is of the form #math.equation(block: true, alt: "y equals C sub 1 y sub 1 plus C sub 2 y sub 2 .")[$y = C_(1) y_(1) + C_(2) y_(2) .$] That is, #math.equation(block: false, alt: "y equals C sub 1 y sub 1 plus C sub 2 y sub 2")[$y = C_(1) y_(1) + C_(2) y_(2)$] is the general solution. ] For example, we found the solutions #math.equation(block: false, alt: "y sub 1 equals sin x")[$y_(1) = sin x$] and #math.equation(block: false, alt: "y sub 2 equals cos x")[$y_(2) = cos x$] for the equation #math.equation(block: false, alt: "y double prime plus y equals 0")[$y^(″) + y = 0$]. It is not hard to see that sine and cosine are not constant multiples of each other. If #math.equation(block: false, alt: "sin x equals A cos x")[$sin x = A cos x$] for some constant #math.equation(block: false, alt: "A")[$A$], we let #math.equation(block: false, alt: "x equals 0")[$x = 0$] and this would imply #math.equation(block: false, alt: "A equals 0")[$A = 0$]. But then #math.equation(block: false, alt: "sin x equals 0")[$sin x = 0$] for all #math.equation(block: false, alt: "x")[$x$], which is preposterous. So #math.equation(block: false, alt: "y sub 1")[$y_(1)$] and #math.equation(block: false, alt: "y sub 2")[$y_(2)$] are linearly independent. Hence, #math.equation(block: true, alt: "y equals C sub 1 cos x plus C sub 2 sin x")[$y = C_(1) cos x + C_(2) sin x$] is the general solution to #math.equation(block: false, alt: "y double prime plus y equals 0")[$y^(″) + y = 0$]. For two functions, checking linear independence is rather simple. Let us see another example. Consider #math.equation(block: false, alt: "y double prime minus 2 x to the power minus 2 y equals 0")[$y^(″) − 2 x^(− 2) y = 0$]. Then #math.equation(block: false, alt: "y sub 1 equals x squared")[$y_(1) = x^(2)$] and #math.equation(block: false, alt: "y sub 2 equals the fraction 1 over x")[$y_(2) = frac(1, x)$] are solutions. To see that they are linearly independent, suppose one is a multiple of the other: #math.equation(block: false, alt: "y sub 1 equals A y sub 2")[$y_(1) = A y_(2)$], we just have to find out that #math.equation(block: false, alt: "A")[$A$] cannot be a constant. In this case we have #math.equation(block: false, alt: "A equals the fraction y sub 1 over y sub 2 equals x cubed")[$A = frac(y_(1), y_(2)) = x^(3)$], this most decidedly not a constant. So #math.equation(block: false, alt: "y equals C sub 1 x squared plus C sub 2 the fraction 1 over x")[$y = C_(1) x^(2) + C_(2) frac(1, x)$] is the general solution. If you have one solution to a second order linear homogeneous equation, then you can find another one. This is the #emph[reduction of order method]. The idea is that if we somehow found #math.equation(block: false, alt: "y sub 1")[$y_(1)$] as a solution of #math.equation(block: false, alt: "y double prime plus p open parenthesis x close parenthesis y prime plus q open parenthesis x close parenthesis y equals 0")[$y^(″) + p ( x ) y^(′) + q ( x ) y = 0$] we try a second solution of the form #math.equation(block: false, alt: "y sub 2 open parenthesis x close parenthesis equals y sub 1 open parenthesis x close parenthesis v open parenthesis x close parenthesis")[$y_(2) ( x ) = y_(1) ( x ) v ( x )$]. We just need to find #math.equation(block: false, alt: "v")[$v$]. We plug #math.equation(block: false, alt: "y sub 2")[$y_(2)$] into the equation: #math.equation(block: true, alt: "0 equals y 2 ′ prime plus p open parenthesis x close parenthesis y 2 ′ plus q open parenthesis x close parenthesis y sub 2 equals y 1 ′ prime v plus 2 y 1 ′ v prime plus y sub 1 v double prime plus p open parenthesis x close parenthesis open parenthesis y 1 ′ v plus y sub 1 v prime close parenthesis plus q open parenthesis z close parenthesis y sub 1 v; equals y sub 1 v double prime plus open parenthesis 2 y 1 ′ plus p open parenthesis x close parenthesis y sub 1 close parenthesis v prime plus \\cancelto 0 open parenthesis y 1 ′ prime plus p open parenthesis x close parenthesis y 1 ′ plus q open parenthesis x close parenthesis y sub 1 close parenthesis v .")[$0 = y_(2)^(′)^(′) + p ( x ) y_(2)^(′) + q ( x ) y_(2) = y_(1)^(′)^(′) v + 2 y_(1)^(′) v^(′) + y_(1) v^(″) + p ( x ) ( y_(1)^(′) v + y_(1) v^(′) ) + q ( z ) y_(1) v \ = y_(1) v^(″) + ( 2 y_(1)^(′) + p ( x ) y_(1) ) v^(′) + "\\cancelto" 0 ( y_(1)^(′)^(′) + p ( x ) y_(1)^(′) + q ( x ) y_(1) ) v .$] In other words, #math.equation(block: false, alt: "y sub 1 v double prime plus open parenthesis 2 y 1 ′ plus p open parenthesis x close parenthesis y sub 1 close parenthesis v prime equals 0")[$y_(1) v^(″) + ( 2 y_(1)^(′) + p ( x ) y_(1) ) v^(′) = 0$]. Using #math.equation(block: false, alt: "w equals v prime")[$w = v^(′)$] we have the first order linear equation #math.equation(block: false, alt: "y sub 1 w prime plus open parenthesis 2 y 1 ′ plus p open parenthesis x close parenthesis y sub 1 close parenthesis w equals 0")[$y_(1) w^(′) + ( 2 y_(1)^(′) + p ( x ) y_(1) ) w = 0$]. After solving this equation for #math.equation(block: false, alt: "w")[$w$] (integrating factor), we find #math.equation(block: false, alt: "v")[$v$] by antidifferentiating #math.equation(block: false, alt: "w")[$w$]. We then form #math.equation(block: false, alt: "y sub 2")[$y_(2)$] by computing #math.equation(block: false, alt: "y sub 1 v")[$y_(1) v$]. For example, suppose we somehow know #math.equation(block: false, alt: "y sub 1 equals x")[$y_(1) = x$] is a solution to #math.equation(block: false, alt: "y double prime plus x to the power minus 1 y prime minus x to the power minus 2 y equals 0")[$y^(″) + x^(− 1) y^(′) − x^(− 2) y = 0$]. The equation for #math.equation(block: false, alt: "w")[$w$] is then #math.equation(block: false, alt: "x w prime plus 3 w equals 0")[$x w^(′) + 3 w = 0$]. We find a solution, #math.equation(block: false, alt: "w equals C x to the power minus 3")[$w = C x^(− 3)$], and we find an antiderivative #math.equation(block: false, alt: "v equals the fraction minus C over 2 x squared")[$v = frac(− C, 2 x^(2))$]. Hence #math.equation(block: false, alt: "y sub 2 equals y sub 1 v equals the fraction minus C over 2 x")[$y_(2) = y_(1) v = frac(− C, 2 x)$]. Any #math.equation(block: false, alt: "C")[$C$] works and so #math.equation(block: false, alt: "C equals minus 2")[$C = − 2$] makes #math.equation(block: false, alt: "y sub 2 equals the fraction 1 over x")[$y_(2) = frac(1, x)$]. Thus, the general solution is #math.equation(block: false, alt: "y equals C sub 1 x plus C sub 2 the fraction 1 over x")[$y = C_(1) x + C_(2) frac(1, x)$]. Since we have a formula for the solution to the first order linear equation, we can write a formula for #math.equation(block: false, alt: "y sub 2")[$y_(2)$]: #math.equation(block: true, alt: "y sub 2 open parenthesis x close parenthesis equals y sub 1 open parenthesis x close parenthesis ∫ the fraction e to the power minus ∫ p open parenthesis x close parenthesis d x over open parenthesis y sub 1 open parenthesis x close parenthesis close parenthesis squared d x")[$y_(2) ( x ) = y_(1) ( x ) ∫ frac(e^(− ∫ p ( x ) d x), attach(( y_(1) ( x ) ), t: 2)) d x$] However, it is much easier to remember that we just need to try #math.equation(block: false, alt: "y sub 2 open parenthesis x close parenthesis equals y sub 1 open parenthesis x close parenthesis v open parenthesis x close parenthesis")[$y_(2) ( x ) = y_(1) ( x ) v ( x )$] and find #math.equation(block: false, alt: "v open parenthesis x close parenthesis")[$v ( x )$] as we did above. Also, the technique works for higher order equations too: you get to reduce the order for each solution you find. So it is better to remember how to do it rather than a specific formula. We will study the solution of nonhomogeneous equations in #link("https://math.libretexts.org/Bookshelves/Differential_Equations/Differential_Equations_for_Engineers_(Lebl)/2%3A_Higher_order_linear_ODEs/2.5%3A_Nonhomogeneous_Equations")[Section 2.5]. We will first focus on finding general solutions to homogeneous equations.