Step 1: Separate the variables:
\(e^{-x}(y + 1)\,dy = -(\cos^2x - \sin2x)y\,dx\). Divide by \(y\) and multiply by \(e^x\):
\[ \frac{y + 1}{y}\,dy = -e^x(\cos^2x - \sin2x)\,dx \]
Step 2: Recognise the derivative:
\(\frac{d}{dx}\left(e^x\cos^2x\right) = e^x\cos^2x - e^x\cdot2\sin x\cos x = e^x(\cos^2x - \sin2x)\).
So the right hand side is \(-d(e^x\cos^2x)\).
Step 3: Integrate:
\[ y + \log y = -e^x\cos^2x + C \Rightarrow \log y + y + e^x\cos^2x = C \]
At \(x = 0\), \(y = 1\): \(0 + 1 + 1 = 2 = C\). So \(\log y + y + e^x\cos^2x = 2\), option (B).
Final Answer:
The solution is \(\log y + y + e^x\cos^2x = 2\), option (B).
\[ \boxed{\log y + y + e^x\cos^2x = 2} \]