#set document(title: "1.5 Substitution", 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")) == 1.5#h(0.6em)Substitution Just as when solving integrals, one method to try is to change variables to end up with a simpler equation to solve. === Substitution The equation #math.equation(block: true, alt: "y prime equals open parenthesis x minus y plus 1 close parenthesis squared")[$y^(′) = ( x − y + 1 )^(2)$] is neither separable nor linear. What can we do? How about trying to change variables, so that in the new variables the equation is simpler. We use another variable #math.equation(block: false, alt: "v")[$v$], which we treat as a function of #math.equation(block: false, alt: "x")[$x$]. Let us try #math.equation(block: true, alt: "v equals x minus y plus 1 .")[$v = x − y + 1 .$] We need to figure out #math.equation(block: false, alt: "y prime")[$y^(′)$] in terms of #math.equation(block: false, alt: "v prime")[$v^(′)$], #math.equation(block: false, alt: "v")[$v$] and #math.equation(block: false, alt: "x")[$x$]. We differentiate (in #math.equation(block: false, alt: "x")[$x$]) to obtain #math.equation(block: false, alt: "v prime equals 1 minus y prime")[$v^(′) = 1 − y^(′)$]. So #math.equation(block: false, alt: "y prime equals 1 minus v prime")[$y^(′) = 1 − v^(′)$]. We plug this into the equation to get #math.equation(block: true, alt: "1 minus v prime equals v squared")[$1 − v^(′) = v^(2)$] In other words, #math.equation(block: false, alt: "v prime equals 1 minus v squared")[$v^(′) = 1 − v^(2)$]. Such an equation we know how to solve by separating variables: #math.equation(block: true, alt: "the fraction 1 over 1 minus v squared d v equals d x")[$frac(1, 1 − v^(2)) d v = d x$] So #math.equation(block: true, alt: "the fraction 1 over 2 ln | the fraction v plus 1 over v minus 1 | equals x plus C , or | the fraction v plus 1 over v minus 1 | equals e to the power 2 x plus 2 C , or the fraction v plus 1 over v minus 1 equals D e to the power 2 x ,")[$frac(1, 2) ln | frac(v + 1, v − 1) | = x + C , #h(1em) "or" #h(1em) | frac(v + 1, v − 1) | = e^(2 x + 2 C) , #h(1em) "or" #h(1em) frac(v + 1, v − 1) = D e^(2 x) ,$] for some constant #math.equation(block: false, alt: "D")[$D$]. Note that #math.equation(block: false, alt: "v equals 1")[$v = 1$] and #math.equation(block: false, alt: "v equals minus 1")[$v = − 1$] are also solutions. Now we need to “unsubstitute” to obtain #math.equation(block: true, alt: "the fraction x minus y plus 2 over x minus y equals D e to the power 2 x")[$frac(x − y + 2, x − y) = D e^(2 x)$] and also the two solutions #math.equation(block: false, alt: "x minus y plus 1 equals 1")[$x − y + 1 = 1$] or #math.equation(block: false, alt: "y equals x")[$y = x$], and #math.equation(block: false, alt: "x minus y plus 1 equals minus 1")[$x − y + 1 = − 1$] or #math.equation(block: false, alt: "y equals x plus 2")[$y = x + 2$]. We solve the first equation for #math.equation(block: false, alt: "y")[$y$]. #math.equation(block: true, alt: "x minus y plus 2 equals open parenthesis x minus y close parenthesis D e to the power 2 x ,; x minus y plus 2 equals D x e to the power 2 x minus y D e to the power 2 x ,; minus y plus y D e to the power 2 x equals D x e to the power 2 x minus x minus 2 ,; y open parenthesis minus 1 plus D e to the power 2 x close parenthesis equals D x e to the power 2 x minus x minus 2 ,; y equals the fraction D x e to the power 2 x minus x minus 2 over D e to the power 2 x minus 1 .")[$x − y + 2 = ( x − y ) D e^(2 x) , \ x − y + 2 = D x e^(2 x) − y D e^(2 x) , \ − y + y D e^(2 x) = D x e^(2 x) − x − 2 , \ y ( − 1 + D e^(2 x) ) = D x e^(2 x) − x − 2 , \ y = frac(D x e^(2 x) − x − 2, D e^(2 x) − 1) .$] Note that #math.equation(block: false, alt: "D equals 0")[$D = 0$] gives #math.equation(block: false, alt: "y equals x plus 2")[$y = x + 2$], but no value of #math.equation(block: false, alt: "D")[$D$] gives the solution #math.equation(block: false, alt: "y equals x")[$y = x$]. Substitution in differential equations is applied in much the same way that it is applied in calculus. You guess. Several different substitutions might work. There are some general things to look for. We summarize a few of these in a table. #figure(table( columns: 2, align: left, inset: 6pt, table.header([#strong[When you see]], [#strong[Try substituting]]), [#math.equation(block: false, alt: "y y prime")[$y y^(′)$]], [#math.equation(block: false, alt: "v equals y squared")[$v = y^(2)$]], [#math.equation(block: false, alt: "y squared y prime")[$y^(2) y^(′)$]], [#math.equation(block: false, alt: "v equals y cubed")[$v = y^(3)$]], [#math.equation(block: false, alt: "open parenthesis cos y close parenthesis y prime")[$( cos y ) y^(′)$]], [#math.equation(block: false, alt: "v equals sin y")[$v = sin y$]], [#math.equation(block: false, alt: "open parenthesis sin y close parenthesis y prime")[$( sin y ) y^(′)$]], [#math.equation(block: false, alt: "v equals cos y")[$v = cos y$]], [#math.equation(block: false, alt: "y prime e to the power y")[$y^(′) e^(y)$]], [#math.equation(block: false, alt: "v equals e to the power y")[$v = e^(y)$]], )) Usually you try to substitute in the “most complicated” part of the equation with the hopes of simplifying it. The above table is just a rule of thumb. You might have to modify your guesses. If a substitution does not work (it does not make the equation any simpler), try a different one. === Bernoulli Equations There are some forms of equations where there is a general rule for substitution that always works. One such example is the so-called Bernoulli equation.#math.equation(block: false, alt: "to the power 1")[$1$] #math.equation(block: true, alt: "y prime plus p open parenthesis x close parenthesis y equals q open parenthesis x close parenthesis y to the power n")[$y^(′) + p ( x ) y = q ( x ) y^(n)$] This equation looks a lot like a linear equation except for the #math.equation(block: false, alt: "y to the power n")[$y^(n)$]. If #math.equation(block: false, alt: "n equals 0")[$n = 0$] or #math.equation(block: false, alt: "n equals 1")[$n = 1$], then the equation is linear and we can solve it. Otherwise, the substitution #math.equation(block: false, alt: "v equals y to the power 1 minus n")[$v = y^(1 − n)$] transforms the Bernoulli equation into a linear equation. Note that #math.equation(block: false, alt: "n")[$n$] need not be an integer. #examplebox("Example 1")[Bernoulli Equation][ Solve #math.equation(block: true, alt: "x y prime plus y open parenthesis x plus 1 close parenthesis plus x y to the power 5 equals 0 , y open parenthesis 1 close parenthesis equals 1")[$x y^(′) + y ( x + 1 ) + x y^(5) = 0 , " " " " y ( 1 ) = 1$] #solutionbox[ First, the equation is Bernoulli #math.equation(block: false, alt: "p open parenthesis x close parenthesis equals the fraction x plus 1 over x")[$p ( x ) = frac(x + 1, x)$] ( and #math.equation(block: false, alt: "q open parenthesis x close parenthesis equals minus 1")[$q ( x ) = − 1$] ). We substitute #math.equation(block: true, alt: "v equals y to the power 1 minus 5 equals y to the power minus 4 , v prime equals minus 4 y to the power minus 5 y prime")[$v = y^(1 − 5) = y^(− 4) , #h(1em) v^(′) = − 4 y^(− 5) y^(′)$] In other words, #math.equation(block: false, alt: "open parenthesis the fraction minus 1 over 4 close parenthesis y to the power 5 v prime equals y prime")[$( frac(− 1, 4) ) y^(5) v^(′) = y^(′)$]. So #math.equation(block: true, alt: "x y prime plus y open parenthesis x plus 1 close parenthesis plus x y to the power 5 equals 0 ,; the fraction minus x y to the power 5 over 4 v prime plus y open parenthesis x plus 1 close parenthesis plus x y to the power 5 equals 0 ,; the fraction minus x over 4 v prime plus y to the power minus 4 open parenthesis x plus 1 close parenthesis plus x equals 0 ,; the fraction minus x over 4 v prime plus v open parenthesis x plus 1 close parenthesis plus x equals 0 ,")[$x y^(′) + y ( x + 1 ) + x y^(5) = 0 , \ frac(− x y^(5), 4) v^(′) + y ( x + 1 ) + x y^(5) = 0 , \ frac(− x, 4) v^(′) + y^(− 4) ( x + 1 ) + x = 0 , \ frac(− x, 4) v^(′) + v ( x + 1 ) + x = 0 ,$] and finally ] ] #math.equation(block: true, alt: "v prime minus the fraction 4 open parenthesis x plus 1 close parenthesis over x v equals 4")[$v^(′) − frac(4 ( x + 1 ), x) v = 4$] Now the equation is linear. We can use the integrating factor method. In particular, we use formula (1.4.17). Let us assume that #math.equation(block: false, alt: "x greater than 0")[$x > 0$] so #math.equation(block: false, alt: "| x | equals x")[$| x | = x$]. This assumption is OK, as our initial condition is #math.equation(block: false, alt: "x equals 1")[$x = 1$]. Let us compute the integrating factor. Here #math.equation(block: false, alt: "p open parenthesis s close parenthesis")[$p ( s )$] from formula (1.4.17) is #math.equation(block: false, alt: "the fraction minus 4 open parenthesis s plus 1 close parenthesis over s")[$frac(− 4 ( s + 1 ), s)$]. #math.equation(block: true, alt: "e to the power ∫ 1 x p open parenthesis s close parenthesis d s equals exp open parenthesis ∫ 1 x the fraction minus 4 open parenthesis s plus 1 close parenthesis over s d s close parenthesis equals e to the power minus 4 x minus 4 l n open parenthesis x close parenthesis plus 4 equals e to the power minus 4 x plus 4 x to the power minus 4 equals the fraction e to the power minus 4 x plus 4 over x to the power 4 ,; e to the power minus ∫ 1 x p open parenthesis s close parenthesis d s equals e to the power 4 x plus 4 l n open parenthesis x close parenthesis minus 4 equals e to the power 4 x minus 4 x to the power 4")[$e^(∫_(1)^(x) p ( s ) d s) = "exp" ( ∫_(1)^(x) frac(− 4 ( s + 1 ), s) d s ) = e^(− 4 x − 4 l n ( x ) + 4) = e^(− 4 x + 4) x^(− 4) = frac(e^(− 4 x + 4), x^(4)) , \ e^(− ∫_(1)^(x) p ( s ) d s) = e^(4 x + 4 l n ( x ) − 4) = e^(4 x − 4) x^(4)$] We now plug in to (1.4.17) #math.equation(block: true, alt: "v open parenthesis x close parenthesis equals e to the power minus ∫ 1 x p open parenthesis s close parenthesis d s open parenthesis ∫ 1 x e to the power ∫ 1 t p open parenthesis s close parenthesis d s 4 d t plus 1 close parenthesis ,; equals e to the power 4 x minus 4 x to the power 4 open parenthesis ∫ 1 x 4 the fraction e to the power minus 4 t plus 4 over t to the power 4 d t plus 1 close parenthesis")[$v ( x ) = e^(− ∫_(1)^(x) p ( s ) d s) ( ∫_(1)^(x) e^(∫_(1)^(t) p ( s ) d s) 4 d t + 1 ) , \ = e^(4 x − 4) x^(4) ( ∫_(1)^(x) 4 frac(e^(− 4 t + 4), t^(4)) d t + 1 )$] Note that the integral in this expression is not possible to find in closed form. As we said before, it is perfectly fine to have a definite integral in our solution. Now “unsubstitute” #math.equation(block: true, alt: "y to the power minus 4 equals e to the power 4 x minus 4 x to the power 4 open parenthesis 4 ∫ 1 x the fraction e to the power minus 4 t plus 4 over t to the power 4 d t plus 1 close parenthesis ,; y equals the fraction e to the power minus x plus 1 over x open parenthesis 4 ∫ 1 x the fraction e to the power minus 4 t plus 4 over t to the power 4 d t plus 1 close parenthesis to the power 1 / 4")[$y^(− 4) = e^(4 x − 4) x^(4) ( 4 ∫_(1)^(x) frac(e^(− 4 t + 4), t^(4)) d t + 1 ) , \ y = frac(e^(− x + 1), x attach(( 4 ∫_(1)^(x) frac(e^(− 4 t + 4), t^(4)) d t + 1 ), t: 1 / 4))$] === Homogeneous Equations Another type of equations we can solve by substitution are the so-called homogeneous equations. Suppose that we can write the differential equation as #math.equation(block: true, alt: "y prime equals F open parenthesis the fraction y over x close parenthesis")[$y^(′) = F ( frac(y, x) )$] Here we try the substitutions #math.equation(block: true, alt: "v equals the fraction y over x and therefore y prime equals v plus x v prime")[$v = frac(y, x) #h(1em) "and therefore" #h(1em) y^(′) = v + x v^(′)$] We note that the equation is transformed into #math.equation(block: true, alt: "v plus x v prime equals F open parenthesis v close parenthesis or x v prime equals F open parenthesis v close parenthesis minus v or the fraction v prime over F open parenthesis v close parenthesis minus v equals the fraction 1 over x")[$v + x v^(′) = F ( v ) #h(1em) "or" #h(1em) x v^(′) = F ( v ) − v #h(1em) "or" #h(1em) frac(v^(′), F ( v ) − v) = frac(1, x)$] Hence an implicit solution is #math.equation(block: true, alt: "∫ the fraction 1 over F open parenthesis v close parenthesis minus v d v equals ln | x | plus C")[$∫ frac(1, F ( v ) − v) d v = ln | x | + C$] #examplebox("Example 2")[][ Solve #math.equation(block: true, alt: "x squared y prime equals y squared plus x y , y open parenthesis 1 close parenthesis equals 1")[$x^(2) y^(′) = y^(2) + x y , #h(1em) y ( 1 ) = 1$] #solutionbox[ We put the equation into the form #math.equation(block: false, alt: "y prime equals open parenthesis the fraction y over x close parenthesis squared plus the fraction y over x")[$y^(′) = attach(( frac(y, x) ), t: 2) + frac(y, x)$]. We substitute #math.equation(block: false, alt: "v equals the fraction y over x")[$v = frac(y, x)$] to get the separable equation #math.equation(block: true, alt: "x v prime equals v squared plus v minus v equals v squared")[$x v^(′) = v^(2) + v − v = v^(2)$] #math.equation(block: true, alt: "v to the power minus 2 d v equals the fraction 1 over x d x")[$v^(− 2) d v = frac(1, x) d x$] which has a solution #math.equation(block: true, alt: "∫ the fraction 1 over v squared d v equals l n | x | plus C ,; the fraction minus 1 over v equals l n | x | plus C ,; v equals the fraction minus 1 over l n | x | plus C .")[$∫ frac(1, v^(2)) d v = l n | x | + C , \ frac(− 1, v) = l n | x | + C , \ v = frac(− 1, l n | x | + C) .$] We unsubstitute #math.equation(block: true, alt: "the fraction y over x equals the fraction minus 1 over l n | x | plus C ,; y equals the fraction minus x over l n | x | plus C")[$frac(y, x) = frac(− 1, l n | x | + C) , \ y = frac(− x, l n | x | + C)$] We want #math.equation(block: false, alt: "y open parenthesis 1 close parenthesis equals 1")[$y ( 1 ) = 1$], so #math.equation(block: true, alt: "1 equals y open parenthesis 1 close parenthesis equals the fraction minus 1 over l n | 1 | plus C equals the fraction minus 1 over C")[$1 = y ( 1 ) = frac(− 1, l n | 1 | + C) = frac(− 1, C)$] Thus #math.equation(block: false, alt: "C equals minus 1")[$C = − 1$] and the solution we are looking for is #math.equation(block: true, alt: "y equals the fraction minus x over l n | x | minus 1")[$y = frac(− x, l n | x | − 1)$] ] ] === Footnotes \[1\] There are several things called Bernoulli equations, this is just one of them. The Bernoullis were a prominent Swiss family of mathematicians. These particular equations are named for Jacob Bernoulli (1654–1705). - - #link("http://www.jirka.org/diffyqs/")[Jiří Lebl] (#link("http://www.math.okstate.edu/")[Oklahoma State University]).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.