Mathematics Department

Math 340 Home, Textbook Contents, Online Homework Home

Warning: MathJax requires JavaScript to process the mathematics on this page.
If your browser supports JavaScript, be sure it is enabled.

Exact Equations

Discussion

The general solution to a first order equation has 1 arbitrary constant. If we solve for that constant, we can write the general solution to a first order equation in the form $$ F(x,y) = K $$ where $F$ is some function which depends upon the equation and $K$ is the constant. From this solution, we can now try to recover the original equation. Differentiate both sides with respect to $x$ and use the chain rule for functions of several variables to obtain $$ \frac{\partial F}{\partial x}+\frac{\partial F}{\partial y}\frac{dy}{dx}=0 $$ This now suggests a technique for solving first order differential equations, find a function $F$ so that the equation takes on the form above and then the solution is $F(x,y) = K$. If we start with a general equation $$ M(x,y) + N(x,y)\frac{dy}{dx} = 0 $$ we then have the question of how to find $F$. In fact, first we should check that such an $F$ exists. Comparing this equation with the previous equation, we see that we must have $$ \begin{align} \frac{\partial F}{\partial x}&=M(x,y) \\ \frac{\partial F}{\partial y}&=N(x,y) \end{align} $$ That $M$ and $N$ are the two different partials of a single function means that $[M,N]$ forms a gradient field in the terminology of Calculus III. And of course all of you remember that a necessary and sufficient condition that a vector field is locally a gradient field is that the curl of the vector field is 0. In this setup, that means there is a function $F$ satisfying the pair of equations above if and only if $$ \frac{\partial M}{\partial y}=\frac{\partial N}{\partial x} $$ Once we have checked that an $F$ exists, it is usually a straightforward process to find $F$ by integration. The process is sufficiently lengthy though that it is worthwhile to check that an $F$ exists before trying to construct it.

Example

$$ 2xy+(x^2+1)\frac{dy}{dx}=0 $$ We check that $$ \frac{\partial (2xy)}{\partial y}=2x=\frac{\partial (x^2 + 1)}{\partial x} $$ so the equation is exact. So we have $$ \begin{align} \frac{\partial F}{\partial x}&=2xy \\ \frac{\partial F}{\partial y}&=x^2+1 \end{align} $$ We now integrate the first partial derivative to obtain $$ \begin{align} \int\,\partial F &= \int 2xy\,\partial x \\ F(x,y)&=x^2y+C(y) \end{align} $$ This requires a bit of explanation. We do a partial integration because we are undoing a partial differentiation. So we integrate with respect to $x$ and treat $y$ as a constant. Finally, we end up with an arbitrary function of $y$, $C(y)$, instead of the usual arbitrary constant of integration since we are treating $y$ as a constant. So from our condition that $\partial F/\partial x=2xy$ we obtain a formula for $F$. But we can obtain another formula from $\partial F/\partial y=x^2+1$. $$ \begin{align} \int\,\partial F&=\int x^2+1\,\partial y \\ F(x,y)&=x^2y+y+\tilde{C}(x) \end{align} $$ where $\tilde{C}(x)$ is an arbitrary function of $x$. We now have two different definitions of $F$ from our two different equations. $$ \begin{align} F(x,y) &= x^2y + C(y) \\ F(x,y) &= x^2y + y + \tilde{C}(x) \end{align} $$ Comparing our two formulas, we see that they agree if we set $C(y)=y$ and $\tilde{C}(x)=0$. So we end up with $F(x,y)=x^2y+y$ and our solution is $$ x^2 y + y = K $$ where $K$ is an arbitrary constant. We are now ready to give the paradigm.

Paradigm

$(x^2+y)+(x+\cos(y))\dfrac{dy}{dx}=0$

Step 1: Test for exactness $$ \frac{\partial (x^2+y)}{\partial y}=1=\frac{\partial (x+\cos(y))}{\partial x} $$ so the equation is exact.

Step 2: Write the partial differential equations. $$ \begin{align} \frac{\partial F}{\partial x}&=x^2+y \\ \frac{\partial F}{\partial y}&=x+\cos(y) \end{align} $$ Step 3: Integrate the first partial differential equation. $$ \begin{align} \int \partial F&=\int x^2+y\,\partial x \\ F(x,y)&=x^3/3+xy+C(y) \end{align} $$ Step 4: Integrate the second partial differential equation. $$ \begin{align} \int \partial F&=\int x+\cos(y)\,\partial y \\ F(x,y)&=xy+\sin(y)+\tilde{C}(x) \end{align} $$ Step 5: Equate expressions for $F(x,y)$. $$ \begin{align} F(x,y)&=x^3/3+xy+C(y) \\ F(x,y)&=xy+\sin(y)+\tilde{C}(x) \end{align} $$ So $C(y)=\sin(y)$ and $\tilde{C}(x)=x^3/3$ and $$ F(x,y)=x^3/3+xy+\sin(y) $$ Step 6: Solution is $F(x,y)=K$. $$ x^3/3+xy+\sin(y)=K $$

Example

$\displaystyle x^2\frac{dy}{dx}=x^3-2xy,\qquad y(1)=3$

FIRST: Find the general solution.

Step 1: Rewriting this as $\displaystyle (2xy-x^3)+x^2\frac{dy}{dx}=0$ the test for exactness is $$ \frac{\partial (2xy-x^3)}{\partial y}=2x=\frac{\partial x^2}{\partial x} $$ so the equation is exact.

Step 2: $$\begin{align} \frac{\partial F}{\partial x}&=2xy-x^3 \\ \frac{\partial F}{\partial y}&=x^2 \end{align} $$ Step 3: $\displaystyle F(x,y)=\int 2xy-x^3\,\partial x=x^2y-x^4/4+C(y)$

Step 4: $\displaystyle F(x,y)=\int x^2\,\partial y=x^2y+\tilde{C}(x)$

Step 5: $\displaystyle F(x,y)=x^2y-x^4/4$

Step 6: $\displaystyle x^2y-x^4/4=K$

SECOND: $$\begin{align} 1^2\times3-1^4/4&=K\\11/4&=K\end{align} $$ So $ x^2y-x^4/4=11/4$ or $y=x^2/4+(11/4)x^{-2}$. (It is easiest to wait to find an explicit solution until after finding the arbitrary constant when solving an exact initial value problem.)

You can generate additional examples of initial value problems for first order exact equations here.


If you have any problems with this page, please contact bennett@math.ksu.edu.
©2010, 2014 Andrew G. Bennett