Introduction
Trigonometric expressions often combine several structures. A function might be a sum of sine and cosine terms, a product involving a power of \(x\), or a quotient whose numerator and denominator are both trigonometric. A reliable derivative comes from identifying those structures before calculating.
This tutorial works through a progression of such problems. The main tools are the sum rule, product rule, quotient rule, power rule, and chain rule, together with the basic trigonometric derivatives. All angles are measured in radians, as required for the standard formulas for derivatives of sine and cosine.
How to Organize a Mixed Derivative
Start with the outermost structure of the function. If terms are added or subtracted, differentiate each term. If two functions are multiplied, use the product rule. If one function is divided by another, use the quotient rule and check that the denominator is nonzero. For a power or a function applied to an input such as \(2x\), use the power rule or chain rule as appropriate.
For a differentiable inner function \(g\), the chain rule states \(\frac{d}{dx}F(g(x))=F'(g(x))g'(x)\). In particular, for a positive integer \(n\), \(\frac{d}{dx}[g(x)]^n=n[g(x)]^{n-1}g'(x)\). The factor \(g'(x)\) records how quickly the input to the outer function changes.
These rules can be combined, but each operation must be handled at the right level. For example, a product containing \(\sin x\) and \(x^2\) needs the product rule; the derivative of \(\sin x\) alone is not the derivative of the whole product.
Why the Product Rule Has Two Terms
The product rule accounts for both factors changing at once. Its two terms are not an arbitrary pattern: they follow directly from the definition of derivative.
Add and subtract \(u(x)v(x+h)\) in the numerator, then separate the resulting fractions:
In the last line, \(u(x+h)\to u(x)\) because differentiability implies continuity, and the two difference quotients tend to \(v'(x)\) and \(u'(x)\). Thus \((uv)'=u'v+uv'\). This reasoning explains why both changing factors contribute.
Worked Examples
Worked Example: A Sum of Trigonometric Terms
Differentiate \(f(x)=4\sin x-3\cos x+2\tan x\), and find \(f'(\pi/4)\).
Differentiate term by term. The coefficient of each term is constant, and the derivative of \(-3\cos x\) is \(3\sin x\), since \((\cos x)'=-\sin x\).
At \(x=\pi/4\), \(\sin(\pi/4)=\cos(\pi/4)=\sqrt2/2\), and \(\sec^2(\pi/4)=2\). Therefore,
Check: The three contributions come respectively from differentiating \(4\sin x\), \(-3\cos x\), and \(2\tan x\). In particular, the cosine term contributes positively because its negative coefficient and the negative derivative of cosine cancel.
Worked Example: A Product and a Trigonometric Power
Differentiate \(f(x)=x^2\sin x+\cos^3 x\), then evaluate the derivative at \(x=\pi/3\).
The first term is a product, so differentiate both factors in turn. The second term is a power of \(\cos x\), so use the chain rule with outer function \(z^3\) and inner function \(z=\cos x\).
Now substitute \(x=\pi/3\), where \(\sin(\pi/3)=\sqrt3/2\) and \(\cos(\pi/3)=1/2\):
Check: Differentiating the product \(x^2\sin x\) gives \(2x\sin x+x^2\cos x\), with one term for the derivative of each factor. Differentiating \(\cos^3x\) gives \(3\cos^2x(-\sin x)\), including the negative inner derivative. The evaluation uses each exact special-angle value before simplifying.
Worked Example: A Quotient with a Trigonometric Denominator
For \(f(x)=\frac{\sin x}{1+\cos x}\), find \(f'(x)\) and evaluate it at \(x=\pi/3\).
The quotient rule applies wherever \(1+\cos x\ne0\). Since \(\cos x=-1\) at \(x=(2k+1)\pi\), where \(k\) is an integer, those inputs are excluded from the domain. Apply the quotient rule on the remaining domain:
The simplification uses \(\sin^2x+\cos^2x=1\); the denominator remains nonzero on the domain. At \(x=\pi/3\),
Check: Substituting \(\sin(\pi/3)=\sqrt3/2\) and \(\cos(\pi/3)=1/2\) into the unsimplified quotient-rule numerator gives \(\frac12\cdot\frac32-(\frac{\sqrt3}{2})(-\frac{\sqrt3}{2})=\frac34+\frac34=\frac32\). The squared denominator is \((3/2)^2=9/4\), and \((3/2)/(9/4)=2/3\), agreeing with the simplified result.
Worked Example: A Power with a Composite Input
Differentiate \(y=[\sin(2x)]^2\) and evaluate \(y'\) at \(x=\pi/6\).
The outer operation is squaring, and the inner function is \(\sin(2x)\). Differentiating the inner function requires the factor \(2\) from the derivative of \(2x\):
At \(x=\pi/6\), \(2x=\pi/3\), so
Check: The identity \(\sin^2(2x)=\frac{1-\cos(4x)}{2}\) gives the same derivative: \(\frac{1}{2}\cdot 4\sin(4x)=2\sin(4x)\). At \(x=\pi/6\), this is \(2\sin(2\pi/3)=2(\sqrt3/2)=\sqrt3\), as above.
Conditions and Common Pitfalls
Every rule has conditions. The product rule applies to differentiable factors. The quotient rule requires a differentiable denominator that is nonzero at the input being considered. The standard trigonometric derivative formulas assume angles in radians. A formula for a derivative may be valid only on the domain of the original function; algebraic simplification does not restore inputs where the original expression was undefined.
A frequent mistake is to omit the derivative of an inner input. For instance, \(\frac{d}{dx}\sin(2x)\) is not just \(\cos(2x)\). The chain rule gives \(\cos(2x)\cdot 2=2\cos(2x)\). Another common error is to lose a negative sign when differentiating cosine or when subtracting the second product in the quotient rule.
Arithmetic also needs a final check. For example, suppose an evaluation produces the product \(3\frac{3+2\sqrt2}{2}\left(-\frac{\sqrt2}{2}\right)\). A tempting but incorrect simplification is \(-\frac{3\sqrt2+6}{2}\). Multiplying the factors carefully gives
The numerator follows from \(3(3+2\sqrt2)\sqrt2=9\sqrt2+12\); keeping the denominator \(4\) through the multiplication prevents the incorrect simplification.
A Practical Checking Routine
After differentiating a mixed expression, check the result in several ways:
- Confirm that each sum term was differentiated separately.
- For a product, verify that there are two terms, each with one differentiated factor.
- For a quotient, check the order \(u'v-uv'\), the squared denominator, and the nonzero-denominator condition.
- For powers and composite inputs, account for the derivative of the inner function.
- When evaluating at a special angle, substitute exact values before combining terms.
These checks are most useful when performed while writing the solution, rather than only after an answer seems suspicious. They make the calculation easier to audit and help locate a mistake without repeating every step.
Check Your Understanding
For each question, identify the relevant derivative rule before carrying out the calculation.
- Differentiate \(g(x)=5\sin x+2\cos x\). What sign does the cosine term contribute?
- Differentiate \(h(x)=x\cos x\). Which two terms arise from the product rule?
- Differentiate \(p(x)=\frac{\cos x}{2+\sin x}\). For which inputs is the original function undefined?
- Differentiate \(q(x)=[\cos(3x)]^2\). Where does the factor from the inner input appear?
- Why must the quotient rule be restricted to inputs where its denominator is nonzero?