Tutorials › AP Calculus › Sine and Cosine of Composite Angles

Chain Rule and Nested Functions · Tutorial 169 of 999

Sine and Cosine of Composite Angles

Use the chain rule to differentiate sine and cosine of composite angles, keeping the inner derivative and the sign of each result clear.

Intermediate 9 min read

What You'll Learn

  • Identify the inner angle function in a sine or cosine composition
  • Apply the chain rule to sine of a differentiable function
  • Apply the chain rule to cosine of a differentiable function, including its negative sign
  • Differentiate polynomial and rational angle functions before combining the results
  • Check composite derivatives by separating outer and inner rates

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.

Key idea: Differentiate the outer sine or cosine, keep its angle unchanged, and multiply by the derivative of that angle.

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.

Theorem: If \(g\) is differentiable at \(x\), then $$ \frac{d}{dx}\sin(g(x))=\cos(g(x))\,g'(x) $$ and $$ \frac{d}{dx}\cos(g(x))=-\sin(g(x))\,g'(x). $$

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.

$$ \frac{d}{dx}F(g(x))=F'(g(x))g'(x) $$

Substituting each outer function and its derivative makes the sign difference explicit:

$$ F(u)=\sin u \quad\Longrightarrow\quad F'(g(x))g'(x)=\cos(g(x))g'(x) $$
$$ F(u)=\cos u \quad\Longrightarrow\quad F'(g(x))g'(x)=-\sin(g(x))g'(x) $$

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:

$$ g(x)=(2x-1)^3 $$
$$ g'(x)=3(2x-1)^2\cdot 2=6(2x-1)^2 $$

Apply the sine-of-a-composite rule, retaining the whole angle inside the cosine:

$$ \begin{aligned} y' &=\cos((2x-1)^3)\cdot 6(2x-1)^2\\ &=6(2x-1)^2\cos((2x-1)^3). \end{aligned} $$

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:

$$ \begin{aligned} g(x)&=\frac{x^2+1}{x-1},\\ g'(x) &=\frac{(2x)(x-1)-(x^2+1)(1)}{(x-1)^2}\\ &=\frac{2x^2-2x-x^2-1}{(x-1)^2}\\ &=\frac{x^2-2x-1}{(x-1)^2}. \end{aligned} $$

Since the outer function is cosine, include its negative sign and multiply by \(g'(x)\):

$$ y'=-\sin\left(\frac{x^2+1}{x-1}\right) \frac{x^2-2x-1}{(x-1)^2}, \qquad x\ne 1. $$

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:

$$ -\sin(-1)\frac{-1}{1^2}=(\sin 1)(-1)=-\sin 1. $$

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:

$$ g(x)=\sqrt{x+4}=(x+4)^{1/2} $$
$$ g'(x)=\frac{1}{2}(x+4)^{-1/2} =\frac{1}{2\sqrt{x+4}}. $$

Now use the composite sine rule:

$$ y'=\cos(\sqrt{x+4})\frac{1}{2\sqrt{x+4}} =\frac{\cos(\sqrt{x+4})}{2\sqrt{x+4}}, \qquad x>-4. $$

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:

$$ y'=\sin(5x^2)\cdot 10x. $$

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:

$$ \begin{aligned} y' &=-\sin(5x^2)\cdot\frac{d}{dx}(5x^2)\\ &=-\sin(5x^2)\cdot 10x\\ &=-10x\sin(5x^2). \end{aligned} $$

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

1
Identify the angle.
Write the expression inside sine or cosine as \(g(x)\).
2
Differentiate the outer function.
Use \(\cos(g(x))\) for sine, or \(-\sin(g(x))\) for cosine.
3
Multiply by the inner derivative.
Find \(g'(x)\) and include it as a factor.
4
Check signs and domain.
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.

  1. Differentiate \(y=\sin(x^2-3x)\).
  2. Differentiate \(y=\cos((x+2)^4)\).
  3. For \(y=\sin\left(\frac{x+1}{x-2}\right)\), state the domain and find the derivative.
  4. Differentiate \(y=\cos(\sqrt{x+1})\) on the interval where its derivative exists.
  5. A student differentiates \(\cos(g(x))\) as \(\sin(g(x))g'(x)\). What sign must be corrected, and why?

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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
Clinical Biostats