The required integral is
I = int[cosx/(sinx)^2 + sinx]dxI=∫[cosx(sinx)2+sinx]dx
This can be evaluated as two separate integrals,
I = I_1 + I_2I=I1+I2 , where I_1 = intcosx/(sinx)^2dxI1=∫cosx(sinx)2dx and I_2 = intsinxdxI2=∫sinxdx
The solution of I_2I2 is trivial,
I_2 = intsinxdx = -cosx + C_2I2=∫sinxdx=−cosx+C2
For I_1:I1:
Let sinx = tsinx=t
Differentiating with respect to t,
cosxdx/dt = 1cosxdxdt=1
=> cosxdx = dt⇒cosxdx=dt
This transforms I_1I1 to
I_1 = int1/t^2dtI1=∫1t2dt
which has the simple solution of
I_1 = -1/t + C_1I1=−1t+C1
Replacing the value of t = sinxt=sinx
I_1 = -1/sinx + C_1I1=−1sinx+C1
Combining both solutions,
I = I_1 + I_2I=I1+I2
=> I = -1/sinx + C_1 -cosx + C_2⇒I=−1sinx+C1−cosx+C2
The constants of integration C_1C1 and C_2C2 can be added without affecting the solution.
Finally, the answer is
I = -1/sinx -cosx + CI=−1sinx−cosx+C