Topic 2.10

Differentiate cotangent and cosecant

Builds on differentiating tangent and secant. 7 minutes.

The slope of the cotangent function

The cotangent is the ratio \(\cot x = \frac{\cos x}{\sin x}\). It has no value where \(\sin x = 0\), so the graph shows \(x\) between 0 and \(\pi\), in radians, with a dashed line at each end.

The lower graph shows the slope of the curve at each \(x\), and the orange bar marks the slope at the point. Go to \(x = \frac{\pi}{2}\), where the height is 0 and the slope is \(-1\). Go to \(x = \frac{\pi}{4}\), where the height is 1 and the slope is \(-2\). Go to \(x = \frac{\pi}{6}\), where the slope is \(-4\).

The curve is red because it falls, and its slope is never above \(-1\). The slope of the tangent function is the opposite: it is never below 1.

Cotangent and cosecant

The cosecant is \(\csc x = \frac{1}{\sin x}\), the reciprocal of the sine. Like the cotangent, it has no value where \(\sin x = 0\).

Drag the point along each curve, and use the button to switch between them. The curve of cot falls everywhere, so it is red. The curve of csc falls left of \(\frac{\pi}{2}\) and rises right of it, so it is red, then green. Its slope is 0 at its lowest point, \(\frac{\pi}{2}\).

Cosine, cotangent and cosecant are the three functions whose names start with co, and the derivative of each has a minus sign.

Notation

  1. Write the cotangent as a ratio of cosine and sine. The quotient rule applies where \(\sin x \ne 0\).

    \[\cot x = \frac{\cos x}{\sin x}\]

    These rules hold only when x is in radians.

  2. The derivative of cosine is minus sine, and the derivative of sine is cosine. Put these into the quotient rule.

    \[\begin{aligned} \frac{d}{dx}\cot x \\ {}= \frac{(-\sin x)\sin x - \cos x\cos x}{\sin^2 x} \end{aligned}\]
  3. Because \(\sin^2 x + \cos^2 x = 1\), the top \(-\sin^2 x - \cos^2 x\) is \(-1\). The fraction \(\frac{1}{\sin^2 x}\) is \(\csc^2 x\), and the minus sign stays in front.

    \[= \frac{-1}{\sin^2 x} = \cy{-\csc^2 x}\]
  4. The cosecant is 1 over sine, so use the quotient rule again. The top is the constant 1, and its derivative is 0.

    \[\begin{aligned} \frac{d}{dx}\csc x &= \frac{0\cdot\sin x - 1\cdot\cos x}{\sin^2 x} \\ &= \frac{-\cos x}{\sin^2 x} \end{aligned}\]
  5. Split the result into two factors, \(\csc x\) and \(\cot x\). The minus sign stays.

    \[\begin{aligned} \frac{-\cos x}{\sin^2 x} &= -\frac{1}{\sin x}\cdot\frac{\cos x}{\sin x} \\ \frac{d}{dx}\csc x &= \cy{-\csc x\cot x} \end{aligned}\]

When it fails

As \(x\) nears 0, \(\sin x\) nears 0, so the curve of cot grows without bound and its slope \(-\frac{1}{\sin^2 x}\) becomes very large and negative.

At \(x = 0\) and \(x = \pi\), \(\sin x\) is 0, so neither cot nor csc has a value or a slope there.

Example 1: two minus signs

Find \(y'\) for \(y = 6 - 4\csc x\), and say where the curve rises.

  1. The derivative of the constant 6 is 0, and the derivative of \(\csc x\) is \(-\csc x\cot x\).

    \[\begin{aligned} (6)' &= 0 \\ (\csc x)' &= -\csc x\cot x \end{aligned}\]
  2. The factor \(-4\) multiplies the rule, so the two minus signs make a plus.

    \[\begin{aligned} y' &= -4\cdot(-\csc x\cot x) \\ &= \cy{4\csc x\cot x} \end{aligned}\]
  3. For \(0 < x < \pi\), \(\csc x\) is positive, so \(y'\) has the sign of \(\cot x\). It is positive left of \(\frac{\pi}{2}\) and negative right of it.

  4. The curve rises for \(0 < x < \frac{\pi}{2}\), where it is green, and falls for \(\frac{\pi}{2} < x < \pi\), where it is red.

Example 2: a flat tangent

Find the slope of \(y = \cot x - 2\csc x\) at \(x = \frac{\pi}{3}\).

  1. The derivative of \(\cot x\) is \(-\csc^2 x\). The derivative of \(-2\csc x\) is \(+2\csc x\cot x\).

    \[y' = -\csc^2 x + 2\csc x\cot x\]
  2. At \(x = \frac{\pi}{3}\), \(\sin x = \frac{\sqrt3}{2}\) and \(\cos x = \frac12\), so \(\csc x = \frac{2}{\sqrt3}\) and \(\cot x = \frac{1}{\sqrt3}\). This gives \(\csc^2 x = \frac43\) and \(\csc x\cot x = \frac23\).

  3. A tempting wrong move: Drop the minus sign in the rule for \(\cot x\).

    \[\cr{y'(\tfrac{\pi}{3}) = \tfrac43 + 2\cdot\tfrac23 = \tfrac83}\]

    The curve is green before \(\frac{\pi}{3}\) and red after it, so \(\frac{\pi}{3}\) is its highest point and the tangent there is flat. A slope of \(\frac83\) gives the red dashed line, which rises steeply and cuts across the curve.

  4. Keep the minus sign, so the two terms cancel.

    \[y'(\tfrac{\pi}{3}) = -\tfrac43 + 2\cdot\tfrac23 = \cy{0}\]

Practice

Find \(h'(\frac{\pi}{2})\) for \(h(x) = x^2\csc x\).

The curve of \(\csc x\) is lowest at \(\frac{\pi}{2}\), so its slope there is 0. This removes one term of the product rule.

Solution
  1. Use the product rule.

    \[\begin{aligned} h'(x) &= 2x\csc x \\ &\quad + x^2\,(-\csc x\cot x) \end{aligned}\]
  2. At \(x = \frac{\pi}{2}\), \(\sin x = 1\) and \(\cos x = 0\). So \(\csc x = 1\) and \(\cot x = 0\).

    \[h'(\tfrac{\pi}{2}) = 2\cdot\tfrac{\pi}{2}\cdot 1 - \tfrac{\pi^2}{4}\cdot 1\cdot 0 = \cy{\pi}\]
  3. The second term is 0 because the slope of \(\csc x\), \(-\csc x\cot x\), is 0 at its lowest point.

Questions

Questions 1 and 2 use the curve \(y = \csc x\) and its tangent. Question 3 needs a calculation.

  1. At \(x = \frac{\pi}{6}\), the height is 2 and \(\cot x = \sqrt3\). What is the slope?

    • \(-2\sqrt3\)
    • \(2\sqrt3\)
    • \(-4\)
    • \(-\sqrt3\)
    Answer

    \(-2\sqrt3\)

  2. At \(x = \frac{5\pi}{6}\), the curve rises. The height is 2 and \(\cot x = -\sqrt3\). What is the slope?

    • \(2\sqrt3\)
    • \(-2\sqrt3\)
    • 4
    Answer

    \(2\sqrt3\)

  3. Find \(y'\) for \(y = 4\cot x - x\).

    • \(-4\csc^2 x - 1\)
    • \(4\csc^2 x - 1\)
    • \(-4\csc x\cot x - 1\)
    • \(-4\csc^2 x + 1\)
    Answer

    \(-4\csc^2 x - 1\)

Summary

You differentiate \(\cot x\) to \(-\csc^2 x\), and \(\csc x\) to \(-\csc x\cot x\), when \(x\) is in radians.

Both rules come from the quotient rule, with cosine over sine and 1 over sine, and both keep the minus sign.

You use them for every term that contains cot or csc, at inputs where \(\sin x\) is not 0.

This is one of four skills in topic 2.10 of Which & Why: AP Calculus.