Here cos ydx+(1+2e−x)sin ydy=0⇒∫dx1+2e−x=−∫sin ycos ydy⇒∫ex dxex+2=−∫sin ycos ydy
In first integral, put ex+2=t⇒exdx=dt
Also, in second integral, put cos y=u⇒−sin ydy=du
∴∫dtt=∫duu⇒log|t|=log|u|+log C
⇒log|ex+2|=log|Ccos y|⇒ex+2=C cos y
As y(0)=π4,so e0+2=Ccosπ4⇒C=3√2
Hence the required particular solution is: ex+2=3√2cos y.