556 CHAPTER 29. FIRST ORDER SCALAR ODE

and the solution to the equation is of the form

f (x,y) =C (29.4)

where C is a constant. This function f is called a scalar potential or potential for short.These equations are called exact. Why does ∗ yield a solution? Say the above relation

defines y as a function of x. Then using the chain rule,

fx (x,y)+ fy (x,y)dydx

= 0

and so

fx (x,y)dx+ fy (x,y)dy = 0M (x,y)dx+N (x,y)dy = 0

It is easy to see that if there exists a C2 function f with the property that fx = M, fy = N,then Nx = My. This follows because My = fxy and Ny = fyx. By equality of mixed partialderivatives, you need to have My = Nx. In fact, if this last condition holds, then there willgenerally be such a potential function f (x,y).

Why is it that if Nx = My then there exists f with the properties described?Let

f (x,y)≡∫ x

0M (t,y)dt +N (0,y) .

Then fx (x,y) = M (x,y) , and formally differentiating across the integral,

fy (x,y) =∫ x

0My (t,y)dt +N (0,y) =

∫ x

0Nx (t,y)dt

= N (x,y)−N (0,y)+N (0,y) = N (x,y)

In general, this process of(

∂y

∫ x0 M (t,y)dt =

∫ x0 My (t,y)dt

)has not been proved, but in

examples, it will be obviously true. Also, it is formally true when you think of the integralas a sort of sum and use the fact that the derivative of a sum is the sum of the derivatives.

Example 29.5.1 Find the solutions to

(cos(x)+2xy)dx+ x2dy = 0

You see that this is exact (2x = 2x). Then the f (x,y) satisfies fx (x,y) = cos(x)+ 2xyand so f (x,y) = sin(x)+ x2y+ g(y). Then taking the partial derivative with respect to y,it follows that x2 +g′ (y) = x2 and so is suffices to let g(y) = 0. Then the solutions to thisdifferential equation are

sin(x)+ x2y =C

where C is a constant which would be determined by some sort of an initial condition.

Example 29.5.2 In the above example, determine C if (x,y) =(

π

2 ,0)

is to be on the curvewhich yields a solution to the differential equation.