Step 1: Understanding the Concept
The equation can be written in separated form, with all y terms on one side and all x terms on the other.
Step 2: Separate the variables
\[ e^{-x}(y + 1)\,dy = -(\cos^2 x - \sin 2x)\,y\,dx \Rightarrow \frac{y + 1}{y}\,dy = -e^{x}(\cos^2 x - \sin 2x)\,dx \]
Step 3: Integrate
Left side: \(\int \left(1 + \frac1y\right)dy = y + \log y\).
For the right side note that \(\dfrac{d}{dx}\left(e^x\cos^2 x\right) = e^x\cos^2 x - e^x\cdot 2\sin x\cos x = e^x(\cos^2 x - \sin 2x)\).
So the right side integrates to \(-e^x\cos^2 x\), and
\[ y + \log y + e^x\cos^2 x = C \]
Step 4: Use the condition
At \(x = 0, y = 1\): \(1 + 0 + 1 = C\), so \(C = 2\).
\[ \log y + y + e^x\cos^2 x = 2 \]
This is option (B). Option (A) has \(1/y\) instead of y and C = 1, which does not satisfy the given point.
Final Answer:
The solution is \(\log y + y + e^x\cos^2 x = 2\), option (B).
\[ \boxed{\log y + y + e^x\cos^2 x = 2} \]