#set document(title: "1.8 Exact Equations", 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.8#h(0.6em)Exact Equations Another type of equation that comes up quite often in physics and engineering is an #emph[exact equation]. Suppose #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis")[$F ( x , y )$] is a function of two variables, which we call the #emph[potential function]. The naming should suggest potential energy, or electric potential. Exact equations and potential functions appear when there is a conservation law at play, such as conservation of energy. Let us make up a simple example. Let #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals x squared plus y squared .")[$F ( x , y ) = x^(2) + y^(2) .$] We are interested in the lines of constant energy, that is lines where the energy is conserved; we want curves where #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals C")[$F ( x , y ) = C$], for some constant #math.equation(block: false, alt: "C")[$C$]. In our example, the curves #math.equation(block: false, alt: "x squared plus y squared equals C")[$x^(2) + y^(2) = C$] are circles. See Figure #math.equation(block: false, alt: "1")[$1$]. #figure(figph[Plot of four concentric blue circles centred on the origin, radii roughly 0.5, 3, 6 and 9, on axes about -13 to 13 by -10 to 10. They nest as closed level curves without touching.], alt: "Plot of four concentric blue circles centred on the origin, radii roughly 0.5, 3, 6 and 9, on axes about -13 to 13 by -10 to 10. They nest as closed level curves without touching.", caption: [Figure #math.equation(block: false, alt: "1")[$1$]: Solutions to #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals x squared plus y squared equals C")[$F ( x , y ) = x^(2) + y^(2) = C$] for various #math.equation(block: false, alt: "C")[$C$].]) We take the #emph[total derivative] of #math.equation(block: false, alt: "F")[$F$]: #math.equation(block: true, alt: "d F equals the fraction ∂ F over ∂ x d x plus the fraction ∂ F over ∂ y d y .")[$d F = frac(∂ F, ∂ x) d x + frac(∂ F, ∂ y) d y .$] For convenience, we will make use of the notation of #math.equation(block: false, alt: "F sub x equals the fraction ∂ F over ∂ x")[$F_(x) = frac(∂ F, ∂ x)$] and #math.equation(block: false, alt: "F sub y equals the fraction ∂ F over ∂ y")[$F_(y) = frac(∂ F, ∂ y)$]. In our example, #math.equation(block: true, alt: "d F equals 2 x d x plus 2 y d y .")[$d F = 2 x d x + 2 y d y .$] We apply the total derivative to #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals C")[$F ( x , y ) = C$], to find the differential equation #math.equation(block: false, alt: "d F equals 0")[$d F = 0$]. The differential equation we obtain in such a way has the form #math.equation(block: true, alt: "M d x plus N d y equals 0 , or M plus N the fraction d y over d x equals 0 .")[$M d x + N d y = 0 , #h(2em) "or" #h(2em) M + N frac(d y, d x) = 0 .$] An equation of this form is called #emph[exact] if it was obtained as #math.equation(block: false, alt: "d F equals 0")[$d F = 0$] for some potential function #math.equation(block: false, alt: "F")[$F$]. In our simple example, we obtain the equation #math.equation(block: true, alt: "2 x d x plus 2 y d y equals 0 , or 2 x plus 2 y the fraction d y over d x equals 0 .")[$2 x d x + 2 y d y = 0 , #h(2em) "or" #h(2em) 2 x + 2 y frac(d y, d x) = 0 .$] Since we obtained this equation by differentiating #math.equation(block: false, alt: "x squared plus y squared equals C")[$x^(2) + y^(2) = C$], the equation is exact. We often wish to solve for #math.equation(block: false, alt: "y")[$y$] in terms of #math.equation(block: false, alt: "x")[$x$]. In our example, #math.equation(block: true, alt: "y equals ± the square root of C squared minus x squared .")[$y = ± sqrt(C^(2) − x^(2)) .$] An interpretation of the setup is that at each point #math.equation(block: false, alt: "v → equals open parenthesis M , N close parenthesis")[$arrow(v) = ( M , N )$] is a vector in the plane, that is, a direction and a magnitude. As #math.equation(block: false, alt: "M")[$M$] and #math.equation(block: false, alt: "N")[$N$] are functions of #math.equation(block: false, alt: "open parenthesis x , y close parenthesis")[$( x , y )$], we have a #emph[vector field]. The particular vector field #math.equation(block: false, alt: "v →")[$arrow(v)$] that comes from an exact equation is a so-called #emph[conservative vector field], that is, a vector field that comes with a potential function #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis")[$F ( x , y )$], such that #math.equation(block: true, alt: "v → equals open parenthesis the fraction ∂ F over ∂ x , the fraction ∂ F over ∂ y close parenthesis .")[$arrow(v) = ( frac(∂ F, ∂ x) , frac(∂ F, ∂ y) ) .$] Let #math.equation(block: false, alt: "γ")[$γ$] be a path in the plane starting at #math.equation(block: false, alt: "open parenthesis x sub 1 , y sub 1 close parenthesis")[$( x_(1) , y_(1) )$] and ending at #math.equation(block: false, alt: "open parenthesis x sub 2 , y sub 2 close parenthesis")[$( x_(2) , y_(2) )$]. If we think of #math.equation(block: false, alt: "v →")[$arrow(v)$] as force, then the work required to move along #math.equation(block: false, alt: "γ")[$γ$] is #math.equation(block: true, alt: "∫ sub γ v → open parenthesis r → close parenthesis times d r → equals ∫ sub γ M d x plus N d y equals F open parenthesis x sub 2 , y sub 2 close parenthesis minus F open parenthesis x sub 1 , y sub 1 close parenthesis .")[$∫_(γ) arrow(v) ( arrow(r) ) · d arrow(r) = ∫_(γ) M d x + N d y = F ( x_(2) , y_(2) ) − F ( x_(1) , y_(1) ) .$] That is, the work done only depends on endpoints, that is where we start and where we end. For example, suppose #math.equation(block: false, alt: "F")[$F$] is gravitational potential. The derivative of #math.equation(block: false, alt: "F")[$F$] given by #math.equation(block: false, alt: "v →")[$arrow(v)$] is the gravitational force. What we are saying is that the work required to move a heavy box from the ground floor to the roof, only depends on the change in potential energy. That is, the work done is the same no matter what path we took; if we took the stairs or the elevator. Although if we took the elevator, the elevator is doing the work for us. The curves #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals C")[$F ( x , y ) = C$] are those where no work need be done, such as the heavy box sliding along without accelerating or breaking on a perfectly flat roof, on a cart with incredibly well oiled wheels. An exact equation is a conservative vector field, and the implicit solution of this equation is the potential function. === Solving exact equations Now you, the reader, should ask: Where did we solve a differential equation? Well, in applications we generally know #math.equation(block: false, alt: "M")[$M$] and #math.equation(block: false, alt: "N")[$N$], but we do not know #math.equation(block: false, alt: "F")[$F$]. That is, we may have just started with #math.equation(block: false, alt: "2 x plus 2 y the fraction d y over d x equals 0")[$2 x + 2 y frac(d y, d x) = 0$], or perhaps even #math.equation(block: true, alt: "x plus y the fraction d y over d x equals 0 .")[$x + y frac(d y, d x) = 0 .$] It is up to us to find some potential #math.equation(block: false, alt: "F")[$F$] that works. Many different #math.equation(block: false, alt: "F")[$F$] will work; adding a constant to #math.equation(block: false, alt: "F")[$F$] does not change the equation. Once we have a potential function #math.equation(block: false, alt: "F")[$F$], the equation #math.equation(block: false, alt: "F open parenthesis x , y open parenthesis x close parenthesis close parenthesis equals C")[$F ( x , y ( x ) ) = C$] gives an implicit solution of the ODE. #examplebox("Example 1")[][ Let us find the general solution to #math.equation(block: false, alt: "2 x plus 2 y the fraction d y over d x equals 0")[$2 x + 2 y frac(d y, d x) = 0$]. Forget we knew what #math.equation(block: false, alt: "F")[$F$] was. #solutionbox[ If we know that this is an exact equation, we start looking for a potential function #math.equation(block: false, alt: "F")[$F$]. We have #math.equation(block: false, alt: "M equals 2 x")[$M = 2 x$] and #math.equation(block: false, alt: "N equals 2 y")[$N = 2 y$]. If #math.equation(block: false, alt: "F")[$F$] exists, it must be such that #math.equation(block: false, alt: "F sub x open parenthesis x , y close parenthesis equals 2 x")[$F_(x) ( x , y ) = 2 x$]. Integrate in the #math.equation(block: false, alt: "x")[$x$] variable to find #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals x squared plus A open parenthesis y close parenthesis ,")[$F ( x , y ) = x^(2) + A ( y ) ,$] for some function #math.equation(block: false, alt: "A open parenthesis y close parenthesis")[$A ( y )$]. The function #math.equation(block: false, alt: "A")[$A$] is the "constant of integration," though it is only constant as far as #math.equation(block: false, alt: "x")[$x$] is concerned, and may still depend on #math.equation(block: false, alt: "y")[$y$]. Now differentiate (1.8.1) in #math.equation(block: false, alt: "y")[$y$] and set it equal to #math.equation(block: false, alt: "N")[$N$], which is what #math.equation(block: false, alt: "F sub y")[$F_(y)$] is supposed to be: #math.equation(block: true, alt: "2 y equals F sub y open parenthesis x , y close parenthesis equals A prime open parenthesis y close parenthesis .")[$2 y = F_(y) ( x , y ) = A^(′) ( y ) .$] Integrating, we find #math.equation(block: false, alt: "A open parenthesis y close parenthesis equals y squared")[$A ( y ) = y^(2)$]. We could add a constant of integration if we wanted to, but there is no need. We found #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals x squared plus y squared")[$F ( x , y ) = x^(2) + y^(2)$]. Next for a constant #math.equation(block: false, alt: "C")[$C$], we solve #math.equation(block: true, alt: "F open parenthesis x , y open parenthesis x close parenthesis close parenthesis equals C .")[$F ( x , y ( x ) ) = C .$] for #math.equation(block: false, alt: "y")[$y$] in terms of #math.equation(block: false, alt: "x")[$x$]. In this case, we obtain #math.equation(block: false, alt: "y equals ± the square root of C squared minus x squared")[$y = ± sqrt(C^(2) − x^(2))$] as we did before. ] ] #notebox("Your Turn", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Why did we not need to add a constant of integration when integrating #math.equation(block: false, alt: "A prime open parenthesis y close parenthesis equals 2 y")[$A^(′) ( y ) = 2 y$]? Add a constant of integration, say #math.equation(block: false, alt: "3")[$3$], and see what #math.equation(block: false, alt: "F")[$F$] you get. What is the difference from what we got above, and why does it not matter? ] The procedure, once we know that the equation is exact, is: + Integrate #math.equation(block: false, alt: "F sub x equals M")[$F_(x) = M$] in #math.equation(block: false, alt: "x")[$x$] resulting in #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals something plus A open parenthesis y close parenthesis")[$F ( x , y ) = "something" + A ( y )$]. + Differentiate this #math.equation(block: false, alt: "F")[$F$] in #math.equation(block: false, alt: "y")[$y$], and set that equal to #math.equation(block: false, alt: "N")[$N$], so that we may find #math.equation(block: false, alt: "A open parenthesis y close parenthesis")[$A ( y )$] by integration. The procedure can also be done by first integrating in #math.equation(block: false, alt: "y")[$y$] and then differentiating in #math.equation(block: false, alt: "x")[$x$]. Pretty easy huh? Let’s try this again. #examplebox("Example 2")[][ Consider now #math.equation(block: false, alt: "2 x plus y plus x y the fraction d y over d x equals 0")[$2 x + y + x y frac(d y, d x) = 0$]. OK, so #math.equation(block: false, alt: "M equals 2 x plus y")[$M = 2 x + y$] and #math.equation(block: false, alt: "N equals x y")[$N = x y$]. We try to proceed as before. Suppose #math.equation(block: false, alt: "F")[$F$] exists. Then #math.equation(block: false, alt: "F sub x open parenthesis x , y close parenthesis equals 2 x plus y")[$F_(x) ( x , y ) = 2 x + y$]. We integrate: #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals x squared plus x y plus A open parenthesis y close parenthesis")[$F ( x , y ) = x^(2) + x y + A ( y )$] for some function #math.equation(block: false, alt: "A open parenthesis y close parenthesis")[$A ( y )$]. Differentiate in #math.equation(block: false, alt: "y")[$y$] and set equal to #math.equation(block: false, alt: "N")[$N$]: #math.equation(block: true, alt: "N equals x y equals F sub y open parenthesis x , y close parenthesis equals x plus A prime open parenthesis y close parenthesis .")[$N = x y = F_(y) ( x , y ) = x + A^(′) ( y ) .$] But there is no way to satisfy this requirement! The function #math.equation(block: false, alt: "x y")[$x y$] cannot be written as #math.equation(block: false, alt: "x")[$x$] plus a function of #math.equation(block: false, alt: "y")[$y$]. The equation is not exact; no potential function #math.equation(block: false, alt: "F")[$F$] exists. But there is no way to satisfy this requirement! The function #math.equation(block: false, alt: "x y")[$x y$] cannot be written as #math.equation(block: false, alt: "x")[$x$] plus a function of #math.equation(block: false, alt: "y")[$y$]. The equation is not exact; no potential function #math.equation(block: false, alt: "F")[$F$] exists ] Is there an easier way to check for the existence of #math.equation(block: false, alt: "F")[$F$], other than failing in trying to find it? Turns out there is. Suppose #math.equation(block: false, alt: "M equals F sub x")[$M = F_(x)$] and #math.equation(block: false, alt: "N equals F sub y")[$N = F_(y)$]. Then as long as the second derivatives are continuous, #math.equation(block: true, alt: "the fraction ∂ M over ∂ y equals the fraction ∂ squared F over ∂ y ∂ x equals the fraction ∂ squared F over ∂ x ∂ y equals the fraction ∂ N over ∂ x .")[$frac(∂ M, ∂ y) = frac(∂^(2) F, ∂ y ∂ x) = frac(∂^(2) F, ∂ x ∂ y) = frac(∂ N, ∂ x) .$] Let us state it as a theorem. Usually this is called the Poincaré Lemma.#math.equation(block: false, alt: "to the power 1")[$1$] #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #strong[Pointcaré] If #math.equation(block: false, alt: "M")[$M$] and #math.equation(block: false, alt: "N")[$N$] are continuously differentiable functions of #math.equation(block: false, alt: "open parenthesis x , y close parenthesis")[$( x , y )$], and #math.equation(block: false, alt: "the fraction ∂ M over ∂ y equals the fraction ∂ N over ∂ x")[$frac(∂ M, ∂ y) = frac(∂ N, ∂ x)$], then near any point there is a function #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis")[$F ( x , y )$] such that #math.equation(block: false, alt: "M equals the fraction ∂ F over ∂ x")[$M = frac(∂ F, ∂ x)$] and #math.equation(block: false, alt: "N equals the fraction ∂ F over ∂ y")[$N = frac(∂ F, ∂ y)$]. ] The theorem doesn’t give us a global #math.equation(block: false, alt: "F")[$F$] defined everywhere. In general, we can only find the potential locally, near some initial point. By this time, we have come to expect this from differential equations. Let us return to Example #math.equation(block: false, alt: "2")[$2$] where #math.equation(block: false, alt: "M equals 2 x plus y")[$M = 2 x + y$] and #math.equation(block: false, alt: "N equals x y")[$N = x y$]. Notice #math.equation(block: false, alt: "M sub y equals 1")[$M_(y) = 1$] and #math.equation(block: false, alt: "N sub x equals y")[$N_(x) = y$], which are clearly not equal. The equation is not exact. #examplebox("Example 3")[][ Solve #math.equation(block: true, alt: "the fraction d y over d x equals the fraction minus 2 x minus y over x minus 1 , y open parenthesis 0 close parenthesis equals 1 .")[$frac(d y, d x) = frac(− 2 x − y, x − 1) , #h(2em) y ( 0 ) = 1 .$] #solutionbox[ We write the equation as #math.equation(block: true, alt: "open parenthesis 2 x plus y close parenthesis plus open parenthesis x minus 1 close parenthesis the fraction d y over d x equals 0 ,")[$( 2 x + y ) + ( x − 1 ) frac(d y, d x) = 0 ,$] so #math.equation(block: false, alt: "M equals 2 x plus y")[$M = 2 x + y$] and #math.equation(block: false, alt: "N equals x minus 1")[$N = x − 1$]. Then #math.equation(block: true, alt: "M sub y equals 1 equals N sub x .")[$M_(y) = 1 = N_(x) .$] The equation is exact. Integrating #math.equation(block: false, alt: "M")[$M$] in #math.equation(block: false, alt: "x")[$x$], we find #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals x squared plus x y plus A open parenthesis y close parenthesis .")[$F ( x , y ) = x^(2) + x y + A ( y ) .$] Differentiating in #math.equation(block: false, alt: "y")[$y$] and setting to #math.equation(block: false, alt: "N")[$N$], we find #math.equation(block: true, alt: "x minus 1 equals x plus A prime open parenthesis y close parenthesis .")[$x − 1 = x + A^(′) ( y ) .$] So #math.equation(block: false, alt: "A prime open parenthesis y close parenthesis equals minus 1")[$A^(′) ( y ) = − 1$], and #math.equation(block: false, alt: "A open parenthesis y close parenthesis equals minus y")[$A ( y ) = − y$] will work. Take #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals x squared plus x y minus y")[$F ( x , y ) = x^(2) + x y − y$]. We wish to solve #math.equation(block: false, alt: "x squared plus x y minus y equals C")[$x^(2) + x y − y = C$]. First let us find #math.equation(block: false, alt: "C")[$C$]. As #math.equation(block: false, alt: "y open parenthesis 0 close parenthesis equals 1")[$y ( 0 ) = 1$] then #math.equation(block: false, alt: "F open parenthesis 0 , 1 close parenthesis equals C")[$F ( 0 , 1 ) = C$]. Therefore #math.equation(block: false, alt: "0 squared plus 0 times 1 minus 1 equals C")[$0^(2) + 0 × 1 − 1 = C$], so #math.equation(block: false, alt: "C equals minus 1")[$C = − 1$]. Now we solve #math.equation(block: false, alt: "x squared plus x y minus y equals minus 1")[$x^(2) + x y − y = − 1$] for #math.equation(block: false, alt: "y")[$y$] to get #math.equation(block: true, alt: "y equals the fraction minus x squared minus 1 over x minus 1 .")[$y = frac(− x^(2) − 1, x − 1) .$] ] ] #examplebox("Example 4")[][ Solve #math.equation(block: true, alt: "minus the fraction y over x squared plus y squared d x plus the fraction x over x squared plus y squared d y equals 0 , y open parenthesis 1 close parenthesis equals 2 .")[$− frac(y, x^(2) + y^(2)) d x + frac(x, x^(2) + y^(2)) d y = 0 , #h(2em) y ( 1 ) = 2 .$] #solutionbox[ We leave to the reader to check that #math.equation(block: false, alt: "M sub y equals N sub x")[$M_(y) = N_(x)$]. This vector field #math.equation(block: false, alt: "open parenthesis M , N close parenthesis")[$( M , N )$] is not conservative if considered as a vector field of the entire plane minus the origin. The problem is that if the curve #math.equation(block: false, alt: "γ")[$γ$] is a circle around the origin, say starting at #math.equation(block: false, alt: "open parenthesis 1 , 0 close parenthesis")[$( 1 , 0 )$] and ending at #math.equation(block: false, alt: "open parenthesis 1 , 0 close parenthesis")[$( 1 , 0 )$] going counterclockwise, then if #math.equation(block: false, alt: "F")[$F$] existed we would expect #math.equation(block: true, alt: "0 equals F open parenthesis 1 , 0 close parenthesis minus F open parenthesis 1 , 0 close parenthesis equals ∫ sub γ F sub x d x plus F sub y d y equals ∫ sub γ the fraction minus y over x squared plus y squared d x plus the fraction x over x squared plus y squared d y equals 2 π .")[$0 = F ( 1 , 0 ) − F ( 1 , 0 ) = ∫_(γ) F_(x) d x + F_(y) d y = ∫_(γ) frac(− y, x^(2) + y^(2)) d x + frac(x, x^(2) + y^(2)) d y = 2 π .$] That is nonsense! We leave the computation of the path integral to the interested reader, or you can consult your multivariable calculus textbook. So there is no potential function #math.equation(block: false, alt: "F")[$F$] defined everywhere outside the origin #math.equation(block: false, alt: "open parenthesis 0 , 0 close parenthesis")[$( 0 , 0 )$]. If we think back to the theorem, it does not guarantee such a function anyway. It only guarantees a potential function locally, that is only in some region near the initial point. As #math.equation(block: false, alt: "y open parenthesis 1 close parenthesis equals 2")[$y ( 1 ) = 2$] we start at the point #math.equation(block: false, alt: "open parenthesis 1 , 2 close parenthesis")[$( 1 , 2 )$]. Considering #math.equation(block: false, alt: "x greater than 0")[$x > 0$] and integrating #math.equation(block: false, alt: "M")[$M$] in #math.equation(block: false, alt: "x")[$x$] or #math.equation(block: false, alt: "N")[$N$] in #math.equation(block: false, alt: "y")[$y$], we find #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals arctan open parenthesis the fraction y over x close parenthesis .")[$F ( x , y ) = arctan ( frac(y, x) ) .$] The implicit solution is #math.equation(block: false, alt: "arctan open parenthesis the fraction y over x close parenthesis equals C")[$arctan ( frac(y, x) ) = C$]. Solving, #math.equation(block: false, alt: "y equals tan open parenthesis C close parenthesis x")[$y = tan ( C ) x$]. That is, the solution is a straight line. Solving #math.equation(block: false, alt: "y open parenthesis 1 close parenthesis equals 2")[$y ( 1 ) = 2$] gives us that #math.equation(block: false, alt: "tan open parenthesis C close parenthesis equals 2")[$tan ( C ) = 2$], and so #math.equation(block: false, alt: "y equals 2 x")[$y = 2 x$] is the desired solution. See Figure #math.equation(block: false, alt: "1")[$1$], and note that the solution only exists for #math.equation(block: false, alt: "x greater than 0")[$x > 0$]. #figure(figph[Plot of a single blue ray from the origin rising with slope 2 through the red initial point at (1, 2) to (5, 10); nothing is drawn for negative x.], alt: "Plot of a single blue ray from the origin rising with slope 2 through the red initial point at (1, 2) to (5, 10); nothing is drawn for negative x.", caption: [Figure #math.equation(block: false, alt: "1")[$1$]: Solution to #math.equation(block: false, alt: "minus the fraction y over x squared plus y squared d x plus the fraction x over x squared plus y squared d y equals 0")[$− frac(y, x^(2) + y^(2)) d x + frac(x, x^(2) + y^(2)) d y = 0$], #math.equation(block: false, alt: "y open parenthesis 1 close parenthesis equals 2")[$y ( 1 ) = 2$], with initial point marked.]) ] ] #examplebox("Example 5")[][ Solve #math.equation(block: true, alt: "x squared plus y squared plus 2 y open parenthesis x plus 1 close parenthesis the fraction d y over d x equals 0 .")[$x^(2) + y^(2) + 2 y ( x + 1 ) frac(d y, d x) = 0 .$] #solutionbox[ The reader should check that this equation is exact. Let #math.equation(block: false, alt: "M equals x squared plus y squared")[$M = x^(2) + y^(2)$] and #math.equation(block: false, alt: "N equals 2 y open parenthesis x plus 1 close parenthesis")[$N = 2 y ( x + 1 )$]. We follow the procedure for exact equations #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals the fraction 1 over 3 x cubed plus x y squared plus A open parenthesis y close parenthesis ,")[$F ( x , y ) = frac(1, 3) x^(3) + x y^(2) + A ( y ) ,$] and #math.equation(block: true, alt: "2 y open parenthesis x plus 1 close parenthesis equals 2 x y plus A prime open parenthesis y close parenthesis .")[$2 y ( x + 1 ) = 2 x y + A^(′) ( y ) .$] Therefore #math.equation(block: false, alt: "A prime open parenthesis y close parenthesis equals 2 y")[$A^(′) ( y ) = 2 y$] or #math.equation(block: false, alt: "A open parenthesis y close parenthesis equals y squared")[$A ( y ) = y^(2)$] and #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals the fraction 1 over 3 x cubed plus x y squared plus y squared")[$F ( x , y ) = frac(1, 3) x^(3) + x y^(2) + y^(2)$]. We try to solve #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals C")[$F ( x , y ) = C$]. We easily solve for #math.equation(block: false, alt: "y squared")[$y^(2)$] and then just take the square root: #math.equation(block: true, alt: "y squared equals the fraction C minus open parenthesis the fraction 1 over 3 close parenthesis x cubed over x plus 1 , so y equals ± the square root of the fraction C minus open parenthesis the fraction 1 over 3 close parenthesis x cubed over x plus 1 .")[$y^(2) = frac(C − ( frac(1, 3) ) x^(3), x + 1) , #h(2em) "so" #h(2em) y = ± sqrt(frac(C − ( frac(1, 3) ) x^(3), x + 1)) .$] When #math.equation(block: false, alt: "x equals minus 1")[$x = − 1$], the term in front of #math.equation(block: false, alt: "the fraction d y over d x")[$frac(d y, d x)$] vanishes. You can also see that our solution is not valid in that case. However, one could in that case try to solve for #math.equation(block: false, alt: "x")[$x$] in terms of #math.equation(block: false, alt: "y")[$y$] starting from the implicit solution #math.equation(block: false, alt: "the fraction 1 over 3 x cubed plus x y squared plus y squared equals C")[$frac(1, 3) x^(3) + x y^(2) + y^(2) = C$]. The solution is somewhat messy and we leave it as implicit. ] ] === Integrating factors Sometimes an equation #math.equation(block: false, alt: "M d x plus N d y equals 0")[$M d x + N d y = 0$] is not exact, but it can be made exact by multiplying with a function #math.equation(block: false, alt: "u open parenthesis x , y close parenthesis")[$u ( x , y )$]. That is, perhaps for some nonzero function #math.equation(block: false, alt: "u open parenthesis x , y close parenthesis")[$u ( x , y )$], #math.equation(block: true, alt: "u open parenthesis x , y close parenthesis M open parenthesis x , y close parenthesis d x plus u open parenthesis x , y close parenthesis N open parenthesis x , y close parenthesis d y equals 0")[$u ( x , y ) M ( x , y ) d x + u ( x , y ) N ( x , y ) d y = 0$] is exact. Any solution to this new equation is also a solution to #math.equation(block: false, alt: "M d x plus N d y equals 0")[$M d x + N d y = 0$]. In fact, a linear equation #math.equation(block: true, alt: "the fraction d y over d x plus p open parenthesis x close parenthesis y equals f open parenthesis x close parenthesis , or open parenthesis p open parenthesis x close parenthesis y minus f open parenthesis x close parenthesis close parenthesis d x plus d y equals 0")[$frac(d y, d x) + p ( x ) y = f ( x ) , #h(2em) "or" #h(2em) ( p ( x ) y − f ( x ) ) d x + d y = 0$] is always such an equation. Let #math.equation(block: false, alt: "r open parenthesis x close parenthesis equals e to the power ∫ p open parenthesis x close parenthesis d x")[$r ( x ) = e^(∫ p ( x ) d x)$] be the integrating factor for a linear equation. Multiply the equation by #math.equation(block: false, alt: "r open parenthesis x close parenthesis")[$r ( x )$] and write it in the form of #math.equation(block: false, alt: "M plus N the fraction d y over d x equals 0")[$M + N frac(d y, d x) = 0$]. #math.equation(block: true, alt: "r open parenthesis x close parenthesis p open parenthesis x close parenthesis y minus r open parenthesis x close parenthesis f open parenthesis x close parenthesis plus r open parenthesis x close parenthesis the fraction d y over d x equals 0 .")[$r ( x ) p ( x ) y − r ( x ) f ( x ) + r ( x ) frac(d y, d x) = 0 .$] Then #math.equation(block: false, alt: "M equals r open parenthesis x close parenthesis p open parenthesis x close parenthesis y minus r open parenthesis x close parenthesis f open parenthesis x close parenthesis")[$M = r ( x ) p ( x ) y − r ( x ) f ( x )$], so #math.equation(block: false, alt: "M sub y equals r open parenthesis x close parenthesis p open parenthesis x close parenthesis")[$M_(y) = r ( x ) p ( x )$], while #math.equation(block: false, alt: "N equals r open parenthesis x close parenthesis")[$N = r ( x )$], so #math.equation(block: false, alt: "N sub x equals r prime open parenthesis x close parenthesis equals r open parenthesis x close parenthesis p open parenthesis x close parenthesis")[$N_(x) = r^(′) ( x ) = r ( x ) p ( x )$]. In other words, we have an exact equation. Integrating factors for linear functions are just a special case of integrating factors for exact equations. But how do we find the integrating factor #math.equation(block: false, alt: "u")[$u$]? Well, given an equation #math.equation(block: true, alt: "M d x plus N d y equals 0 ,")[$M d x + N d y = 0 ,$] #math.equation(block: false, alt: "u")[$u$] should be a function such that #math.equation(block: true, alt: "the fraction ∂ over ∂ y [ u M ] equals u sub y M plus u M sub y equals the fraction ∂ over ∂ x [ u N ] equals u sub x N plus u N sub x .")[$frac(∂, ∂ y) [ u M ] = u_(y) M + u M_(y) = frac(∂, ∂ x) [ u N ] = u_(x) N + u N_(x) .$] Therefore, #math.equation(block: true, alt: "open parenthesis M sub y minus N sub x close parenthesis u equals u sub x N minus u sub y M .")[$( M_(y) − N_(x) ) u = u_(x) N − u_(y) M .$] At first it may seem we replaced one differential equation by another. True, but all hope is not lost. A strategy that often works is to look for a #math.equation(block: false, alt: "u")[$u$] that is a function of #math.equation(block: false, alt: "x")[$x$] alone, or a function of #math.equation(block: false, alt: "y")[$y$] alone. If #math.equation(block: false, alt: "u")[$u$] is a function of #math.equation(block: false, alt: "x")[$x$] alone, that is #math.equation(block: false, alt: "u open parenthesis x close parenthesis")[$u ( x )$], then we write #math.equation(block: false, alt: "u prime open parenthesis x close parenthesis")[$u^(′) ( x )$] instead of #math.equation(block: false, alt: "u sub x")[$u_(x)$], and #math.equation(block: false, alt: "u sub y")[$u_(y)$] is just zero. Then #math.equation(block: true, alt: "the fraction M sub y minus N sub x over N u equals u prime .")[$frac(M_(y) − N_(x), N) u = u^(′) .$] In particular, #math.equation(block: false, alt: "the fraction M sub y minus N sub x over N")[$frac(M_(y) − N_(x), N)$] ought to be a function of #math.equation(block: false, alt: "x")[$x$] alone (not depend on #math.equation(block: false, alt: "y")[$y$]). If so, then we have a linear equation #math.equation(block: true, alt: "u prime minus the fraction M sub y minus N sub x over N u equals 0 .")[$u^(′) − frac(M_(y) − N_(x), N) u = 0 .$] Letting #math.equation(block: false, alt: "P open parenthesis x close parenthesis equals the fraction M sub y minus N sub x over N")[$P ( x ) = frac(M_(y) − N_(x), N)$], we solve using the standard integrating factor method, to find #math.equation(block: false, alt: "u open parenthesis x close parenthesis equals C e to the power ∫ P open parenthesis x close parenthesis d x")[$u ( x ) = C e^(∫ P ( x ) d x)$]. The constant in the solution is not relevant, we need any nonzero solution, so we take #math.equation(block: false, alt: "C equals 1")[$C = 1$]. Then #math.equation(block: false, alt: "u open parenthesis x close parenthesis equals e to the power ∫ P open parenthesis x close parenthesis d x")[$u ( x ) = e^(∫ P ( x ) d x)$] is the integrating factor. Similarly we could try a function of the form #math.equation(block: false, alt: "u open parenthesis y close parenthesis")[$u ( y )$]. Then #math.equation(block: true, alt: "the fraction M sub y minus N sub x over M u equals minus u prime .")[$frac(M_(y) − N_(x), M) u = − u^(′) .$] In particular, #math.equation(block: false, alt: "the fraction M sub y minus N sub x over M")[$frac(M_(y) − N_(x), M)$] ought to be a function of #math.equation(block: false, alt: "y")[$y$] alone. If so, then we have a linear equation #math.equation(block: true, alt: "u prime plus the fraction M sub y minus N sub x over M u equals 0 .")[$u^(′) + frac(M_(y) − N_(x), M) u = 0 .$] Letting #math.equation(block: false, alt: "Q open parenthesis y close parenthesis equals the fraction M sub y minus N sub x over M")[$Q ( y ) = frac(M_(y) − N_(x), M)$], we find #math.equation(block: false, alt: "u open parenthesis y close parenthesis equals C e to the power minus ∫ Q open parenthesis y close parenthesis d y")[$u ( y ) = C e^(− ∫ Q ( y ) d y)$]. We take #math.equation(block: false, alt: "C equals 1")[$C = 1$]. So #math.equation(block: false, alt: "u open parenthesis y close parenthesis equals e to the power minus ∫ Q open parenthesis y close parenthesis d y")[$u ( y ) = e^(− ∫ Q ( y ) d y)$] is the integrating factor. #examplebox("Example 6")[][ Solve #math.equation(block: true, alt: "the fraction x squared plus y squared over x plus 1 plus 2 y the fraction d y over d x equals 0 .")[$frac(x^(2) + y^(2), x + 1) + 2 y frac(d y, d x) = 0 .$] #solutionbox[ Let #math.equation(block: false, alt: "M equals the fraction x squared plus y squared over x plus 1")[$M = frac(x^(2) + y^(2), x + 1)$] and #math.equation(block: false, alt: "N equals 2 y")[$N = 2 y$]. Compute #math.equation(block: true, alt: "M sub y minus N sub x equals the fraction 2 y over x plus 1 minus 0 equals the fraction 2 y over x plus 1 .")[$M_(y) − N_(x) = frac(2 y, x + 1) − 0 = frac(2 y, x + 1) .$] As this is not zero, the equation is not exact. We notice #math.equation(block: true, alt: "P open parenthesis x close parenthesis equals the fraction M sub y minus N sub x over N equals the fraction 2 y over x plus 1 the fraction 1 over 2 y equals the fraction 1 over x plus 1")[$P ( x ) = frac(M_(y) − N_(x), N) = frac(2 y, x + 1) frac(1, 2 y) = frac(1, x + 1)$] is a function of #math.equation(block: false, alt: "x")[$x$] alone. We compute the integrating factor #math.equation(block: true, alt: "e to the power ∫ P open parenthesis x close parenthesis d x equals e to the power ln open parenthesis x plus 1 close parenthesis equals x plus 1 .")[$e^(∫ P ( x ) d x) = e^(ln ( x + 1 )) = x + 1 .$] We multiply our given equation by #math.equation(block: false, alt: "open parenthesis x plus 1 close parenthesis")[$( x + 1 )$] to obtain #math.equation(block: true, alt: "x squared plus y squared plus 2 y open parenthesis x plus 1 close parenthesis the fraction d y over d x equals 0 ,")[$x^(2) + y^(2) + 2 y ( x + 1 ) frac(d y, d x) = 0 ,$] which is an exact equation that we solved in Example #math.equation(block: false, alt: "5")[$5$]. The solution was #math.equation(block: true, alt: "y equals ± the square root of the fraction C minus open parenthesis the fraction 1 over 3 close parenthesis x cubed over x plus 1 .")[$y = ± sqrt(frac(C − ( frac(1, 3) ) x^(3), x + 1)) .$] ] ] #examplebox("Example 7")[][ Solve #math.equation(block: true, alt: "y squared plus open parenthesis x y plus 1 close parenthesis the fraction d y over d x equals 0 .")[$y^(2) + ( x y + 1 ) frac(d y, d x) = 0 .$] #solutionbox[ First compute #math.equation(block: true, alt: "M sub y minus N sub x equals 2 y minus y equals y .")[$M_(y) − N_(x) = 2 y − y = y .$] As this is not zero, the equation is not exact. We observe #math.equation(block: true, alt: "Q open parenthesis y close parenthesis equals the fraction M sub y minus N sub x over M equals the fraction y over y squared equals the fraction 1 over y")[$Q ( y ) = frac(M_(y) − N_(x), M) = frac(y, y^(2)) = frac(1, y)$] is a function of #math.equation(block: false, alt: "y")[$y$] alone. We compute the integrating factor #math.equation(block: true, alt: "e to the power minus ∫ Q open parenthesis y close parenthesis d y equals e to the power minus ln y equals the fraction 1 over y .")[$e^(− ∫ Q ( y ) d y) = e^(− ln y) = frac(1, y) .$] Therefore we look at the exact equation #math.equation(block: true, alt: "y plus the fraction x y plus 1 over y the fraction d y over d x equals 0 .")[$y + frac(x y + 1, y) frac(d y, d x) = 0 .$] The reader should double check that this equation is exact. We follow the procedure for exact equations #math.equation(block: true, alt: "F open parenthesis x , y close parenthesis equals x y plus A open parenthesis y close parenthesis ,")[$F ( x , y ) = x y + A ( y ) ,$] and #math.equation(block: true, alt: "the fraction x y plus 1 over y equals x plus the fraction 1 over y equals x plus A prime open parenthesis y close parenthesis .")[$frac(x y + 1, y) = x + frac(1, y) = x + A^(′) ( y ) .$] Consequently #math.equation(block: false, alt: "A prime open parenthesis y close parenthesis equals the fraction 1 over y")[$A^(′) ( y ) = frac(1, y)$] or #math.equation(block: false, alt: "A open parenthesis y close parenthesis equals ln y")[$A ( y ) = ln y$]. Thus #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals x y plus ln y")[$F ( x , y ) = x y + ln y$]. It is not possible to solve #math.equation(block: false, alt: "F open parenthesis x , y close parenthesis equals C")[$F ( x , y ) = C$] for #math.equation(block: false, alt: "y")[$y$] in terms of elementary functions, so let us be content with the implicit solution: #math.equation(block: true, alt: "x y plus ln y equals C .")[$x y + ln y = C .$] We are looking for the general solution and we divided by #math.equation(block: false, alt: "y")[$y$] above. We should check what happens when #math.equation(block: false, alt: "y equals 0")[$y = 0$], as the equation itself makes perfect sense in that case. We plug in #math.equation(block: false, alt: "y equals 0")[$y = 0$] to find the equation is satisfied. So #math.equation(block: false, alt: "y equals 0")[$y = 0$] is also a solution. ] ] === Footnotes \[1\] Named for the French polymath #link("https://en.Wikipedia.org/wiki/Henri_Poincar%C3%A9")[Jules Henri Poincaré] (1854–1912).