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.
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
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
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
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)\):
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
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\):
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
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.
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
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
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\),
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
Check the value at \(x=1\) using the difference quotient. The change in the inner function is
Using the same sine addition identity as in the derivation, the quotient is
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
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
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
treats the inner expression \(x^2\) as if it did not change with \(x\). The correct calculation includes \(g'(x)=2x\):
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.
- In the derivation, what does \(\Delta g\) represent, and what limit does \(\Delta g/h\) approach?
- Which identity rewrites \(\sin(g(x+h))\) in terms of \(g(x)\) and \(\Delta g\)?
- Differentiate \(f(x)=\sin(5x^2)\), stating the inner function and its derivative.
- Evaluate the derivative of \(f(x)=\sin(x^2+1)\) at \(x=0\). Explain why the result is zero.
- Why must the angles be measured in radians for the stated derivation and formula?