AP Calculus AB and BC

Derivative of cos(1/x): Answer, Proof, Mistakes

The derivative of cos(1/x) is sin(1/x) divided by x squared, and it is positive sine with no minus sign in front. Two negatives cancel: the derivative of cosine supplies one, and the derivative of 1/x supplies the other. It holds for every x except 0.

ddx[cos(1x)]=sin(1x)x2\frac{d}{dx}\left[\cos\left(\frac{1}{x}\right)\right] = \frac{\sin\left(\frac{1}{x}\right)}{x^{2}}

Where the two minus signs go

Both halves of this chain rule carry a negative. The outer function cosu\cos u differentiates to sinu-\sin u, and the inner function u=1x=x1u=\frac{1}{x}=x^{-1} differentiates to u=1x2u'=-\frac{1}{x^{2}}.

ddxcos(1x)=sin(1x)(1x2)=sin(1x)x2\frac{d}{dx}\cos\left(\frac{1}{x}\right) = -\sin\left(\frac{1}{x}\right)\cdot\left(-\frac{1}{x^{2}}\right) = \frac{\sin\left(\frac{1}{x}\right)}{x^{2}}

Negative times negative is positive, so the finished answer has no minus sign at all. A minus in the final line means one of the two was kept and the other was dropped.

What happens near zero

The function itself is bounded, since cos(1x)\cos\left(\frac{1}{x}\right) never leaves [1,1][-1,1]. The derivative is not bounded. As xx approaches 00, the input 1x\frac{1}{x} races off to infinity, sin(1x)\sin\left(\frac{1}{x}\right) cycles through every value in [1,1][-1,1] endlessly, and 1x2\frac{1}{x^{2}} grows without limit.

So there are points as close to the origin as you like where the slope is zero, and points equally close where it is enormous. The two families are easy to write down, with kk running through the positive integers.

x=1kπ    f(x)=0,x=2(4k+1)π    f(x)=(4k+1)2π24(k=1,2,3,)x=\frac{1}{k\pi}\;\Rightarrow\;f'(x)=0, \qquad x=\frac{2}{(4k+1)\pi}\;\Rightarrow\;f'(x)=\frac{(4k+1)^{2}\pi^{2}}{4} \qquad (k=1,2,3,\dots)

This is the standard pathological example. The function is differentiable at every point of its domain, and yet the derivative has no limit whatsoever at the edge of that domain. There is no value at x=0x=0 to differentiate in the first place.

The mistakes students make

The sign is the whole battle here, and the argument of the sine is the other half of it.

  • Answering sin(1x)x2-\frac{\sin\left(\frac{1}{x}\right)}{x^{2}}. That keeps the minus from the cosine and forgets the minus from 1x\frac{1}{x}, which is the most common single error on this page.
  • Answering sin(1x)-\sin\left(\frac{1}{x}\right), differentiating the outer function and never touching the inside at all.
  • Answering sinxx2\frac{\sin x}{x^{2}}, evaluating the sine at xx rather than at 1x\frac{1}{x}. The chain rule changes what multiplies the sine, not what sits inside it.

Check yourself, not just the answer

Type derivatives and get graded on mathematical equivalence, with rule-level hints when you miss, in the Derivative Practice Checker.

Frequently asked questions

What is the derivative of cos(1/x)?

It is sin(1x)x2\frac{\sin\left(\frac{1}{x}\right)}{x^{2}} for all x0x\neq 0, positive sine over xx squared.

Why is there no negative sign in the answer?

Because there are two of them and they cancel. The outer derivative contributes sin(1x)-\sin\left(\frac{1}{x}\right) and the inner derivative contributes 1x2-\frac{1}{x^{2}}, and their product is positive.

Is cos(1/x) differentiable at x = 0?

The function is not even defined at x=0x=0, so the question does not arise there. The patched relative xcos(1x)x\cos\left(\frac{1}{x}\right), given the value 00 at the origin, is continuous there but still not differentiable.