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 \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\).