The given differential equation is
extanydx+(1−ex)sec2ydy=0
Separating variables
Dividing every term by (1−ex)tany,
1−exexdx+tanysec2ydy=0
Integrating both sides
∫1−exexdx+∫tanysec2ydy=c
Evaluating integrals
−log∣1−ex∣+log∣tany∣=c
Using
∫f(x)f′(x)dx=log∣f(x)∣
Combining logarithms
log1−extany=logc′
Removing logarithm
tany=c′(1−ex)
Let
c′=±C
Final Answer
tany=C(1−ex)