We can use integration by parts.
It states that:
#intudv=uv-intvdu#
We let: #u=arctan(cot(x))# and #dv=1#
#=>du=d/dx[arctan(cot(x))]#
#=>du=1/(1+cot^2(x))*d/dx[cot(x)]#
#=>du=1/(1+cot^2(x))*-csc^2(x)#
#=>du=-csc^2(x)/(1+cot^2(x))#
#v=int1dx#
#v=x#
We now have:
#arctan(cot(x))*x-int-csc^2(x)/(1+cot^2(x))*xdx#
#=>arctan(cot(x))*x-int(x*csc^2(x))/(-1-cot^2(x))dx#
Remember that:
#1+cot^2(x)=csc^2(x)# Manimpulate this to get:
#-1-cot^2(x)=-csc^2(x)#
#=>arctan(cot(x))*x-int(x*cancel(csc^2(x)))/(-cancel(csc^2(x)))dx#
#=>arctan(cot(x))*x-int-xdx#
#=>arctan(cot(x))*x+intxdx#
Remember that:
#intx^n=(x^(n+1))/(n+1)#
#=>arctan(cot(x))*x+x^2/2# Do you #C# why this is incomplete?
#=>xarctan(cot(x))+x^2/2+C# That is the answer!