EXAMPLE: EXACT DIFFERENTIAL EQUATIONS

110.302 DIFFERENTIAL EQUATIONS PROFESSOR RICHARD BROWN

Problem. Solve the Initial Value Problem 2x + y^{2} + 2xy \frac{dy}{dx} = 0, y(1) = 1.

Strategy. Solving this ODE with an initial point means finding the particular solution to the ODE that passes through the point (1, 1) in the ty-plane. Here we show that the ODE is exact, and use standard calculus integration and differentiation to find a function of both x and y whose level sets are the implicit general solutions to the ODE. We then use the initial data to find the particular solution.

Solution. This ODE is exact. Indeed, we identify M(x, y) = 2x + y^{2} as the collection of all terms not attached to the y′ factor, and N(x, y) = 2xy as the coefficient of y′. Then the exactness condition is

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

Thus we know by theorem that there exists a function φ(x, y), where (1) \frac{∂φ}{∂x} = M, (2) \frac{∂φ}{∂y} = N, and (3) φ(x, y) = C is the general solution to the exact ODE. We can recover this function φ(x, y) by integrating the partial derivatives. Here, we fist integrate M to get some specific information on φ. Here

∫ M dx = ∫ (\frac{∂φ}{∂x}) dx = ∫ (2x + y^{2}) = x^{2} + xy^{2} + h(y) = φ(x, y).

Thus we have a good idea of what φ looks like, up to the unknown function h(y). Notice here, though, that the constant of integration may not be a constant. This is because you are finding the antiderivative of a partial derivative. With respect to x, the antiderivatives of M will vary by a constant in the x-variable. Thus ANY function of y alone would serve as a constant under the partial derivative with respect to x. We need to account for this in general. Hence the term consisting of the unknown function h(y) at the end.

To continue, we now can use the other partial derivative to work out the rest of φ. Indeed, we use what we know to calculate

\frac{∂}{∂y} φ(x, y) = \frac{∂}{∂y} [x^{2} + xy^{2} + h(y)] = 2xy + h′(y).

Here, h(y) is a function ONLY of y, so the partial derivative IS the total derivative. This last expression for the partial of φ with respect to y also IS N, so that

\frac{∂}{∂y} φ(x, y) = 2xy + h′(y) = 2xy = N.

Hence h′(y) = 0, and we can conclude that h(y) is a constant. Thus φ(x, y) = x^{2} + xy^{2} + constant = C, or realizing that the two constants are really one constant since both are a priori unknown,

φ(x, y) = x^{2} + xy^{2} = C

is the general solution to the ODE 2x + y^{2} + 2xyy′ = 0.

To solve the IVP, set x = 1 and y = 1, to get

φ(1, 1) = (1)^{2} + (1)(1)^{2} = C, ⟹ C = 2,

and our particular solution to the IVP is x^{2} + xy^{2} = 2, at least implicitly.

We should take this one step further and understand the domain for the solution. Solving for y, we get the integral curve defined by the pieces

y = ±\sqrt{\frac{2 − x^{2}}{x}} .

Limiting ourselves to the piece containing the point (1, 1), we get y = \sqrt{\frac{2−x^{2}}{x}}. The domain

of this function is only (0, \sqrt{2}]. Hence the particular solution to this IVP is

y(x) = \sqrt{\frac{2 − x^{2}}{x}} , for x ∈ (0, \sqrt{2}].

The graph of y(x) is in red.

Is it correct? Check: For y(x) = \sqrt{\frac{2 − x^{2}}{x}}, we have

y′(x) = \frac{1}{2} (\frac{2 − x^{2}}{x} )^{− \frac{1}{2}} · (−\frac{2}{x^{2}} − 1) = \frac{\frac{−2−x^{2}}{2x^{2}}}{\sqrt{\frac{2−x^{2}}{x}}} .

Thus the ODE is

2x + y^{2} + 2xyy′ = 0
2x + (\sqrt{\frac{2 − x^{2}}{x}} )^{2} + 2x (\sqrt{\frac{2 − x^{2}}{x}} ) (\frac{\frac{−2−x^{2}}{2x^{2}}}{\sqrt{\frac{2−x^{2}}{x}}} ) = 0

2x + \frac{2 − x^{2}}{x} + 2x (\frac{−2 − x^{2}}{2x^{2}} ) = 0
2x + \frac{2}{x} − x − \frac{4}{2x} − x = 0.

It all works.