cot(x)=(cos(x)/sin(x)) so

` cot(x)-1/x = cos(x)/sin(x)-1/x = (xcos(x)-sin(x))/(xsin(x))`

So

`lim_(x->0) (cot(x)-1/x) = lim_(x->0) (xcos(x)-sin(x))/(xsin(x))`

Since this limit is `0/0` we can use L'Hopital's rule and get

`= lim_(x->0) (-xsin(x)+cos(x)-cos(x))/(xcos(x)+sin(x))=lim_(x->0) (-xsin(x))/(xcos(x)+sin(x))`

This limit is `0/0` again so reapply L'Hopital's rule again

`= lim_(x->0) (-xcos(x)-sin(x))/(-xsin(x)+cos(x)+cos(x))`

Now evaluating this we get

`= (-0(cos(0))-sin(0))/(-0(sin(0))+cos(0)+cos(0))=(0)/(2) = 0`

So

`lim_(x->0) cot(x)-1/x = 0`