cos x dy/dx + y sin x = sin x cos x
dy/dx - y/x = (ln x)^4
How would i solve for find y in these two problems? I'm looking over a similar example which used substitution but I'm confused on these two.
$\displaystyle \cos{x}\,\frac{dy}{dx} + y\sin{x} = \sin{x}\cos{x}$
$\displaystyle \frac{dy}{dx} + y\tan{x} = \sin{x}$
This is now first order linear, so the integrating factor is
$\displaystyle e^{\int{\tan{x}\,dx}} = e^{\ln{\sec{x}}}= \sec{x}$.
Multiplying through by the integrating factor gives:
$\displaystyle \sec{x}\,\frac{dy}{dx} + y\,\tan{x}\sec{x} = \tan{x}$
$\displaystyle \frac{d}{dx}(y\,\sec{x}) = \tan{x}$
$\displaystyle y\,\sec{x} = \int{\tan{x}\,dx}$
$\displaystyle y\,\sec{x} = \ln{|\sec{x}|} + C$
$\displaystyle y = \cos{x}\ln{|\sec{x}|} + C\cos{x}$.
$\displaystyle \frac{dy}{dx} - \frac{y}{x} = (\ln{x})^4$.
This is first order linear, so the integrating factor is
$\displaystyle e^{-\frac{1}{x}\,dx} = e^{-\ln{x}} = e^{\ln{(x)^{-1}}} = x^{-1}$.
Multiplying through by the integrating factor gives:
$\displaystyle x^{-1}\,\frac{dy}{dx} - x^{-2}y = x^{-1}(\ln{x})^4$
$\displaystyle \frac{d}{dx}(x^{-1}y) = x^{-1}(\ln{x})^4$
$\displaystyle x^{-1}y = \int{(\ln{x})^4\,x^{-1}\,dx}$.
Now make the substitution $\displaystyle u = \ln{x}$ so that $\displaystyle du = x^{-1}\,dx$, the equation becomes
$\displaystyle x^{-1}y = \int{u^4\,du}$
$\displaystyle x^{-1}y = \frac{u^5}{5} + C$
$\displaystyle x^{-1}y = \frac{(\ln{x})^5}{5} + C$
$\displaystyle y = \frac{x(\ln{x})^5}{5} + Cx$.