Derviatives of the Trigonmetric Functions

Let's consider differentiating the sine function:

ddxsinx \dfrac{d}{dx} \sin x

Before we continue, recall these two propositions we saw in the previous section:

  1. limx0sinxx=1{\lim\limits_{x \to 0} \dfrac{\sin x}{x} = 1}
  2. limx01cosxx=0{\lim\limits_{x \to 0} \dfrac{1 - \cos x}{x} = 0}

Keep these propositions in mind as we derive the derivatives of the trigonometric functions. Now, to differentiate sinx,{\sin x,} we use the familiar difference quotient, and apply the limit:

ddxsinx=limΔx0sin(x+Δx)sinxΔx \dfrac{d}{dx} \sin x = \lim\limits_{\Delta x \to 0} \dfrac{\sin (x + \Delta x) - \sin x}{\Delta x}

As we saw in the section on limits, we want to reframe this expression. To do so, we use a trigonometric identity:

sin(a+b)=sinacosb+cosasinb \sin (a + b) = \sin a \cos b + \cos a \sin b

Applying this identity:

ddxsinx=limΔx0(sinxcos(Δx)+cosxsin(Δx))sinxΔx \dfrac{d}{dx} \sin x = \lim\limits_{\Delta x \to 0} \dfrac{(\sin x \cos (\Delta x) + \cos x \sin (\Delta x)) - \sin x}{\Delta x}

We cannot just plug in 0 into this limit — it's one of the trickier ones. We must try and group the terms. To group terms, the first thing we want to do is gather what we know. From basic trigonometry, we know that limΔx0cos(Δx){\lim\limits_{\Delta x \to 0} \cos(\Delta x)} is 1. We also see that sinx{\sin x} is a common term. Using algebra:

\begin{aligned} \dfrac{d}{dx} \sin x &= \ll{\Delta x}{x} \ar{\dfrac{\sin x + \cos \Delta x - \sin x}{\Delta x} + \dfrac{\cos x \sin \Delta x}{\Delta x}} \\[2em] &= \ll{\Delta x}{x} \ar{\dfrac{\sin x (\cos \Delta x - 1)}{\Delta x} + \dfrac{\cos x \sin \Delta x}{\Delta x}} \\[2em] &= \ll{\Delta x}{x} \ar{\sin x \left( \dfrac{\cos (\Delta x) - 1}{\Delta x}} + \cos x \ar{\dfrac{\sin \Delta x}{\Delta x} \right)} \\[2em] &= \ll{\Delta x}{x} \sin x \ar{\dfrac{\cos (\Delta x) - 1}{\Delta x}} + \ll{\Delta x}{x} \cos x \ar{\dfrac{\sin \Delta x}{\Delta x}} \end{aligned}

Now, if we look at the final result from a broad overview, this is really just:

ddxsinx=limΔx0sinx(m)+limΔx0cosx(n) \dfrac{d}{dx} \sin x = \lim\limits_{\Delta x \to 0} \sin x(m) + \lim\limits_{\Delta x \to 0} \cos x(n)

where

  • m=(cos(Δx)1Δx),{m = \left( \dfrac{\cos (\Delta x) - 1}{\Delta x} \right),} and
  • m=(sinΔxΔx){m = \left( \dfrac{\sin \Delta x}{\Delta x} \right)}

We need a way to get rid of m{m} and n.{n.} To do so, we will use the following properties, to be proven later:

  1. limΔx0cosΔx1Δx=0{\lim\limits_{\Delta x \to 0} \dfrac{\cos \Delta x - 1}{\Delta x} = 0}
  2. limΔx0sinΔxx=1{\lim\limits_{\Delta x \to 0} \dfrac{\sin \Delta x}{x} = 1}

Using these properties, we have:

limΔx0sinx(cos(Δx)1Δx)0+cosx(sinΔxΔx)1 \lim\limits_{\Delta x \to 0} \sin x \underbrace{\cancel{\left( \dfrac{\cos (\Delta x) - 1}{\Delta x} \right)}}_{0} + \cos x \underbrace{\cancel{\left( \dfrac{\sin \Delta x}{\Delta x} \right)}}_{1}

Above, we have (sinx0)+(cosx1).{(\sin x \cdot 0) + (\cos x \cdot 1).} This gives us cosx.{\cos x.} Thus, we now have a specific formula for the derivative of sinx:{sin x:}

ddxsinx=cosx \dfrac{d}{dx} \sin x = \cos x

Let's now consider the derivative of cosx.{\cos x.} The process is similar. Again, we start with the diffference quotient:

ddxcosx=limΔx0cos(x+Δx)cosxΔx \dfrac{d}{dx} \cos x = \lim\limits_{\Delta x \to 0} \dfrac{\cos (x + \Delta x) - \cos x}{\Delta x}

Just as we used a trigonometric identity in deriving the derivative of sinx,{\sin x,} we will use another trionometric identity for cosx,{\cos x,} the angle sum formula:

cos(a+b)=cosacosbsinasinb \cos (a + b) = \cos a \cos b - \sin a \sin b

Applying the angle sum formula, we have:

ddxcosx=limΔ0cosxΔxsinxsinΔxcosxΔx=limΔx0(cosxcosΔxcosxΔx+sinxsinΔxΔx)=limΔx0(cosx(cosΔx1)Δx+sinxsinΔxΔx)=limΔx0((cosx)cosΔx1Δx+(sinx)(sinΔxΔx))=limΔx0(cosx)(cosΔx1Δx)+limΔx0(sinx)(sinΔxΔx) \begin{aligned} \dfrac{d}{dx} \cos x &= \lim\limits_{\Delta \to 0} \dfrac{\cos x \Delta x - \sin x \sin \Delta x - \cos x}{\Delta x} \\ &= \lim\limits_{\Delta x \to 0} \left(\dfrac{\cos x \cos \Delta x - \cos x}{\Delta x} + \dfrac{- \sin x \sin \Delta x}{\Delta x}\right) \\ &= \lim\limits_{\Delta x \to 0} \left(\dfrac{\cos x (\cos \Delta x - 1)}{\Delta x} + \dfrac{- \sin x \sin \Delta x}{\Delta x}\right) \\ &= \lim\limits_{\Delta x \to 0} \left((\cos x) \dfrac{\cos \Delta x - 1}{\Delta x} + (- \sin x)\left(\dfrac{ \sin \Delta x}{\Delta x}\right)\right) \\ &= \lim\limits_{\Delta x \to 0} (\cos x) \left(\dfrac{\cos \Delta x - 1}{\Delta x}\right) + \lim\limits_{\Delta x \to 0} (- \sin x)\left(\dfrac{ \sin \Delta x}{\Delta x}\right) \\ \end{aligned}

Again, we see that this is really just:

ddxcosx=limΔx0cosx(a)+limΔx0sinx(b) \dfrac{d}{dx} \cos x = \lim\limits_{\Delta x \to 0} \cos x(a) + \lim\limits_{\Delta x \to 0} - \sin x(b)

where,

  • a=cosΔx1Δx{a = \dfrac{\cos \Delta x - 1}{\Delta x}} and
  • b=sinΔxΔx{b = \dfrac{ \sin \Delta x}{\Delta x}}

We want to get rid of a{a} and b,{b,} so we use the same properties we saw earlier:

  1. limΔx0cosΔx1Δx=0{\lim\limits_{\Delta x \to 0} \dfrac{\cos \Delta x - 1}{\Delta x} = 0}
  2. limΔx0sinΔxx=1{\lim\limits_{\Delta x \to 0} \dfrac{\sin \Delta x}{x} = 1}

Applying the two properties:

ddxcosx=cosx(cosΔx1Δx)0+(sinx)(sinΔxΔx)1=cosx(0)+(sinx)(1)=0+(sinx)=sinx \begin{aligned} \dfrac{d}{dx} \cos x &= \cos x \underbrace{\cancel{\left( \dfrac{\cos \Delta x - 1}{\Delta x} \right)}}_{0} + (- \sin x) \underbrace{\cancel{\left( \dfrac{\sin \Delta x}{\Delta x} \right)}}_{1} \\[1em] &= \cos x(0) + (- \sin x)(1) \\[1em] &= 0 + (- \sin x) \\[1em] &= - \sin x \end{aligned}

Thus, we know have a specific formula for the derivative of cosx:{\cos x:}

ddxcosx=sinx \dfrac{d}{dx} \cos x = - \sin x

As an aside, let's think about these formulas a little more carefully to contextualize these derivations. Consider the derivative of cosx.{\cos x.} When we evaluate ddxcosx{\dfrac{d}{dx} \cos x} at x=0,{x = 0,} then by the definition of a derivative, this is limΔx0cos(Δx)1Δx.{\lim\limits_{\Delta x \to 0} \dfrac{\cos (\Delta x) - 1}{\Delta x}.} This limit evaluates to 0, as we saw earlier.

The same phenomenon appears for the derivative of sinx.{\sin x.} When we evaluate ddxsinx,{\dfrac{d}{dx} \sin x,} we are just evaluating limΔx0sinΔxΔx.{\lim\limits_{\Delta x \to 0} \dfrac{\sin \Delta x}{\Delta x}.} This limit evaluates to 1, again, as we saw earlier.

What this tells us is that the derivatives of sinx{\sin x} and cosx{\cos x} at x=0{x = 0} yields all the values of ddxsinx{\dfrac{d}{dx} \sin x} and ddxcosx.{\dfrac{d}{dx} \cos x.}

To actually understand how we've derived the specific formulas above, we must understand the behavior of sinxx{\dfrac{\sin x}{x}} and cosx1x{\dfrac{\cos x - 1}{x}} when x{x} is close to 0. In other words, we must prove the properties we've been using:

  1. limΔx0cosΔx1Δx=0{\lim\limits_{\Delta x \to 0} \dfrac{\cos \Delta x - 1}{\Delta x} = 0}

  2. limΔx0sinΔxx=1{\lim\limits_{\Delta x \to 0} \dfrac{\sin \Delta x}{x} = 1}

To construct these proofs, we must use geometry, because sinx{\sin x} and cosx{\cos x} are geometric propositions. To do so, we'll need to use a variable other than Δx.{\Delta x.} Namely, θ.{\theta.} We do so because we want to go back to thinking about sine and cosine as trigonometric ratios, rather than functions. We'll first consider sinxx.{\dfrac{\sin x}{x}.} Accordingly, what we are really trying to prove is:

limθ0sinθθ=1 \lim\limits_{\theta \to 0} \dfrac{\sin \theta}{\theta} = 1

Let's first start by looking at the unit circle:

A unit circle with a radius of length 1. The arc length subtending the angle theta has a length of theta. Opposite the angle theta, the triangle has a leg of length sine theta. The same triangle has a hypotenuse of length 1.

Here, our proof will depend on the followng proposition: When the radius of the circle has as length of 1, θ{\theta} is the length of the arc above (highlighted red). Note that this proposition is true only if the angle θ{\theta} is measured in radians. It is not true if θ{\theta} is measured in degrees. This an example of why prefer measuring angles in radians rather than degrees in mathematics. Recall the definition of sine:

sinθ=oppositehypotenuse \sin \theta = \dfrac{\lvert opposite \rvert }{ \lvert hypotenuse \rvert }

Since the radius is of length 1, then the hypotenuse is of length 1. Thus, the length of the side opposite θ{\theta} has a length of sinθ.{\sin \theta.} Now, for the sake of argument, let's make a copy of that triangle and reflect it:

An equilateral triangle formed by reflecting the original triangle.

From the circle above, we see that the total arc length is now 2θ.{2 \theta.} We also see that we've formed an isosceles triangle, where the green side is of length 2sinθ,{2 \sin \theta,} while the blue sides are of length 1.{1.} We also see that the interior angle has a measure of 2θ.{2 \theta.} With these lengths, the ratio of the green edge of the triangle to the arc length is:

2sinθ2θ=sinθθ \dfrac{2 \sin \theta}{2 \theta} = \dfrac{\sin \theta}{\theta}

Now the question is, why does sinθθ{\dfrac{\sin \theta}{\theta}} tend to 1 as θ{\theta} gets closer and closer to 0? Because as the angle θ{\theta} gets very very small, the arc looks more and more like a straight line. Moreover, as θ{\theta} gets closer and closer to 0, the green segment and the red arch start to merge.

Arc and sine theta start to merge. You can barely see the green.

This shows that short curves are nearly straight. Hence, we have:

limθ0sinθθ=1 \lim\limits_{\theta \to 0} \dfrac{\sin \theta}{\theta} = 1

Now let's consider the property limx0cosx1x=0.{\lim\limits_{x \to 0} \dfrac{\cos x - 1}{x} = 0.} Again, we want to use θ.{\theta.} Here, however, because we are thinking about sine and cosine geometrically, we want a positive quantity, since we're dealing with lengths. So, we perform some manipulation up front:

limθ0cosθ1θ=limθ0(1cosθθ)=(1)limθ01cosθθ=0 \begin{aligned} \lim\limits_{\theta \to 0} \dfrac{\cos \theta - 1}{\theta} &= \lim\limits_{\theta \to 0} \left( - \dfrac{1 - \cos \theta}{\theta}\right) \\[1em] &= (-1) \cdot \lim\limits_{\theta \to 0} \dfrac{1 - \cos \theta}{\theta} \\[1em] &= 0 \end{aligned}

Thus, the hypothesis we want to prove is:

(1)limθ01cosθθ=0 (-1) \lim\limits_{\theta \to 0} \dfrac{1 - \cos \theta}{\theta} = 0

The -1 is just a constant, so let's just clean it up a bit more by multiplying 11{\dfrac{1}{-1}} to both sides:

limθ01cosθθ=0 \lim\limits_{\theta \to 0} \dfrac{1 - \cos \theta}{\theta} = 0

To prove the hypothesis above, we focus on the “gap” between the edge and the arc. Since the distance between the origin and the arc is 1, this gap has a length of 1cosθ.{1 - \cos \theta.}

The gap

Just as we saw with sine, as the angle θ{\theta} gets very small, the distance 1cosθ{1 - \cos \theta} gets very, very small.

An even smaller gap

At some point, the segment 1cosθ{1 - \cos \theta} is 0. Hence, we have the following:

limθ0cosθ1θ=0 \lim\limits_{\theta \to 0} \dfrac{\cos \theta - 1}{\theta} = 0

Note that the limit isn't simply 00.{\dfrac{0}{0}.} This is an example of a limit where we aren't just doing a simple plug-and-play. The θ{\theta} in the denominator is the arc length. The θ{\theta} we're taking to 0 is the interior angle. Thus, making the angle θ{\theta} smaller and smaller, the arc length θ{\theta} is getting closer and closer to 0, but not nearly as fast as 1cosθ.{1 - \cos \theta.} Remember, the property we're trying to prove is a ratio. Thus, because cosθ1{\cos \theta - 1} approaches 0 faster than the arc length θ,{\theta,} the limit of the ratio is 0. To think about this more clearly, compare the approximations in the table above. Notice how much faster 1cosθ{1 - \cos \theta} approaches 0 compared to θ.{\theta.}

The proof above is fairly abstract. Let's see another proof. First, suppose there is a point P{P} on a unit circle, then move along to Q.{Q.}

Unit circle with points P and Q

From the circle above, we see that sinθ{\sin \theta} is the vertical distance between P{P} and the {\text{x-axis}.} The Δθ{\Delta \theta} is the change in the angle, as we move from P{P} to Q.{Q.} Accordingly, Q{Q} is the point on the unit circle where the angle measures θ+Δθ.{\theta + \Delta \theta.} It follows then that the {\text{y-coordinate}} of Q{Q} is sin(θ+Δθ).{\sin (\theta + \Delta \theta).} To determine the rate of change of sinθ{\sin \theta} with respect to theta (i.e., ddθsinθ,{\dfrac{d}{d \theta} \sin \theta,}) we must determine the rate of change for y=sinθ.{y = \sin \theta.}

Unit circle with points P and Q. What we are looking for is delta y.

If we zoomed in on the Δy{\Delta y} above:

Delty y

The curved portion is the part of the circle. We've also drawn a line segment from P{P} to Q.{Q.} In doing so, we've drawn a right triangle PQR.{\triangle PQR.} Now, we use a concept we saw earlier: Very short pieces of curves are nearly straight. This means that the arc PQ{\text{arc } PQ} is essentially the same as the edge PQ:{\overline{\rm PQ}:}

arc PQPQ \text{arc } PQ \approx \overline{\rm PQ}

Now, we know that arc PQ{\text{arc } PQ} has a length of Δθ.{\Delta \theta.} Thus, we know that:

ΔθPQ \Delta \theta \approx \overline{\rm PQ}

Great, we have one side down. If we can determine the measure of QPR{\angle QPR} is, then we can determine Δy.{\Delta y.} Geometrically, we are trying to find the length of PR.{\overline{\rm PR.}} To think about what the measure of QPR{\angle QPR} might be, let's see the line with the whole unit circle:

A tangent line through the circle

Notice that the segment is almost perpendicular to the radius OP.{\overline{\rm OP}.} When we take the limit, it is just about perpendicular:

PQOP \overline{\rm PQ} \underset{\approx}{\perp} \overline{\rm OP}

If we rotate the entire construction by 90,{{90}^\circ,} we can see that QPR{\angle QPR} is roughly the angle θ.{\theta.}

Rotation

Thus, we can conclude:

Approximate angle

Accordingly:

QPRθ \angle QPR \approx \theta

With these two propositions: (1) PQΔθ,{\overline{\rm PQ} \approx \Delta \theta,} and (2) QPRθ,{\angle QPR \approx \theta,} we can now draw the following premise:

Δy=PR(Δθ)cosθ \Delta y = \overline{\rm PR} \approx (\Delta \theta)\cos \theta

It is this premise that allows us to reach the proposition we were after:

ΔyΔθcosθ \dfrac{\Delta y}{\Delta \theta} \approx \cos \theta

And by applying the limit:

limΔθ0ΔyΔθcosθ \lim\limits_{\Delta \theta \to 0} \dfrac{\Delta y}{\Delta \theta} \approx \cos \theta