Originally Posted by

**Prove It** $\displaystyle \cos{x}\frac{dy}{dx} - (\sin{x})y = x\cos{x}$

$\displaystyle \frac{dy}{dx} - (\tan{x})y = x$.

This is first order linear, so use the integrating factor:

$\displaystyle e^{\int{\tan{x}\,dx}} = e^{-\ln{(\cos{x})}} = e^{\ln{\sec{x}}} = \sec{x}$.

Multiplying through by the integrating factor gives:

$\displaystyle \sec{x}\frac{dy}{dx} - (\sec{x}\tan{x})y = x\sec{x}$

The left hand side is a product rule expansion of $\displaystyle (\sec{x})y$, so

$\displaystyle \frac{d}{dx}[(\sec{x})y] = x\sec{x}$

$\displaystyle (\sec{x})y = \int{x\sec{x}\,dx}$.

So $\displaystyle y = \cos{x}\int{x\sec{x}\,dx}$.