The general solution of the differential equation \(\displaystyle\frac{dy}{dx} + y\cos x = \sin x\cos x\) is (C is an arbitrary constant)
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → \(y = \sin x - 1 + Ce^{-\sin x}\)
This is a linear equation with \(P = \cos x\) and \(Q = \sin x\cos x\). The integrating factor is
\( e^{\int \cos x\,dx} = e^{\sin x} \)
So
\( \displaystyle y\,e^{\sin x} = \int \sin x\cos x\,e^{\sin x}\,dx \)
With \(t = \sin x\), \(dt = \cos x\,dx\), and integrating by parts:
\( \displaystyle \int t\,e^{t}\,dt = (t - 1)e^{t} + C \)
\( y\,e^{\sin x} = (\sin x - 1)e^{\sin x} + C \)
\( y = \sin x - 1 + Ce^{-\sin x} \)
Why the other options are incorrect
Option (2) \(y = \sin x + 1 + Ce^{-\sin x}\) — Incorrect. By parts, \(\int te^{t}\,dt = te^{t} - e^{t}\), so the constant term is \(-1\), not \(+1\).
Option (3) \(y = 1 - \sin x + Ce^{-\sin x}\) — Incorrect. Check with \(C = 0\): \(y = 1 - \sin x\) gives \(y' + y\cos x = -\sin x\cos x\), the wrong sign.
Option (4) \(y = \sin x - 1 + Ce^{\sin x}\) — Incorrect. Dividing by the integrating factor \(e^{\sin x}\) gives \(Ce^{-\sin x}\), not \(Ce^{\sin x}\).