Ohhhh boy. This is gonna be long.
First let's write down the quotient rule:
#d/dx(u(x))/(v(x))=(u'(x)v(x)-u(x)v'(x))/([v(x)]^2)#
In our case #u(x)=x+1# and #v(x)=xcot(x)#.
Let's now find #u'(x)# and #v'(x)#:
#d/dx(x+1)=1#
#d/dx(xcot(x))=...#
...and this is where it begins to get complicated because in order to find the derivative of #xcot(x)#, we need to use the product rule, which states:
#d/dxu(x)v(x)=u'(x)v(x)+u(x)v(x)'#
In #xcot(x)#, #u(x)=x# and #v(x)=cot(x)#. Let's find the derivatives:
#d/dx x=1#
#d/dx cot(x)=-csc^2(x)#
Applying this to the product rule,
#d/dx(xcot(x))=(x)'(cot(x))+(x)(cot(x))'#
#d/dx(xcot(x))=cot(x)-xcsc^2(x)#
Okay, now back to the quotient rule. We know
#d/dx(x+1)=1#
#d/dx(xcot(x))=cot(x)-xcsc^2(x)#
Let's plug it all into the quotient rule:
#d/dx(x+1)/(xcot(x))=((x+1)'(xcot(x))-(x+1)(xcot(x))')/([xcot(x)]^2)#
Making necessary substitutions,
#d/dx(x+1)/(xcot(x))=((1)(xcot(x))-(x+1)(cot(x)-xcsc^2(x)))/([xcot(x)]^2)#
Now onto the algebra/trig:
#d/dx(x+1)/(xcot(x))=(xcot(x)-(xcot(x)-x^2csc^2(x)+cot(x)-xcsc^2(x)))/(x^2cot^2(x)##->#multiplying #x+1# by #cot(x)-xcsc^2(x)# and squaring the denominator
#d/dx(x+1)/(xcot(x))=(xcot(x)-xcot(x)+x^2csc^2(x)-cot(x)+xcsc^2(x))/(x^2cot^2(x)##->#distributing the negative sign
#d/dx(x+1)/(xcot(x))=((xcsc^2(x))(x+1)-cot(x))/(x^2cot^2(x)##->#canceling #xcot(x)# and factoring out #xcsc^2(x)#
#d/dx(x+1)/(xcot(x))=((xcsc^2(x))(x+1))/(x^2cot^2(x))-(cot(x))/(x^2cot^2(x))##->#splitting the fraction
#d/dx(x+1)/(xcot(x))=((csc^2(x))(x+1))/(xcot^2(x))-(1)/(x^2cot(x))##->#doing some canceling
#d/dx(x+1)/(xcot(x))=((sec^2(x))(x+1))/(x)-(tan(x))/(x^2)##->#because #csc^2(x)/cot^2(x)=sec^2(x)# and #1/cot(x)=tan(x)#
#d/dx(x+1)/(xcot(x))=((xsec^2(x))(x+1)-(tan(x)))/(x^2)##->#adding the fractions
We can also express this result with only sines and cosines:
#d/dx(x+1)/(xcot(x))=(x^2sec^2(x)+xsec^2(x)-tan(x))/(x^2)#
#d/dx(x+1)/(xcot(x))=1/cos^2(x)(x^2+x-sin(x)cos(x))/(x^2)#
#d/dx(x+1)/(xcot(x))=(x^2+x-sin(x)cos(x))/(x^2cos^2(x))#
#d/dx(x+1)/(xcot(x))=2/2*(x^2+x-sin(x)cos(x))/(x^2cos^2(x))#
#d/dx(x+1)/(xcot(x))=(2x^2+2x-2sin(x)cos(x))/(2x^2cos^2(x))#
#d/dx(x+1)/(xcot(x))=(2x^2+2x-sin(2x))/(2x^2cos^2(x))#
And with that, we have our result.