The teacher hasn't uploaded a solution for this question yet.
The given differential equation is $\frac{dy}{dx} = \cos x - 2y$. This can be rewritten as $\frac{dy}{dx} + 2y = \cos x$. This is a first-order linear differential equation of the form $\frac{dy}{dx} + P(x)y = Q(x)$, where $P(x) = 2$ and $Q(x) = \cos x$.
The integrating factor (IF) is given by $e^{\int P(x) dx}$. In this case, $P(x) = 2$, so the integrating factor is $e^{\int 2 dx} = e^{2x}$.
Multiply the entire equation $\frac{dy}{dx} + 2y = \cos x$ by the integrating factor $e^{2x}$: $e^{2x}\frac{dy}{dx} + 2e^{2x}y = e^{2x}\cos x$
The left side of the equation is the derivative of $ye^{2x}$ with respect to $x$. Therefore, we can write: $\int (e^{2x}\frac{dy}{dx} + 2e^{2x}y) dx = \int e^{2x}\cos x dx$ $ye^{2x} = \int e^{2x}\cos x dx$
Let $I = \int e^{2x}\cos x dx$. We can use integration by parts twice. First, let $u = e^{2x}$ and $dv = \cos x dx$. Then $du = 2e^{2x} dx$ and $v = \sin x$. $I = e^{2x}\sin x - \int 2e^{2x}\sin x dx$ Now, let $u = e^{2x}$ and $dv = \sin x dx$. Then $du = 2e^{2x} dx$ and $v = -\cos x$. $I = e^{2x}\sin x - 2(e^{2x}(-\cos x) - \int 2e^{2x}(-\cos x) dx)$ $I = e^{2x}\sin x + 2e^{2x}\cos x - 4\int e^{2x}\cos x dx$ $I = e^{2x}\sin x + 2e^{2x}\cos x - 4I$ $5I = e^{2x}\sin x + 2e^{2x}\cos x$ $I = \frac{1}{5}e^{2x}(\sin x + 2\cos x)$
Substitute the integral back into the equation: $ye^{2x} = \frac{1}{5}e^{2x}(\sin x + 2\cos x) + C$ Divide by $e^{2x}$: $y = \frac{1}{5}(\sin x + 2\cos x) + Ce^{-2x}$
Final Answer: $y = \frac{1}{5}(\sin x + 2\cos x) + Ce^{-2x}$
AI generated content. Review strictly for academic accuracy.