The given equation is
extan y dx+(2−ex)sec2y dy=0
⇒−ex2−exdx=sec2ytan ydy
⇒−∫ex2−exdx=∫sec2ytan ydy
Put 2−ex=z⇒−exdx=dz
And tany=u⇒ sec2y dy=du
∴∫1zdz=∫1udu
log z=log u+log C [C is arbitary constant of intregation]
log z=log (u⋅C)
z=u⋅C
∴ 2−ex=C⋅tan y ....... (i)
When x=0, then y=π4 [given]
⇒2−e0=C⋅tanπ4
⇒2−1=C⋅1⇒C=1
putting C=1 in the equation (i)
The particular solution of the given differential equation is,
tan y=2−ex