The solution of the equation dydx+y tan x=xm cos x is
This is the linear equation of the form
dydx+Py=Q,
Where P = tan x and Q=xm cos x
Now integrating factor (I.F.)=e∫ p dx=e∫ tan dx elog sec x=sec x
Thus solution is given
by, y.e∫ p dx=∫ Q.e∫P dx dx+c⇒ y.sec x=∫ xm.cos x sec xdx+c⇒ y sec x=xm+1m+1+c⇒(m+1)y=x(m+1)cos x+c(m+1)cos x.