dydx+1cosx.y=sinxcosx
1cosx.y=tanx
dydx+ysecx=tanx
Comparing with dydx+py=q
P=secx,q=tanx
I.f=e∫secxdx=elog(secx+tanx)=secx+tanx
Therefore required solution is
y.e∫Pdx=∫e∫PdxQdx
y(secx+xtanx)=∫tanx(secx+tanx)dx+c
=∫(secx+tanx)dx+∫tan2xdx+c=secx+∫(sec2x−1)dx+c
=secx+tanx−x+c