Tutorials › Calculus I › Deriving the Cosine Derivative from First Principles

Trigonometric Derivatives · Tutorial 490 of 1495

Deriving the Cosine Derivative from First Principles

Use the difference quotient to prove from first principles that the derivative of cosine is negative sine.

Intermediate 8 min read

What You'll Learn

  • Write the derivative of cosine as a limit of difference quotients.
  • Apply the cosine subtraction identity to separate the cosine and sine terms.
  • Use the standard trigonometric limits, with angles measured in radians.
  • Prove that the cosine contribution to the quotient tends to zero.
  • Evaluate the derivative at selected angles directly from the definition.
  • Identify and correct a common sign error in the derivation.

Why derive the cosine derivative from first principles?

A differentiation rule is useful, but understanding where it comes from makes the rule more reliable. For cosine, the key is to examine what happens to \(\cos x\) when its input changes by a small amount \(h\). The difference quotient records that change per unit of input change.

We will use the cosine subtraction identity to rewrite the numerator, and then apply the standard trigonometric limits. The argument works for every real \(x\), provided angles are measured in radians.

The derivative as a limit

Definition: The derivative of a function \(f\) at \(x\), when the limit exists, is $$ f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}. $$ Here \(h\ne 0\) in the quotient, while the limit describes what happens as \(h\) approaches zero.

For \(f(x)=\cos x\), the definition gives

$$ \frac{d}{dx}\cos x = \lim_{h\to 0}\frac{\cos(x+h)-\cos x}{h}, $$

if this limit exists. We will evaluate it rather than assume a derivative formula for cosine.

The standard trigonometric limits used below are

$$ \lim_{h\to 0}\frac{\sin h}{h}=1 \qquad\text{and}\qquad \lim_{h\to 0}\frac{\cos h-1}{h}=0. $$

These limits require angles measured in radians. The second limit can also be seen from the first. Using the identity \(\cos h-1=-2\sin^2(h/2)\), for \(h\ne 0\) we have

$$ \frac{\cos h-1}{h} = -2\frac{\sin^2(h/2)}{h} = -\frac{h}{2}\left(\frac{\sin(h/2)}{h/2}\right)^2. $$

As \(h\to 0\), the squared factor tends to \(1\), while \(h/2\) tends to zero. Therefore the whole expression tends to zero. This justifies the second standard limit from the first.

Applying the cosine subtraction identity

The cosine subtraction identity states that

$$ \cos(x+h)=\cos x\cos h-\sin x\sin h. $$

Substitute this identity into the difference quotient. Keep the terms involving \(\cos h\) and \(\sin h\) separate so each can be handled by a standard limit:

$$ \begin{aligned} \frac{\cos(x+h)-\cos x}{h} &=\frac{\cos x\cos h-\sin x\sin h-\cos x}{h}\\ &=\cos x\frac{\cos h-1}{h}-\sin x\frac{\sin h}{h}. \end{aligned} $$

For a fixed real number \(x\), both \(\cos x\) and \(\sin x\) are constants with respect to \(h\). Thus the standard limits can be applied to the two factors that depend on \(h\).

The derivative formula

Theorem: For every real number \(x\), with angles measured in radians, $$ \frac{d}{dx}\cos x=-\sin x. $$

Here is the complete limit argument. It uses the difference quotient definition, the cosine subtraction identity, and the two standard trigonometric limits stated above.

1
Start from the definition.
For \(f(x)=\cos x\), consider \(\lim_{h\to 0}[\cos(x+h)-\cos x]/h\), with \(h\ne 0\).
2
Rewrite the numerator.
The subtraction identity gives \(\cos(x+h)-\cos x=\cos x(\cos h-1)-\sin x\sin h\). Dividing by \(h\) separates the quotient into two terms.
3
Take the limit.
The first term tends to \(\cos x\cdot 0=0\). The second tends to \(-\sin x\cdot 1=-\sin x\).
4
Conclude from the definition.
The difference quotient has a limit, and that limit is \(-\sin x\). Therefore \(\cos x\) is differentiable at every real \(x\), with derivative \(-\sin x\).

In equation form, the full calculation is

$$ \begin{aligned} \frac{d}{dx}\cos x &=\lim_{h\to 0}\frac{\cos(x+h)-\cos x}{h}\\ &=\lim_{h\to 0}\left( \cos x\frac{\cos h-1}{h} -\sin x\frac{\sin h}{h} \right)\\ &=\cos x\cdot 0-\sin x\cdot 1\\ &=-\sin x. \end{aligned} $$

The key point is that the two parts of the quotient behave differently: the cosine term tends to zero, while the sine term tends to one before its coefficient \(-\sin x\) is applied. This is why the result is negative sine, not positive sine.

Worked Example: Derivative at zero

Worked Example: Derivative at zero

Find the derivative of cosine at \(x=0\) directly from the difference quotient.

Begin with the definition and substitute \(x=0\):

$$ \begin{aligned} f'(0) &=\lim_{h\to 0}\frac{\cos(0+h)-\cos 0}{h}\\ &=\lim_{h\to 0}\frac{\cos h-1}{h}\\ &=0. \end{aligned} $$

The last equality is the standard limit for \((\cos h-1)/h\). Check the result against the formula just proved: \(-\sin 0=-(0)=0\). The direct calculation and the general formula agree.

Worked Example: Derivative at \(\pi/3\)

Worked Example: Derivative at \(\pi/3\)

Evaluate the difference quotient limit at \(x=\pi/3\). The exact values are \(\cos(\pi/3)=1/2\) and \(\sin(\pi/3)=\sqrt{3}/2\).

Apply the cosine subtraction identity before taking the limit:

$$ \begin{aligned} \lim_{h\to 0} \frac{\cos(\pi/3+h)-\cos(\pi/3)}{h} &=\lim_{h\to 0} \frac{\frac12\cos h-\frac{\sqrt3}{2}\sin h-\frac12}{h}\\ &=\lim_{h\to 0}\left( \frac12\frac{\cos h-1}{h} -\frac{\sqrt3}{2}\frac{\sin h}{h} \right)\\ &=\frac12\cdot 0-\frac{\sqrt3}{2}\cdot 1\\ &=-\frac{\sqrt3}{2}. \end{aligned} $$

Check: the general formula gives \(-\sin(\pi/3)=-\sqrt3/2\), exactly the same value.

Worked Example: Derivative at \(\pi/2\)

Worked Example: Derivative at \(\pi/2\)

Evaluate the derivative at \(x=\pi/2\) from its defining limit. Since \(\cos(\pi/2)=0\) and \(\sin(\pi/2)=1\), the subtraction identity gives

$$ \cos(\pi/2+h) = \cos(\pi/2)\cos h-\sin(\pi/2)\sin h = 0\cdot\cos h-1\cdot\sin h = -\sin h. $$

Substitute this into the quotient, showing each simplification:

$$ \begin{aligned} \lim_{h\to 0} \frac{\cos(\pi/2+h)-\cos(\pi/2)}{h} &=\lim_{h\to 0}\frac{-\sin h-0}{h}\\ &=-\lim_{h\to 0}\frac{\sin h}{h}\\ &=-1. \end{aligned} $$

Check: the formula gives \(-\sin(\pi/2)=-1\). This agrees with the limit calculation.

A common sign mistake

A frequent error is to use the wrong sign in the cosine subtraction identity, writing \(\cos(x+h)=\cos x\cos h+\sin x\sin h\). That is the cosine subtraction identity for \(\cos(x-h)\), not the addition identity needed here; the addition identity is \(\cos(x+h)=\cos x\cos h-\sin x\sin h\). It produces a wrong sign in the derivative.

For example, with that incorrect identity the quotient would be wrongly simplified as

$$ \cos x\frac{\cos h-1}{h} +\sin x\frac{\sin h}{h} \longrightarrow 0+\sin x=\sin x. $$

The correction is to start with the correct identity, \(\cos(x+h)=\cos x\cos h-\sin x\sin h\). Subtracting \(\cos x\) and dividing by \(h\) then gives a negative sine term:

$$ \cos x\frac{\cos h-1}{h} -\sin x\frac{\sin h}{h} \longrightarrow 0-\sin x=-\sin x. $$

The sign should be checked in the identity before simplifying the limit. A small sign error at that stage changes the final derivative.

Why radians matter

The limit \(\lim_{h\to 0}\sin h/h=1\) is true when \(h\) is measured in radians. The derivation above directly uses that value. If angles are measured in degrees, the corresponding small-angle limit has a different constant, so the same calculation would not produce this derivative formula without a conversion factor.

Radians are therefore part of the conditions of the theorem, not just a convenient way to write angles. In calculus, trigonometric derivative formulas use radian measure.

What the derivation establishes

This proof establishes the derivative at an arbitrary real input, rather than checking only a collection of particular angles. It also identifies exactly which ingredients are needed: the derivative definition, the cosine subtraction identity, and the standard trigonometric limits. Since the resulting limit exists for every real \(x\), cosine is differentiable throughout its domain \(\mathbb R\).

Once established, the formula \(\frac{d}{dx}\cos x=-\sin x\) can be used as a differentiation rule. The first-principles derivation remains valuable because it explains the origin of the minus sign and shows why radian measure is essential.

Check Your Understanding

Use the difference quotient, the cosine subtraction identity, and the stated limits to answer these questions.

  1. Write the difference quotient whose limit defines the derivative of \(\cos x\) at an arbitrary real number \(x\).
  2. After applying the cosine subtraction identity, which quotient tends to zero, and which quotient tends to one?
  3. Why does the sine term contribute \(-\sin x\) rather than \(+\sin x\)?
  4. Evaluate the derivative at \(x=\pi\) using the formula, and state the exact value.
  5. Why must the standard trigonometric limit be used with angles measured in radians?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon