`(dy)/(dx)+(cot\ x)y=cos\ x`

Here, `P(x)=cot\ x` and `Q(x)=cos\ x`.

`"IF"=e^(intPdx)` `=e^(intcot\ x\ dx)` `=e^(ln\ sin\ x)` `=sin\ x`

Now `Qe^(intPdx)=cos\ x\ sin\ x`.

Apply the formula, `ye^(intPdx)=intQe^(intPdx)dx` to obtain:

`y\ sin\ x=intcos\ x\ sin\ x\ dx`

The integral needs a simple substitution: `u = sin\ x`, `du = cos\ x\ dx`

`y\ sin\ x=(sin^2x)/2+K`

Divide throughout by sin x to get the required general solution of the DE:

`y=(sin\ x)/2+K\ csc\ x`

Please support IntMath!