Differential Equations Day 8 -- Exact Differential Equations
Our final type of first order differential equation that we will see an algebraic method for solution is called an [b]exact differential equation[/b]. The bad news is that the hardest part of engaging with this topic is identification of a differential equation as exact. The good news is that after a differential equation has been identified as exact, the algebraic process of obtaining a general solution and/or a specific solution (to match an initial condition) is less sophisticated than that of linear differential equation, and uses the fun new concept of a partial derivative and partial integral.[br][br]An excellent textbook treatment of exact equations can be found here: [url=https://tutorial.math.lamar.edu/classes/de/exact.aspx]https://tutorial.math.lamar.edu/classes/de/exact.aspx[/url]. The example in this activity is due to the aforementioned link. [br][br]At the end of this activity we'll take a look at the conceptual understanding of why the class of exact differential equations is important, and why the method works.
A first order differential equation is [b]exact [/b]if it can be put in the following standard (exact) form[br][br][math]M\left(x,y\right)+N\left(x,y\right)\cdot\frac{dy}{dx}=0[/math][br][br]and if[br][br][math]\frac{\partial}{\partial y}M\left(x,y\right)=\frac{\partial}{\partial x}N\left(x,y\right)[/math][br][br]Note: The slope-field form of an exact differential equation is [br][br][math]\frac{dy}{dx}=-\frac{M\left(x,y\right)}{N\left(x,y\right)}[/math]
The notation [math]\frac{\partial}{\partial x}[/math] and [math]\frac{\partial}{\partial y}[/math] indicate what is known as a "partial derivative" and I expect that it may be a new concept for many of you. The short description of a partial derivative is that it is a derivative in which you only treat one variable as independent, and any other variable is treated as if it were a constant. [br][br]For instance[br][br][math]\frac{\partial}{\partial y}\left(x^2+y^3\right)=0+3y^2[/math][br][br]and[br][br][math]\frac{\partial}{\partial x}\left(x^2+y^3\right)=2x+0[/math][br][br]It's normal to need some time to get accustomed to partial derivatives and come to realize that they are just a slight twist on the concept of a derivative with which you are familiar from Calc 1. I encourage you to dust off your knowledge of procedurally calculating derivatives (perhaps with the Monkey Rules) from Calc 1 to get accustomed to this new concept[br][br]The other point worth emphasizing is that the definition of an exact differential equation is a [i]two part [/i]condition. A differential equation is only exact if it can [i]both [/i]be put in standard (exact) form [i]and [/i]the partial derivatives of the [i]M[/i] and [i]N[/i] are equal as described in the definition.
[br]Let's check that the following differential equation is in fact exact.[br][br][math]2xy^2=2\left(3-x^2y\right)\cdot\frac{dy}{dx}-4[/math][br][br]First, let's attempt to put this in standard (exact) form with some algebraic massage[br][br][math]2xy^2-2xy^2=2\left(3-x^2y\right)\cdot\frac{dy}{dx}-4-2xy^2[/math][br][br][math]0=2\left(3-x^2y\right)\cdot\frac{dy}{dx}-\left(4+2xy^2\right)[/math][br][br][math]2\left(3-x^2y\right)\cdot\frac{dy}{dx}-\left(4+2xy^2\right)=0[/math][br][br][math]-\left(4+2xy^2\right)+2\left(3-x^2y\right)\cdot\frac{dy}{dx}=0[/math][br][br][math]\left(-4-2xy^2\right)+\left(6-2x^2y\right)\cdot\frac{dy}{dx}=0[/math][br][br]With this massage complete, [math]M(x,y)=-4-2xy^2[/math] and [math]N(x,y)=6-2x^2y[/math]. Notice the importance of incorporating the negative sign inside the parentheses in enabling this identification. [br][br]Note we have [i]not yet [/i]identified the equation as exact. We still must check the condition regarding the partial derivatives of [i]N[/i] and [i]M[/i]. [br][br][math]\frac{\partial}{\partial y}M\left(x,y\right)=\frac{\partial}{\partial y}\left(-4-2xy^2\right)=0-2x\cdot2y=0-4xy=-4xy[/math][br][br][math]\frac{\partial}{\partial x}N\left(x,y\right)=\frac{\partial}{\partial x}\left(6-2x^2y\right)=0-2\cdot2x\cdot y=0-4xy=-4xy[/math][br][br]Because these are the same, we can now confirm that the differential equation is in fact exact. [br][br][br]
The algebraic process for solving an exact differential equation involves a rather fun pair of partial integrals, and then a reconciliation. Before you begin though, be sure the exact equation is in standard form [math]M\left(x,y\right)+N\left(x,y\right)\cdot\frac{dy}{dx}=0[/math] and the condition on the partial derivatives, [math]\frac{\partial}{\partial y}M\left(x,y\right)=\frac{\partial}{\partial x}N\left(x,y\right)[/math], has been checked. [br][br]With that out of the way:[br][list=1][*]Calculate [math]\Psi_M\left(x,y\right)=\int M\left(x,y\right)dx[/math] but rather than a constant of integration, add a function of integration [math]g\left(y\right)[/math][/*][*]Calculate [math]\Psi_N\left(x,y\right)=\int N\left(x,y\right)dy[/math] but rather than a constant of integration, add a function of integration [math]h\left(x\right)[/math][/*][*]Determine [math]g(y)[/math] and [math]h(x)[/math] by reconciling [math]\Psi_M\left(x,y\right)[/math] and [math]\Psi_N\left(x,y\right)[/math] which are the same function (but viewed from two different perspectives). Call the result [math]\Psi\left(x,y\right)[/math][/*][*]Replace the symbol [math]\Psi\left(x,y\right)[/math] with a single constant of integration [i]c[/i]. [/*][*]Solve the resulting equation for [i]y [/i]to obtain the general solution with [i]y[/i] as the independent variable, and [i]x[/i] as the dependent variable. [Warning: this can be some pretty tricky Algebra 2!][/*][*]If an initial condition is present, then use it to solve for [i]c [/i]and obtain a specific solution.[/*][/list]
Let's return to the differential equation from above [br][br][math]2xy^2=2\left(3-x^2y\right)\cdot\frac{dy}{dx}-4[/math][br]which we saw was exact, and had standard (exact) form [br][br][math]\left(-4-2xy^2\right)+\left(6-2x^2y\right)\cdot\frac{dy}{dx}=0[/math][br][br]and in which the component functions are [math]M(x,y)=-4-2xy^2[/math] and [math]N(x,y)=6-2x^2y[/math]. [br][br]Let's follow the steps for solving this exact differential equation.[br][br][list=1][*][math]\Psi_M\left(x,y\right)=\int M\left(x,y\right)dx=\int-4-2xy^2dx=-4x-2\cdot\frac{1}{2}x^2y^2=-4x-x^2y^2+g\left(y\right)[/math][/*][*][math]\Psi_N\left(x,y\right)=\int N\left(x,y\right)dy=\int6-2x^2ydy=6y-2x^2\cdot\frac{1}{2}y^2+h\left(x\right)=6y-x^2y^2+h\left(x\right)[/math][/*][*]This step often sounds hard, but rarely is. By comparing [math]\Psi_M[/math] and [math]\Psi_N[/math] we see that [math]h(x)=-4x[/math] and [math]g(y)=6y[/math] and so [math]\Psi\left(x,y\right)=6y-x^2y^2-4x[/math][/*][*][math]c=6y-x^2y^2-4x[/math][br][/*][*]Solving the equation in step 4 for [i]y, [/i]and therefore obtaining the explicit general solution, is actually the hardest part of the process. It's not differential equations fault though: it's algebra 2's fault. It turns out the equation in step 4 is quadratic in [i]y[/i], but the coefficients of the quadratic involve [i]x[/i]. The quadratic formula still is the key to unlocking the solution. I'll be more specific below.[/*][*]There was no initial condition present, so we do not need to find a specific solution.[/*][/list]Let's take a close look at how to solve the equation in step 4 for [i]y[/i]. The first step is to recognize it as a quadratic equation in [i]y[/i]. To get it in standard (quadratic) form the equation we proceed as follows:[br][br][math]c-\left(6y-x^2y^2-4x\right)=6y-x^2y^2-4x-\left(6y-x^2y^2-4x\right)[/math][br][br][math]c-6y+x^2y^2+4x=0[/math][br][br][math]x^2y^2-6y+4x+c=0[/math][br][br][math]\left(x^2\right)y^2+\left(-6\right)y+\left(4x+c\right)=0[/math][br][br]In the last version, I added parentheses to hammer home the quadratic nature of this equation. We can actually just use the [url=https://en.wikipedia.org/wiki/Quadratic_equation]quadratic formula[/url] (but solving for y instead of x) with [math]A=x^2[/math], [math]B=-6[/math] and [math]C=4x+c[/math].[br][math]y=\frac{-B\pm\sqrt{B^2-4AC}}{2A}[/math][br][br][math]y=\frac{-\left(-6\right)\pm\sqrt{\left(-6\right)^2-4\left(x^2\right)\left(4x+c\right)}}{2\left(x^2\right)}[/math][br][br][math]y=\frac{6\pm\sqrt{36-\left(16x^3+4cx^2\right)}}{2x^2}[/math][br][br][math]y=\frac{6\pm\sqrt{36-16x^3-4cx^2}}{2x^2}[/math][br][br]A host of algebraic simplifications of this are possible, but this is more than sufficient for our purposes. Don't lose sight of the fact that this final answer is telling us that [i]y[/i] is a function of the independent variable [i]x[/i]. [br][br]Let's have a look at the situation in GeoGebra to be sure that our calculations agree with the shape of the slope field. I always get a great sense of enjoyment from examining solutions of exact equations closely. [br][br]Notice how the nature of the topology of the solutions changes dramatically as [i]c[/i] changes. Taking deep investigations into these types of topological changes is the nature of realistic mathematical research.
The algebraic method for solving exact equations is one of the more fun methods of the semester. I particularly enjoy using the "partial integral" and the reconciliation of [math]\Psi_M\left(x,y\right)[/math] and [math]\Psi_N\left(x,y\right)[/math] . That said, whatever your reaction is to the algebraic method, a reasonable question is: why does this work, why did anyone study exact equations in the first place, and how did anyone come up with this technique?[br][br]To get a sense of the answers to these questions, it's important to take a step back and examine the "big picture" of the method. To do that, let's take a look at the function [math]\Psi\left(x,y\right)[/math] from the algebraic process, and which I'll call [math]\Psi[/math]. All the calculus is complete once [math]\Psi[/math] has been calculated; so in some sense, the solution to an exact differential equation is [math]\Psi[/math]. So let's take a closer look at this function.[br][br]The function [math]\Psi[/math] is a function of two variables which means it can be visualized as a surface above the [i]x-y[/i] plane. The function is plotted below as a purple plane.[br][br]Adjust the slider for [i]c[/i] and pay attention to various intersections of [math]\Psi[/math] and the plane [i]z[/i]=[i]c[/i]. Notice that the intersections of [math]\Psi[/math] and [i]c [/i]are the same as the solutions GenSol_1 and GenSol_2 above.
The mathematical way of summarizing what we observe above is that the "contours" of [math]\Psi[/math] ([i]i.e. [/i]curves on [math]\Psi[/math] of equal elevation above the [i]x[/i]-[i]y[/i] plane) are the solutions to the exact differential equation. When you replace [math]\Psi[/math] with [i]c [/i]this amounts to selecting a particular contour line, which is also a particular solution fo the exact differential equation. In other words: a topographic map of the purple surface is a set of all the solutions of the exact differential equation. [br][br]But [i]why is this true, [/i]you might ask? [br][br]The reason why the intersection of the surface [math]\Psi[/math] and the plane [i]z[/i]=[i]c[/i] are the same as the solutions takes a little thought about how we came to discover [math]\Psi[/math], what its relationship is to the exact differential equation that this all started with, and a little bit of content knowledge from Calculus 3. [br][br]Looking back at the algebraic method for solving exact differential equations reveals that [math]\Psi[/math] was gotten by partial integration of [i]M[/i] and [i]N [/i](and reconciliation of the functions of integration). Therefore, the flip side of the fact that [i][math]\Psi[/math][/i] is a partial integral of [i]M[/i] and [i]N[/i] is that [i]M[/i] and [i]N[/i] are partial derivatives of [math]\Psi[/math]. In particular [br][br][math]\frac{\partial}{\partial x}\Psi=M[/math] and [math]\frac{\partial}{\partial y}\Psi=N[/math][br][br]In other words, to use some terminology from Calculus 3 (it's ok if you haven't taken Calc 3) the pair, ([i]M[/i],[i]N[/i]) is the gradient of [math]\Psi[/math]. That means that if we think of ([i]M[/i],[i]N[/i]) as a vector field (a field of arrows), the vector field points in the direction of steepest ascent, and in Calculus 3 you learn that this direction is always [i]perpendicular[/i] to the contour lines of [math]\Psi[/math]. Furthermore, also from Calc 3, you learn that (-[i]N[/i],[i]M[/i]) is perpendicular to the gradient, and points in a direction [i]parallel[/i] to the contour lines of [math]\Psi[/math]. [br][br]In other words a slope field which is everywhere equal to -[i]M[/i]/[i]N[/i] will point in the direction of the contours of [math]\Psi[/math]. But if you go back to the definition of an exact equation, you'll see that the [i]slope field form[/i] of an exact equation is precisely[br][br][math]\frac{dy}{dx}=-\frac{M}{N}[/math][br][br]In other words, an exact differential equation will necessarily have the contours of [math]\Psi[/math] as its solutions. And this is the geometry behind why the method works. [br][br]One last thing to notice is that the other condition on the partial derivatives of [i]M[/i] and [i]N[/i], [math]\frac{\partial}{\partial y}M\left(x,y\right)=\frac{\partial}{\partial x}N\left(x,y\right)[/math], is our way of checking that the partial integrals of [i]M[/i] and [i]N[/i] will return us back "up" to the same function [math]\Psi[/math]. This is a critical component of knowing that the geometrical/Calc 3 way of thinking about this will in fact hold. [br][br]Sometimes I like to think of the following picture which organizes the various pieces and parts of an exact equation, and their relationships with each other.
It's A-OK if this is over your head. I recognize that many people have not encountered Calculus 3 yet, and so the terms "gradient", "perpendicular" and so on are new to you. You do NOT need to understand why the method works in order to use it to solve exact differential equations. [br][br]If you understand nothing else though, know that the contours of [i][math]\Psi[/math][/i] are the solutions of the exact differential equation from which [math]\Psi[/math] was gotten.