EXAMPLE: EXACT DIFFERENTIAL EQUATIONS

110.302 DIFFERENTIAL EQUATIONS PROFESSOR RICHARD BROWN

Problem. Solve the Ordinary Differential Equation \frac{dy}{dx} = \frac{x^{2}}{1 − y^{2}}.

Strategy. Solving the ODE means finding the general solution (the 1-parameter family of solutions). We first note that it is a separable differential equation. But also, it is exact. We will solve this problem both ways.

Solution. This ODE is separable since the right-hand-side can be written as a product of two functions, one solely a function of the independent variable x and the other of the dependent variable y. Here, we can write

\frac{dy}{dx} = \frac{x^{2}}{1 − y^{2}} = x^{2} (\frac{1}{1 − y^{2}}) .

We can separate the variables by dividing the entire equation by the function of the dependent variable:

(1 − y^{2}) [\frac{dy}{dx} = x^{2} (\frac{1}{1 − y^{2}})]
(1 − y^{2})\frac{dy}{dx} = x^{2}.

Now we can integrate both sides with respect to x

∫ (1 − y^{2})\frac{dy}{dx} dx = ∫ (1 − y^{2}) dy = ∫ x^{2} dx

y − \frac{y^{3}}{3} = \frac{x^{3}}{3} + C.

This is the implicit solution to the ODE.

This ODE is also exact. To see this, rewrite the equation in the general form M(x, y) + N(x, y)\frac{dy}{dx} = 0. Here,

−x^{2} + (1 − y^{2})\frac{dy}{dx} = 0.

2 110.302 DIFFERENTIAL EQUATIONS PROFESSOR RICHARD BROWN

Recall in the book that a separable ODE is one in the general form where M is solely a function of x and N is solely a function of y. You can see that this is the case, and the ODE is separable.

The criterion for the equation M(x, y) + N(x, y)\frac{dy}{dx} = 0 to be exact is for the partial of M(x, y) with respect to y to be equal to the partial of N(x, y) with respect to x, or

\frac{∂M}{∂y} = M_{y} = N_{x} = \frac{∂N}{∂x} .

However, whenever a ODE is separable, there is no y in the function M and there is no x in the function N: An ODE is separable if it can be written

M(x) + N(y)\frac{dy}{dx} = 0.

In our case, M(x, y) = M(x) = −x^{2}, and N(x, y) = N(y) = 1 − y^{2}. Thus

M_{y} = 0 = N_{x}

and the ODE is exact.

Note. Separable first-order ODEs are ALWAYS exact. But many exact ODEs are NOT separable.

Thus there exists a function φ(x, y) which solves the ODE implicitly, and whose partials are the functions M and N. To solve, identify the partial of φ with respect to x with M and integrate with respect to x (to recover φ):

\frac{∂φ}{∂x} = −x^{2}, and φ(x, y) = ∫ \frac{∂φ}{∂x} dx = ∫ (−x^{2}) dx = −\frac{x^{3}}{3} + h(y).

So we now have at least some information about the form of the function φ(x, y).

Question 1. Why is the constant of integration here the function h(y)? This is a very important question!

Now if we take our form for φ(x, y) = −\frac{x^{3}}{3} +h(y), and take the partial with respect to y, we get

\frac{∂φ}{∂y}(x, y) = \frac{∂}{∂y} [−\frac{x^{3}}{3} + h(y)] = 0 + h′(y).

But the partial of φ with respect to y is also precisely the function N(y) = 1 − y^{2}. Hence we equate the two

h′(y) = 1 − y^{2}.

Thus using Calculus II, we can find the form for h(y): We get h(y) = y − \frac{y^{3}}{3}, so that

φ(x, y) = −\frac{x^{3}}{3} + y − \frac{y^{3}}{3}.

Finally, the entire original ODE M(x, y) + N(x, y)\frac{dy}{dx} = 0 is simply a restatement that the total derivative with respect to the independent variable x, assuming y is an implicit function of x, is zero. This happens along the level curves of φ(x, y):

\frac{d}{dx}φ(x, y(x)) = 0 = \frac{∂φ}{∂x} + \frac{∂φ}{∂y} \frac{dy}{dx} = −x^{2} + (1 − y^{2})\frac{dy}{dx}.

Thus the general solution to the original ODE is

φ(x, y) = C = −\frac{x^{3}}{3} + y − \frac{y^{3}}{3},

as before.