Why the Angle’s Derivative Matters
A sine or cosine expression can have a variable angle rather than the variable \(x\) itself. For example, the angle might be \(x^2+1\), or a rational expression in \(x\). In either case, changing \(x\) changes the angle, and that change affects the rate at which the sine or cosine changes.
The chain rule accounts for both changes: the rate of the outer trigonometric function with respect to its angle, and the rate of the angle with respect to \(x\). For sine, the outer derivative is cosine. For cosine, the outer derivative is negative sine.
The Composite-Angle Rules
Let \(g\) be a real-valued function that is differentiable at \(x\). The expressions \(\sin(g(x))\) and \(\cos(g(x))\) are compositions: \(g(x)\) supplies the angle to the outer trigonometric function. The angle is measured in radians, as is standard when using these derivative formulas.
In Leibniz notation, if \(y=\sin(u)\) and \(u=g(x)\), then \(\frac{dy}{dx}=\cos(u)\frac{du}{dx}\). If \(y=\cos(u)\), then \(\frac{dy}{dx}=-\sin(u)\frac{du}{dx}\). The factor \(\frac{du}{dx}\) is essential whenever the angle changes with \(x\).
These formulas require \(g\) to be differentiable at the point being considered. Since sine and cosine are defined and differentiable for every real angle, there is no additional restriction on the value of \(g(x)\). However, the inner function itself may have a restricted domain, and its derivative must exist where the composite derivative is being used.
Why the Rules Work
The chain rule says that if an outer function \(F\) is differentiable at \(g(x)\), and \(g\) is differentiable at \(x\), then the derivative of the composition is \(F'(g(x))g'(x)\). This is a multiplication of local rates: the outer rate describes change per unit of angle, while the inner rate describes change in angle per unit of \(x\).
For the sine composition, take \(F(u)=\sin u\). Its derivative is \(F'(u)=\cos u\), so the chain rule gives the first formula. For the cosine composition, take \(F(u)=\cos u\). Its derivative is \(F'(u)=-\sin u\), so the chain rule gives the second formula.
Substituting each outer function and its derivative makes the sign difference explicit:
This also explains why the formulas assume radian measure. In radians, \(\frac{d}{du}\sin u=\cos u\) and \(\frac{d}{du}\cos u=-\sin u\). With degree measure, the outer derivative would include an additional factor of \(\frac{\pi}{180}\).
Worked Examples
Worked Example: Sine of a Cubic Polynomial
Differentiate \(y=\sin((2x-1)^3)\), then check the result at \(x=1\).
First identify the inner angle and its derivative:
Apply the sine-of-a-composite rule, retaining the whole angle inside the cosine:
Check at \(x=1\). The angle is \(g(1)=(2-1)^3=1\), and its derivative is \(g'(1)=6(1)^2=6\). The outer sine derivative at angle \(1\) is \(\cos 1\), so the chain rule gives \((\cos 1)(6)=6\cos 1\). Substitution into the answer also gives \(6(1)^2\cos(1)=6\cos 1\), as required.
Worked Example: Cosine of a Rational Angle
Differentiate \(y=\cos\left(\frac{x^2+1}{x-1}\right)\). State where the derivative formula applies, and check it at \(x=0\).
The angle function is rational, so it is defined for \(x\ne 1\). Use the quotient rule to differentiate it:
Since the outer function is cosine, include its negative sign and multiply by \(g'(x)\):
Check at \(x=0\). The angle is \(g(0)=\frac{1}{-1}=-1\), and the inner derivative is \(g'(0)=\frac{-1}{1}=-1\). The outer cosine derivative at angle \(-1\) is \(-\sin(-1)=\sin 1\). Multiplying the rates gives \((\sin 1)(-1)=-\sin 1\). Substituting \(x=0\) in the displayed result gives the same value:
The derivative applies throughout the domain \(x\ne 1\), because the rational angle is differentiable at every point in that domain.
Worked Example: Sine of a Radical Angle
Differentiate \(y=\sin(\sqrt{x+4})\), and check the result at \(x=0\).
The square-root angle is defined for \(x\ge -4\), but its derivative is finite only for \(x>-4\). On that open interval, differentiate the inner function:
Now use the composite sine rule:
At \(x=0\), the angle is \(\sqrt{4}=2\), and the inner derivative is \(\frac{1}{2\sqrt{4}}=\frac14\). The outer derivative is \(\cos 2\). Their product is \(\frac14\cos 2\). The formula gives \(\frac{\cos 2}{2\sqrt4}=\frac14\cos 2\), confirming the result.
Keep the Inner Angle and Its Derivative Distinct
When differentiating a composition, the angle inside the trigonometric function stays intact in the outer derivative. The separate factor \(g'(x)\) records how quickly that angle changes. For example, the derivative of \(\sin(3x)\) is \(3\cos(3x)\), not just \(\cos(3x)\); the angle \(3x\) changes three times as fast as \(x\).
There are two details to check every time:
- For sine, the outer derivative is cosine, with no extra negative sign.
- For cosine, the outer derivative is negative sine, so the negative sign must be retained.
Common Pitfall: Losing a Factor or a Sign
Consider \(y=\cos(5x^2)\). A common incorrect calculation is:
This calculation has differentiated the inner angle but has omitted the negative sign from the derivative of cosine. The correct calculation keeps both the outer derivative and the inner derivative:
A different error is to write \(y'=-\sin(5x^2)\), which has the correct outer sign but omits the inner factor \(10x\). The chain rule requires both parts. A useful check is to name the angle temporarily: if \(u=5x^2\), then \(\frac{dy}{dx}=-\sin(u)\frac{du}{dx}\), with \(\frac{du}{dx}=10x\).
A Reliable Procedure
Write the expression inside sine or cosine as \(g(x)\).
Use \(\cos(g(x))\) for sine, or \(-\sin(g(x))\) for cosine.
Find \(g'(x)\) and include it as a factor.
Retain cosine’s negative sign and restrict the derivative to points where \(g\) is differentiable.
These steps work whether the angle is polynomial, rational, or another differentiable function. If the angle is rational, for instance, its denominator must be nonzero; the chain rule does not remove restrictions in the inner function’s domain.
Why This Skill Matters
Sine and cosine often appear with angles that are themselves built from several operations. The composite-angle formulas let you differentiate such expressions by preserving their structure instead of expanding or rewriting them. That structure also makes errors easier to locate: the outer derivative determines whether the result is cosine or negative sine, while the inner derivative supplies the remaining factor.
Before accepting a result, ask whether the entire angle remains inside the trigonometric function, whether the inner derivative is present, and whether cosine’s negative sign has been included. Those checks address the most common mistakes in this topic.
Check Your Understanding
For each question, identify the inner angle before applying the chain rule.
- Differentiate \(y=\sin(x^2-3x)\).
- Differentiate \(y=\cos((x+2)^4)\).
- For \(y=\sin\left(\frac{x+1}{x-2}\right)\), state the domain and find the derivative.
- Differentiate \(y=\cos(\sqrt{x+1})\) on the interval where its derivative exists.
- A student differentiates \(\cos(g(x))\) as \(\sin(g(x))g'(x)\). What sign must be corrected, and why?