Exact Differential Equations

Exercise 1.4
1. Determine whether the following differential equations are exact or not. If so, solve.

(a) $\ (x^{2} + y^{2})dx + 2xy dy = 0$
(b) $\ (ye^{xy} + 2xy)dx + (xe^{xy} + x^{2})dy = 0$
(c) $\ (1 + x y^{2})dx + (x^{2}y + y)dy = 0$
(d) $\ (y^{2} - x^{2})dx + 2xydy = 0$

2. Solve the following initial value problems.
(a) $ x^{2}dx + ye^{y}dy = 0,  y(0) = 1 $
(b) $ (e^{x}y + \sin{y})dx + (e^{x} + x\cos{y})dy = 0,  y(0) = 1$
(c) $ (\cos{x}\sin{x} - xy^{2})dx - y(x^{2} - 1)dy = 0,  y(0) = 2$

Answer
1. (a) Since $M(x,y) = x^2 + y^2$, $M_{y} = 2y$. Also since $N(x,y) = 2xy$, $N_{x} = 2y$. Then $M_{y} = N_{x}$ and exact. Now using grouping method, we have

$\displaystyle x^2 dx + (y^2 dx + 2xy dy) = 0 $

Rewrite this using total differentials.

$\displaystyle d(\frac{x^3}{3}) + d(xy^{2}) = d(c) $

Therefore,

$\displaystyle \frac{x^3}{3} + xy^{2} = c . \ \ $

(b) Since $M(x,y) = ye^{xy} + 2xy$, $M_{y} = e^{xy} + xye^{xy} + 2x$. Also since $N(x,y) = xe^{xy} + x^2$, $N_{x} = e^{xy} + xye^{xy} + 2x$. Thus, $M_{y} = N_{x}$ and exact. Now using the initial condition $(x_{0},y_{0}) = (0,0)$, we have

$\displaystyle u(x,y)$ $\displaystyle =$ $\displaystyle \int_{0}^{x}(ye^{\xi y} + 2\xi y)d\xi + \int_{0}^{y} 0 d\eta$  
  $\displaystyle =$ $\displaystyle e^{\xi y} + \xi^{2}y\mid_{0}^{x} = e^{xy} + x^{2}y$  

Therefore,

$\displaystyle e^{xy} + x^2 y = c . \ \ $

(c) Since $M(x,y) = 1 + x y^2$, $M_{y} = 2xy$. Also since $N(x,y) = x^2 y + y$, $N_{x} = 2xy$. Thus, $M_{y} = N_{x}$ and exact. Now using grouping method, we have

$\displaystyle dx + (xy^2 dx + x^2 y dy) + y dy = 0 $

Rewrite this using the total differentials

$\displaystyle d(x) + d(\frac{x^2 y^2}{2}) + d(\frac{y^2}{2}) = d(c) $

Therefore,

$\displaystyle x + \frac{x^2 y^2}{2} + \frac{y^2}{2} = c . \ \ $

(d) Since $M(x,y) = y^2 - x^2$, $M_{y} = 2y$. Also since $N(x,y) = 2xy$, $N_{x} = 2y$. Thus, $M_{y} = N_{x}$ and exact. Now using the grouping method, we have

$\displaystyle - x^2 dx + (y^2 dx + 2xy dy) = 0 $

Rewrite this using total differentials, we have

$\displaystyle d(\frac{- x^3}{3}) + d(xy^{2}) = d(c) $

Therefore,

$\displaystyle - \frac{x^3}{3} + xy^{2} = c . \ \ $

2. (a) Since $M(x,y) = x^2$, $M_{y} = 0$. Also since $N(x,y) = ye^{y}$, $N_{x} = 0$. Thus, $M_{y} = N_{x}$ and exact. Here using the grouping method, we have

$\displaystyle x^2 dx + ye^{y} dy = 0$

Rewrite this using the total differentials, we have

$\displaystyle d(\frac{x^3}{3}) + d(ye^{y} - e^{y}) = d(c) $

Therefore,

$\displaystyle \frac{x^3}{3} + ye^{y} - e^{y} = c $

Now using the initial condition $y(0) = 1$, we have $0 + e - e = 0$ and

$\displaystyle \frac{x^3}{3} + ye^{y} - e^{y} = 0 \ \ $

Alternate Solution Since $M(x,y) = x^2$, $M_{y} = 0$. Also since $N(x,y) = ye^{y}$, $N_{x} = 0$. Thus, $M_{y} = N_{x}$ and exact. Now set $(x_{0},y_{0}) = (0,0)$. Then we have

$\displaystyle u(x,y)$ $\displaystyle =$ $\displaystyle \int_{0}^{x}\xi^{2}d\xi + \int_{0}^{y} \eta e^{\eta} d\eta$  
  $\displaystyle =$ $\displaystyle \frac{\xi^{3}}{3}\mid_{0}^{x} + (\eta e^{\eta} - e^{\eta})\mid_{0}^{y}$  
  $\displaystyle =$ $\displaystyle \frac{x^3}{3} + y e^{y} - e^{y}$  

Therefore,

$\displaystyle \frac{x^3}{3} + ye^{y} - e^{y} = c $

Now using the initial condition $y(0) = 1$, we have $0 + e - e = 0$ and

$\displaystyle \frac{x^3}{3} + ye^{y} - e^{y} = 0 \ \ $

(b) Since $M(x,y) = e^{x}y + \sin{y}$, $M_{y} = e^{x} + \cos{y}$. Also since $N(x,y) = e^{x} + x \cos{y}$, $N_{x} = e^{x} + \cos{y}$. Thus, $M_{y} = N_{x}$ and exact. Set $(x_{0},y_{0}) = (0,0)$. Then we have

$\displaystyle u(x,y)$ $\displaystyle =$ $\displaystyle \int_{0}^{x}(e^{\xi}y + \sin{y})d\xi + \int_{0}^{y} 0 d\eta$  
  $\displaystyle =$ $\displaystyle e^{x}y + x \sin{y}$  

Thus, the general solution is

$\displaystyle e^{x}y + x \sin{y} = c $

Now using the initial condition $y(0) = 1$, we have $1 = c$ and

$\displaystyle e^{x}y + x \sin{y} = 1 \ \ $

(c) Since $M(x,y) = \cos{x} \sin{x} - xy^2$, $M_{y} = - 2xy$. Also since $N(x,y) = - y(x^2 - 1)$, $N_{x} = - 2xy$. Thus, $M_{y} = N_{x}$ and exact. Using the grouping method, we have

$\displaystyle \cos{x} \sin{x} dx + (- xy^2 dx - yx^2 dy) + y dy = 0$

Rewrite this using total differentials,

$\displaystyle d(\frac{\sin^{2}{x}}{2}) + d(- \frac{x^2 y^2}{2}) + d(\frac{y^2}{2}) = d(c) $

Therefore, the general solution is

$\displaystyle \frac{\sin^{2}{x}}{2} - \frac{x^2 y^2}{2} + \frac{y^2}{2} = c $

Here using the initial condition $y(0) = 2$, we have $0 - 0 + 2 = c$ and

$\displaystyle \sin^{2}{x} - x^2 y^2 + y^2 = 4 \ \ $