Why Affine Inputs Matter
A trigonometric function may take a simple expression such as \(x\) as its input, or it may take an affine expression \(ax+b\), where \(a\) and \(b\) are constants. The second case introduces an important feature: the derivative includes a factor of \(a\).
For instance, the input \(3x-\frac{\pi}{4}\) changes three times as quickly as \(x\) does. The Chain Rule accounts for this change by multiplying the derivative of the outer trigonometric function by \(3\). The constant shift \(-\frac{\pi}{4}\) remains in the trigonometric argument, but contributes no factor of its own.
Throughout, trigonometric inputs are measured in radians. The goal is to differentiate each of the six trigonometric functions when its input has the form \(ax+b\), and to track both the resulting factor and the points where the function is defined.
The Six Derivative Rules
The domain conditions matter for the last four rules. Tangent and secant are defined only when \(\cos(ax+b)\ne 0\). Cotangent and cosecant are defined only when \(\sin(ax+b)\ne 0\). Sine and cosine are defined for every real input.
These conditions apply at the point where the derivative is being evaluated. A formula for the derivative cannot make a function differentiable at a point where the original function is undefined.
Why the Factor \(a\) Appears
The Chain Rule says that for differentiable functions \(f\) and \(g\), the derivative of their composition is \(\frac{d}{dx}f(g(x))=f'(g(x))g'(x)\). Here the inner function is \(g(x)=ax+b\), whose derivative is \(g'(x)=a\). Thus, differentiating any trigonometric function of \(ax+b\) means evaluating the outer derivative at \(ax+b\) and multiplying by \(a\).
For sine, the outer derivative is cosine. Substituting \(f(t)=\sin t\) into this rule gives \(\frac{d}{dx}\sin(ax+b)=a\cos(ax+b)\). For cosine, the outer derivative is negative sine, so the result is \(-a\sin(ax+b)\). Applying the same reasoning to the standard derivatives of tangent, cotangent, secant, and cosecant gives the remaining four rules.
This also explains the role of each constant. The coefficient \(a\) controls how rapidly the input changes with \(x\), so it multiplies the derivative. The shift \(b\) changes the value of the input at a given \(x\), so it remains inside the trigonometric function. Since the derivative of a constant is zero, \(b\) adds no separate factor.
Worked Examples
Worked Example: Differentiating a Shifted Sine
Find the derivative of \(y=\sin(3x-\frac{\pi}{4})\).
The outer function is sine, and the inner expression is \(u=3x-\frac{\pi}{4}\). Its derivative is \(\frac{du}{dx}=3\). Since the derivative of sine is cosine, the Chain Rule gives
Check: the derivative of the outer sine evaluated at \(u\) is \(\cos u\), and multiplying by the inner derivative \(3\) gives \(3\cos u\). Substituting \(u=3x-\frac{\pi}{4}\) recovers the result.
Worked Example: Differentiating a Cosine with a Negative Coefficient
Find the derivative of \(y=\cos(\pi-5x)\).
The inner expression is \(u=\pi-5x\), so \(\frac{du}{dx}=-5\). The derivative of cosine at \(u\) is \(-\sin u\). Therefore,
Check: the two negative factors are the negative sign from the cosine derivative and the negative inner derivative. Their product is positive, so the final sign must be positive. The expression remains defined for all real \(x\), since cosine is defined for all real inputs.
Worked Example: Differentiating Tangent and Checking Its Domain
Find the derivative of \(y=\tan(2x+\frac{\pi}{6})\), and state where the original function is defined.
The inner expression is \(u=2x+\frac{\pi}{6}\), with \(\frac{du}{dx}=2\). The derivative of tangent is \(\sec^2 u\), so
Tangent is defined when its cosine denominator is nonzero. Therefore the original function, and its derivative formula, apply where \(\cos(2x+\frac{\pi}{6})\ne 0\). Check: multiplying the outer derivative \(\sec^2 u\) by the inner derivative \(2\) gives the displayed result. No value at a point where the cosine is zero is included.
Worked Example: Differentiating Cosecant
Find the derivative of \(y=\csc(4x-\frac{\pi}{3})\).
Let \(u=4x-\frac{\pi}{3}\), so \(\frac{du}{dx}=4\). The derivative of cosecant at \(u\) is \(-\csc u\cot u\). Applying the Chain Rule gives
Check: the outer derivative contributes the negative sign, and the inner derivative contributes the factor \(4\). Cosecant requires \(\sin(4x-\frac{\pi}{3})\ne 0\), which is precisely the restriction on the input for this expression.
Constant Inputs and Special Cases
The rule also covers \(a=0\). In that case, \(ax+b=b\) is constant, so any of the six functions is constant wherever it is defined. The derivative formulas correctly give zero because each right-hand side contains the factor \(a=0\).
For example, if \(y=\sec(\frac{\pi}{4})\), the input does not vary with \(x\). Since \(\cos(\frac{\pi}{4})\ne 0\), this is a defined constant, and its derivative is zero. In the formula, the factor \(a\) is zero, which gives the same conclusion.
If \(a\ne 0\), the input changes as \(x\) changes. A positive \(a\) means the input increases with \(x\); a negative \(a\) means it decreases. The sign of \(a\) must be included along with any sign already present in the outer derivative. The cosine example above showed how two negative signs can yield a positive result.
Common Mistakes
A frequent error is to differentiate the outer trigonometric function but omit the derivative of the affine input. For example, the incorrect calculation
leaves out the factor \(5\). The correction is to differentiate the inner expression as well:
Another common error is to use the correct factor but the wrong sign. For example, cotangent has a negative derivative, so \(\frac{d}{dx}\cot(2x) = 2\csc^2(2x)\) is incorrect. The outer derivative is \(-\csc^2(2x)\), and the inner derivative is \(2\), giving \(-2\csc^2(2x)\). A reliable check is to keep the outer derivative and inner derivative separate until after both have been written.
A Reliable Calculation Process
For a trigonometric function with an affine input, the same short process works each time. Identify the outer trigonometric function, differentiate its input, apply the correct outer derivative including its sign, and then check the domain of the original function.
Write \(u=ax+b\), and note that \(\frac{du}{dx}=a\).
Use the appropriate trigonometric derivative, retaining its sign.
Include the factor \(a\), then write the result in terms of the original input.
For tangent and secant require \(\cos u\ne 0\); for cotangent and cosecant require \(\sin u\ne 0\).
Why the Constant Factor Is Useful
The factor \(a\) makes the derivative reflect the rate at which the input changes, not just the type of trigonometric function. If the input changes more quickly with \(x\), the derivative is scaled accordingly. If the input decreases as \(x\) increases, the inner derivative is negative and can change the sign of the final expression.
A shift \(b\) still matters: it determines the angle at which the trigonometric function and its derivative are evaluated. But it does not change the rate of input change, because a constant shift has derivative zero. Keeping this distinction clear helps prevent both missing-factor errors and unnecessary factors from the constant term.
These formulas are the direct Chain Rule applications for affine inputs. More complicated inputs require differentiating the entire inner expression, rather than simply using the constant factor \(a\).
Check Your Understanding
For each question, identify the inner derivative and retain the domain restrictions where needed.
- Differentiate \(y=\sin(7x+\frac{\pi}{2})\).
- Differentiate \(y=\cos(\frac{\pi}{3}-2x)\), paying attention to the signs.
- Differentiate \(y=\cot(3x-\frac{\pi}{4})\), and state the condition on its input.
- Differentiate \(y=\sec(-x+\frac{\pi}{6})\), and state where the derivative formula applies.
- Explain why the derivative of \(\csc(\frac{\pi}{2})\), treated as a constant function of \(x\), is zero.