Tutorials › Calculus I › Deriving the Composite Sine Derivative from First Principles

Trigonometric Derivatives · Tutorial 495 of 1495

Deriving the Composite Sine Derivative from First Principles

Derive the derivative of sine of a differentiable function directly from its difference quotient, and see why the inner derivative appears.

Intermediate 9 min read

What You'll Learn

  • Set up the difference quotient for sine of a differentiable inner function.
  • Use the sine addition identity to separate the inner increment.
  • Identify the two standard trigonometric limits needed in the derivation.
  • Prove the composite sine derivative formula under its differentiability condition.
  • Apply the formula to linear, polynomial, and trigonometric inner functions.
  • Recognize and correct the mistake of omitting the inner derivative.

Why Derive a Composite Sine Derivative?

A function such as \(f(x)=\sin(x^2)\) changes in two stages: the input \(x\) changes, and then the value of the inner function \(x^2\) changes the input to sine. The derivative must account for both stages. In this tutorial, we derive that derivative directly from the difference quotient rather than simply applying a differentiation rule.

The derivation uses the sine addition identity to express the change in the output in terms of the change in the inner input. It then uses the standard trigonometric limits \(\lim_{t\to0}\frac{\sin t}{t}=1\) and \(\lim_{t\to0}\frac{\cos t-1}{t}=0\). These limits, and the angles in this tutorial, use radians.

Result to be derived: If \(g\) is differentiable at \(x\), then \(f(x)=\sin(g(x))\) is differentiable at \(x\), and $$ f'(x)=\cos(g(x))g'(x). $$

Set Up the Difference Quotient

Let \(g\) be a function differentiable at a point \(x\), and define \(f(x)=\sin(g(x))\). For a nonzero increment \(h\), the difference quotient for \(f\) at \(x\) is

$$ \frac{f(x+h)-f(x)}{h} = \frac{\sin(g(x+h))-\sin(g(x))}{h}. $$

To expose the change in the inner function, name that change \(\Delta g=g(x+h)-g(x)\). Thus \(g(x+h)=g(x)+\Delta g\), and differentiability of \(g\) gives

$$ \lim_{h\to0}\frac{\Delta g}{h}=g'(x), \qquad \lim_{h\to0}\Delta g=0. $$

The second limit follows because \(\Delta g=h(\Delta g/h)\): as \(h\to0\), the quotient \(\Delta g/h\) tends to the finite number \(g'(x)\), so the product tends to zero. We can now apply the sine addition identity to the numerator.

Rewrite the Change in Sine

The sine addition identity states that \(\sin(a+b)=\sin a\cos b+\cos a\sin b\). Taking \(a=g(x)\) and \(b=\Delta g\), we obtain

$$ \sin(g(x+h)) = \sin(g(x))\cos(\Delta g) + \cos(g(x))\sin(\Delta g). $$

Subtract \(\sin(g(x))\) from both sides. The resulting difference separates into a term involving \(\cos(\Delta g)-1\) and a term involving \(\sin(\Delta g)\):

$$ \sin(g(x+h))-\sin(g(x)) = \sin(g(x))\bigl(\cos(\Delta g)-1\bigr) + \cos(g(x))\sin(\Delta g). $$

Divide by \(h\). For nonzero \(\Delta g\), we can factor out \(\Delta g\) in each term. The same expression remains valid when \(\Delta g=0\) if the two ratios below are assigned their limit values at zero. Define

$$ A(t)= \begin{cases} \dfrac{\sin t}{t},&t\ne0,\\ 1,&t=0, \end{cases} \qquad B(t)= \begin{cases} \dfrac{\cos t-1}{t},&t\ne0,\\ 0,&t=0. \end{cases} $$

The standard trigonometric limits imply that \(A(t)\to1\) and \(B(t)\to0\) as \(t\to0\). With these definitions, the quotient can be written without requiring division by \(\Delta g\):

$$ \frac{f(x+h)-f(x)}{h} = \sin(g(x))B(\Delta g)\frac{\Delta g}{h} + \cos(g(x))A(\Delta g)\frac{\Delta g}{h}. $$

Derivation of the Formula

As \(h\to0\), we have \(\Delta g\to0\). Therefore \(B(\Delta g)\to0\) and \(A(\Delta g)\to1\). At the same time, \(\Delta g/h\to g'(x)\). The factors \(\sin(g(x))\) and \(\cos(g(x))\) are fixed real numbers, since \(x\) is fixed. Taking the limit of the two terms gives

$$ \begin{aligned} f'(x) &=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}\\ &=\sin(g(x))\cdot 0\cdot g'(x) +\cos(g(x))\cdot 1\cdot g'(x)\\ &=\cos(g(x))g'(x). \end{aligned} $$

This proves the result directly from the definition of derivative, provided \(g\) is differentiable at \(x\). In particular, the derivation explains why the inner derivative appears: the factor \(\Delta g/h\) measures how quickly the inner input changes as \(x\) changes.

Theorem: If \(g\) is differentiable at \(x\), then the composite function \(f=\sin\circ g\), meaning \(f(x)=\sin(g(x))\), is differentiable at \(x\), with $$ f'(x)=\cos(g(x))g'(x). $$ The formula uses radians, as do the standard limits used in its derivation.

The other limit needed above can also be seen from the identity \(\cos t-1=-2\sin^2(t/2)\). For \(t\ne0\), this gives

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

As \(t\to0\), the first factor tends to zero and each sine quotient tends to one. Thus \((\cos t-1)/t\to0\), as used in the proof.

Worked Examples

Worked Example: A Linear Inner Function

Differentiate \(f(x)=\sin(3x-\pi/6)\).

Set \(g(x)=3x-\pi/6\). Its derivative is \(g'(x)=3\). The composite sine formula therefore gives

$$ f'(x) = \cos(3x-\pi/6)\cdot 3 = 3\cos(3x-\pi/6). $$

Check the result at \(x=\pi/6\). The inner input is \(3(\pi/6)-\pi/6=\pi/3\), so the formula gives \(f'(\pi/6)=3\cos(\pi/3)=3/2\). Directly from the difference quotient, for \(h\ne0\),

$$ \begin{aligned} \frac{f(\pi/6+h)-f(\pi/6)}{h} &=\frac{\sin(\pi/3+3h)-\sin(\pi/3)}{h}\\ &=\sin(\pi/3)\frac{\cos(3h)-1}{h} +\cos(\pi/3)\frac{\sin(3h)}{h}. \end{aligned} $$

The first quotient tends to zero because \((\cos(3h)-1)/h=3(\cos(3h)-1)/(3h)\to0\). The second tends to \(3\), since \(\sin(3h)/h=3\sin(3h)/(3h)\to3\). The limit is therefore \(0\cdot\sin(\pi/3)+3\cdot\cos(\pi/3)=3/2\), agreeing with the formula.

Worked Example: A Quadratic Inner Function

Differentiate \(f(x)=\sin(x^2+1)\) and evaluate the derivative at \(x=1\).

For \(g(x)=x^2+1\), we have \(g'(x)=2x\). Hence

$$ f'(x)=2x\cos(x^2+1), \qquad f'(1)=2\cos(2). $$

Check the value at \(x=1\) using the difference quotient. The change in the inner function is

$$ \Delta g=(1+h)^2+1-(1^2+1)=2h+h^2=h(2+h). $$

Using the same sine addition identity as in the derivation, the quotient is

$$ \begin{aligned} \frac{f(1+h)-f(1)}{h} &=\sin(2)\frac{\cos(\Delta g)-1}{h} +\cos(2)\frac{\sin(\Delta g)}{h}\\ &=\sin(2)\frac{\cos(\Delta g)-1}{\Delta g}(2+h) +\cos(2)\frac{\sin(\Delta g)}{\Delta g}(2+h), \end{aligned} $$

where the factored form applies when \(\Delta g\ne0\), which holds for all sufficiently small nonzero \(h\). As \(h\to0\), \(\Delta g\to0\), so the first term tends to zero, while the second tends to \(\cos(2)\cdot1\cdot2=2\cos(2)\). This agrees with the derivative formula.

Worked Example: A Trigonometric Inner Function

Differentiate \(f(x)=\sin(\sin x)\) and evaluate at \(x=0\).

Here \(g(x)=\sin x\), so \(g'(x)=\cos x\). Applying the derived formula gives

$$ f'(x)=\cos(\sin x)\cos x, \qquad f'(0)=\cos(0)\cos(0)=1. $$

Check the value directly. Since \(f(0)=0\), the difference quotient at zero is \(\sin(\sin h)/h\). For nonzero \(h\) sufficiently close to zero, rewrite it as

$$ \frac{\sin(\sin h)}{h} = \frac{\sin(\sin h)}{\sin h}\cdot\frac{\sin h}{h}. $$

As \(h\to0\), \(\sin h\to0\). The first factor tends to one by \(\lim_{t\to0}\sin t/t=1\), and the second factor also tends to one by that same limit. Thus the difference quotient tends to \(1\), matching \(f'(0)\).

A Common Mistake: Omitting the Inner Derivative

A frequent error is to differentiate the outer sine but leave out the rate of change of its input. For example, the incorrect calculation

$$ \frac{d}{dx}\sin(x^2)=\cos(x^2) $$

treats the inner expression \(x^2\) as if it did not change with \(x\). The correct calculation includes \(g'(x)=2x\):

$$ \frac{d}{dx}\sin(x^2) = \cos(x^2)\cdot 2x = 2x\cos(x^2). $$

The first-principles derivation identifies exactly where this factor comes from: it is the limit of the inner change divided by the original change, \(\Delta g/h\to g'(x)\). For \(g(x)=x^2\), that limit is \(2x\), not \(1\).

Another condition to keep in view is the angle convention. The standard limit \(\sin t/t\to1\) holds when \(t\) is measured in radians. The derivative formula as stated is therefore the radian-measure formula; substituting degree-valued angles without accounting for the change of scale would not preserve this derivation.

When the Result Applies

The condition in the theorem is local: \(g\) must be differentiable at the point where the derivative is being calculated. The proof does not require \(g\) to be a polynomial, or even to have a simple formula. It requires only that the difference quotient for \(g\) tend to a finite derivative at that point.

The formula also separates the two contributions to the derivative. The factor \(\cos(g(x))\) describes how sine responds to a small change in its input near \(g(x)\); the factor \(g'(x)\) describes how quickly that input changes as \(x\) changes. If either factor is zero at a point, the derivative of the composite function is zero there.

For instance, in \(f(x)=\sin(x^2+1)\), at \(x=0\) the inner derivative is \(2x=0\), so \(f'(0)=0\), even though \(\cos(1)\) is not zero. This is consistent with the difference quotient: the inner input changes by \(h^2\) from its value at zero, and \(h^2/h\to0\).

Check Your Understanding

Use the difference-quotient derivation and its conditions to answer these questions.

  1. In the derivation, what does \(\Delta g\) represent, and what limit does \(\Delta g/h\) approach?
  2. Which identity rewrites \(\sin(g(x+h))\) in terms of \(g(x)\) and \(\Delta g\)?
  3. Differentiate \(f(x)=\sin(5x^2)\), stating the inner function and its derivative.
  4. Evaluate the derivative of \(f(x)=\sin(x^2+1)\) at \(x=0\). Explain why the result is zero.
  5. Why must the angles be measured in radians for the stated derivation and formula?

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
Back to Tutorials