In the study of partial differentiation, recall that a function
of two variables that equals a constant, describes the points
in the 3-D plane with the same potential; . The
curves that connect the points with the same potential are called
level curves and have the value of **c**. A contour map is
a level curve graph where common elevations are connected giving
a 2-D representation of a 3-D reality.

Using a LiveMath 3-D graph theory you can plot such a function along with the level curves describing the contours associated with that function. The picture below uses the following function to demonstrate this (here is a LiveMath plug-in animation of the graph below).

In general terms, this type of equation is represented by the following:

It describes the level curves and is the solution to the following differential equation. The equation below is just the total derivative of the function above.

Because it is the total derivative of some function z(x,y) it is called an Exact Differential Equation.

To help understand how to solve these types of equations you will look at the solution first and then analyze how to back into that solution.

In this example you will take the total derivative of a function and analyze its parts. Then you will take this new equation (a differential equation now) and, knowing the answer, describe the method used to solve it.

- Input the following equation:

- To take a total derivative in LiveMath, first input the differential
operator
**d**times z (d*z). Input this into a second Prop and substitute the equation into it.

- Collect common terms on the RHS and Expand the coefficients of the differentials for the final answer.

After setting the RHS equal to zero you will have a differential equation to solve. Notice how the coefficients are neither separable, homogeneous, nor are they linear.

To help analyze this equation, label the coefficient of dx as M and the coefficient of dy as N. Both are functions of x and y so place the equation in the following form.

The total derivative of a function is obtained by adding the partial derivatives of the coefficients. This is done with the equation below.

**NOTE:** As discussed earlier, using LiveMath's partial
derivative Op to find partial derivatives requires an Independence
Declaration to be placed in the notebook. To control the scope
of these declarations, it is wise to study partial derivatives
inside their own case theory. These declarations only affect operations
within a case theory or those nested inside that case theory.
They will not affect operations outside of the case theory they
are in, unless they are at the root, or main theory level, where
they affect all operations in the notebook.

- Set up your notebook in the following manner:

- Perform the substitutions to give the partial derivatives.

You can see that differential equations of this type are Exact. They are immediate derivatives of another function. You know this is true in this example because you developed the equation below by taking the derivative of the original function.

You can describe an Exact Differential Equation as an equation
whose dx coefficient is the partial derivative with respect to
x of some function f(x,y) and whose dy coefficient is the partial
derivative with respect to y of the **SAME**
function. Since you dry-labed the last example you know what this
equation, z=f(x,y), is. This will not be the case as you look
to solve these problems though, so you need to find a way of determining
that an equation is exact, then you will know that M and N are
related to the solution equation in this way!

Using the fact that these partial derivatives are of the same function will be the key to the method used to solve these equations. To test a differential equation for exactness, follow the method described in the next example.

- This example demonstrates the test for exactness of the same equation used in the previous example. First input the differential equation as shown below. Remember to include an Independence Declaration inside the same case theory the test is performed.

To test for exactness, equate the partial derivative with respect to y of M and the partial derivative with respect to x of N. Notice that these partials are with respect to the exact opposite variables as those used to determine the total derivative in the last example. The reason for this will become clear to you later when you derive this test.

- Set up the partial derivatives and solve by substituting M and N into the partial derivative Ops.

The fact that they are equal means that the differential equation is exact!

To solve these types of equations you will need to take one or the other coefficient and "go backwards" to determine the solution. You can take either M or N to do this, it is up to you. For this example try using M.

Expl #13 Exact Solution Method

- First, set up an equation equating the unknown function, named , to an integral of M plus some unknown function of y. Call this function u for the time being. The reason you do this is the fact that to get M, the partial derivative was taken of the unknown function with respect to x. You will try to back into the answer by integrating M. This is not automatic though, because of the fact that when a partial derivative is performed, one of the variables is treated as a constant and therefore drops out (the derivative of a constant is = 0). Below this derivative is displayed again.

- You will not get back the function by integrating M, because the y term is not there! It is the constant, as is shown below where you try to get the function back by integrating M.

This is very close to the answer, and with a little twist, will lead to a method that you will use to obtain the solution.

- Input the following props and perform the substitutions as shown. The user defined variable u is used in this case, rather than the arbitrary constant c, because you are actually looking for, what you might call, an arbitrary function. It will also be necessary later to have u defined as a variable for LiveMath to solve for the function.

Now you have a potential function (), that represents the solution to the problem. To solve, the function u must be determined. If you take the partial derivative of the unknown function with respect to y this time, you will get N. By setting up the equation this way, you can then isolate u.

You already know what N is, so:

- Next substitute the potential function into the Prop and solve for u by performing an integration.

- The final solution is achieved by substituting this u Prop back into the function . Since this function describes level curves, it is set equal to a constant c.

The question remains, why do you take partial derivatives of M and N to determine if an equation is exact? M and N have been defined as the partial derivatives of z with respect to x and y respectively.

By taking the second partial derivative of each coefficient
**WITH RESPECT TO THE OPPOSITE VARIABLE**,
the LHS of both of these equations is equal and therefore the
RHS are equal too.

This is verified below:

Now that the method has been explained, the following example puts it all together to solve a problem.

Expl #14 Solving an Exact Equation

- Input the following differential equation:

- Define M & N and test for exactness:

- The equation is exact so you can use the method developed in the last example to solve the problem. This time use N to solve the equation to demonstrate the second way you can solve these problems. Set up the potential function as shown in the last example, using N this time.

- Now find the arbitrary function u by equating M to the partial derivative with respect to x of the potential function .

- All that remains is to substitute u into the potential equation for the final solution to the problem.

The previous four examples demonstrate a method of finding the solution to an exact differential equation by confirming that the partial derivatives with respect to y of M and x of N are equal. When this test fails, the equation can sometimes be transformed from a non-exact into an exact equation, by applying an integrating factor.

Although there is not a general rule for finding integrating factors for exact equations, there are a few special cases where the method, described below, can sometimes help you find one.

As mentioned eariler, an integrating factor is a function that, when multiplied on to a differential equation, yields an equation that is recognized as a derivative. Once in this form, you can use the solution methods just discussed to solve the equation.

When an equation fails the test for exactness there are five types of integrating factors that, if applicable, you can use to transform an equation into one that you can use with the methods discussed in the last section. You will derive this method in general terms and learn to use LiveMath to find one of these factors. The remaining cases will be listed for reference.

First make the assumption that the equation in question cannot be solved by other methods discussed to this point.

- The first thing you will do is apply an unknown integrating factor ( below) to each term:

For computational efficiency declare both the unknown factor and the coefficients of the differentials as variables.

- Test for exactness.

If you can isolate from this equation, you can apply the result to the differential equation to make it exact. The following example derives the first case where the potential integrating factor is a function of x alone.

Expl #15 Deriving an Integrating Factor

- Input:

As mentioned above , M and N are declared as variables. You know that each is a function, but by declaring them user defined variables in LiveMath, the derivation is much easier to follow.

- Simplify the expression.

- In this example assume the integrating factor to be a function of x only. Because of this fact, the partial derivative with respect to y of is zero. Create a Prop defining this relationship and substitute it into the equation.

- Now isolate and its derivative, d/dx.

- Next integrate both sides. At this point, it is best to re-label the equation to better show what happens and to set up the notebook into a form that you can use to find factors for real problems. The LHS, when integrated, gives back the natural log of the factor ,so, input a new equation with the LHS in this form (Reason: LiveMath cannot automatically integrate the LHS without a Transformation Rule). The RHS is best abbreviated into a new variable. Use u as this variable.

- All that remains is to solve for u. Do this by exponentiating both sides (you, of course, could just isolate using LiveMath, but it just wouldn't be as fun!)

You now have the equations necessary to give an integrating factor for an equation where the factor is a function of x. The Prop defining u gives you a method of testing whether it is a function of x for the problem at hand. Using the same notation, the next example demonstrates how to find this factor using LiveMath.

Expl #16 Finding an Integrating Factor

The equation in this example is first tested for exactness using the methods described in prior examples. Set up your notebook making sure the Case Theories are as shown. This will allow you to add the f=f(y) case to the notebook later on.

- Input the three Props shown below:

The main equations are in the M and N Props. By setting the notebook up this way, you can test other problems by changing M and N with Auto-Remanipulation turned on. Make sure all variables are declared as User Defined Variables.

- Next, create a main Case Theory with the first Prop being an independence declaration of x and y. Set up a second Case Theory, within the first Case Theory, where you will test the exactness of the given equation. Do the substitutions to test the equation.

- Next, set up two temporary coefficient variables P and Q to determine the factor. You do this so that you can apply the factor back onto the original coefficients M and N after it is determined. Substitute the M and N Props into them. Set these up just below the Case Theory that tests for exactness, but still inside the main Case Theory.

- From the last example, input the equation defining both u and the derivation of the integrating factor using the new temporary variables P and Q.

- With Auto-Simplify on, substitute P and Q into the u Prop. Then substitute the u conclusion into the Prop to obtain the factor.

- Now apply this to the original coefficients and test for exactness. Create a 3rd Case Theory to do this as shown below.

- After the substitutions are made, the case theory should look like the following. Remember everything shown below is inside the main case theory just below the Check Exactness case theory.

The equation below shows the new coefficients applied. Using the methods discussed earlier, you can now solve the equation.

**NOTE:** It is important to again note that the function
u is in terms of x alone. This is a requirement for this factor
to work. If it is not, try one of the other methods shown below.

The previous example showed that, if a factor in x is obtainable, you can make a non-exact equation exact by applying the integrating factor just derived. You can derive another case in which a factor in y can turn a non-exact equation into one that is. It is derived in the same manner as above and is shown below.

Three more cases can be derived and they are:

- = (u) where u=xy

- = (u) where u=x/y

- = (u) where u=y/x

This analysis of integrating factors leads you into the next solution method. A very important differential equation is one that has both the dependent variable and its derivative of the first degree.

Differential Equations

Copyright © 2000 by N. Scott Hoffner