Let f(x) = cotx

Then we know that: cot x = cosx/sinx

==> f(x) = cosx/sinx

Let us differetiate using the chain rule:

f(x) = u/v such that:

u= cosx =-=> u' = -sin

v= sinx ==> v' = cosx

==> f'(x) = (u'v- uv')/v^2

= (-sinx*sinx - cosx*cosx)/ sin^2 x

= (-sin^2x - cos^2x)/sin^2 x

Let us fctor -1 from the numerator:

==> f'(x) = -1(sin^2x + cos^2 x)/sin^2 x

We know that:

sin^2 x + cos^2 x = 1

==> f'(x) = -1/sin^2 x

But csc x = 1/sinx

**==> f'(x) = - csc^2 x** ...... q.e.d

To prove that (cotx)' = -cosec^2 x

Proof:

LHS = (cotx)' = (cosx/sinx)'

(cotx)' = {(cosx)'(sinx)- (cosx)(sinx)'}/(sinx)^2, as (u(x)/v(x))' = {u'(x)v(x)-u(x)v'(x)}/(v(x))^2.

(cotx)' = {(-sinx)(sinx) -cosx)(cosx)}/(sinx).

(cotx)' = -(sinx^2x+cos^2x)/(sin^2x) .

(cotx)' = -1/sin^2x, as sin^2x+cos^2x = 1 is an identity.

(cotx)' = - cosec^2x.

So (cotx)' = - cosec^2x is proved.

We know that cosec x = 1/sin x and cot x = cos x/ sin x

If we have to calculate the derivative of cot x, we'll consider the quotient rule:

(cos x/sin x)' = (cos x)'*(sin x) - (cos x)*(sin x)'/(sin x)^2

We'll calculate the derivatives of the functions sine and cosine:

(cos x)' = -sin x

(sin x)' = cos x

(cot x)' = [(-sin x)*(sin x) - (cos x)^2]/(sin x)^2

(cot x)' = - [(sin x)^2 + (cos x)^2]/(sin x)^2

But, from the fundamental formula of trigonometry, we'll have:

[(sin x)^2 + (cos x)^2] = 1

(cot x)' = -1/(sin x)^2

But 1/sin x = csc x.

If we'll raise to square both sides, we'll get:

1/(sin x)^2 = -(csc x)^2