The solution of the differential equation `e^(-x) (y+1) dy +(cos^(2) x - sin 2x) y (dx) = 0` subjected to the condition that y = 1 when x = 0 is
A. `y=log|y|+e^(x)cos^(2)x=2`
B. `log|y+1|+e^(x)cos^(2)x=1`
C. `y+log|y|=e^(x)cos^(2)x`
D. `log|y+1|+e^(x)cos^(2)x=2`