# Solve the following differential equation. {eq}\displaystyle (\sin x) y' + (\cos x) y = \cos 2x {/eq}

## Question:

Solve the following differential equation.

{eq}\displaystyle (\sin x) y' + (\cos x) y = \cos 2x {/eq}

## Product Rule in Differentiation

Consider a differentiable function {eq}f(x) {/eq} that can be expressed as a product of two differentiable functions {eq}g(x) {/eq} and {eq}h(x) {/eq}:

\begin{align} f(x) = g(x) h(x) \\ \end{align}

The derivative of {eq}f(x) {/eq} can be written using the Product Rule:

\begin{align} f'(x) = g(x) h'(x) + g'(x)h(x) \\ \end{align}

Conversely, an expression of the form {eq}g(x) h'(x) + g'(x)h(x) {/eq} can be written in a condensed form as {eq}(g(x) \ h(x))' {/eq}. This result is sometimes useful while solving differential equations.

\begin{align} &\sin{x} y' + \cos{x} y = \cos{2x} \\ \Rightarrow & \dfrac{dy}{dx} \sin{x} + \cos{x} y = \cos 2x...