Why Rule Selection Matters
A mixed expression may contain several familiar functions without being a composition. For example, \(e^x\cos x+\ln x\) combines exponential, trigonometric, and logarithmic functions, but its parts are joined by addition and multiplication. Choosing the derivative rule begins by reading those operations correctly.
The key question is not simply which function names appear. It is how the expressions are connected. A sum calls for linearity; a product of variable factors calls for the product rule; and a quotient calls for the quotient rule. Before applying any of them, check where the original expression is defined.
Basic Derivatives and Domains
For the basic functions used here, the formulas and real domains include the following. Trigonometric derivatives use radians.
Sine, cosine, and the natural exponential are defined for every real \(x\). The natural logarithm is defined only when \(x>0\). The derivative formula for \(\ln x\) has the same restriction.
When several functions are combined, their restrictions must be combined too. A sum or product is defined where all of its terms or factors are defined. A quotient additionally requires that its denominator not equal zero. The derivative rule is valid only at points in the original expression's domain where the required factors are differentiable.
Choosing Among Linearity, Product, and Quotient Rules
Linearity handles sums, differences, and constant multiples. If \(f\) and \(g\) are differentiable at \(x\), and \(c\) is a constant, then
A constant multiple is not a product-rule problem: the constant does not vary with \(x\). Linearity also applies term by term to longer sums.
The product rule applies when two functions of \(x\) are multiplied. If \(f\) and \(g\) are differentiable at \(x\), then
Both factors matter: differentiate the first while keeping the second, then keep the first and differentiate the second, and add the results.
The quotient rule applies when one function is divided by another. If \(f\) and \(g\) are differentiable at \(x\) and \(g(x)\ne 0\), then
The order in the numerator matters: it is derivative of the top times the bottom, minus the top times derivative of the bottom. The denominator is squared.
Why the Quotient Rule Has This Form
The quotient rule follows from the difference quotient. This derivation also explains why its numerator has a subtraction and its denominator is squared. Suppose \(f\) and \(g\) are differentiable at \(a\), and \(g(a)\ne 0\). Differentiability implies continuity, so for \(x\) sufficiently close to \(a\), \(g(x)\ne 0\). Starting with the difference quotient gives
As \(h\) approaches zero, the two difference quotients in the numerator approach \(f'(a)\) and \(g'(a)\). Continuity gives \(g(a+h)\to g(a)\), and \(g(a)\) is nonzero. Therefore the limit exists and equals
Since the argument applies at every point where the hypotheses hold, it gives the quotient rule. The nonzero-denominator condition is essential: without it, the quotient itself may not be defined.
Worked Examples
Worked Example: A Linear Combination of Basic Functions
Differentiate \(F(x)=4\sin x-3e^x+2\ln x\), and give the domain on which the derivative is valid.
The logarithm requires \(x>0\); the other terms are defined for every real number. Thus the original function, and its derivative, are defined on \(x>0\). Apply linearity term by term, keeping each constant multiple:
Check each term against its basic derivative: \(4\sin x\) gives \(4\cos x\), \(-3e^x\) gives \(-3e^x\), and \(2\ln x\) gives \(2/x\). The stated restriction \(x>0\) ensures the logarithm and its derivative are defined.
Worked Example: A Product of Trigonometric and Exponential Functions
Differentiate \(G(x)=e^x\cos x\).
Both factors are defined and differentiable for every real \(x\). Since they are multiplied and both depend on \(x\), use the product rule with \(f(x)=e^x\) and \(g(x)=\cos x\):
The factors have derivatives \(e^x\) and \(-\sin x\), respectively, so both terms in the product rule are accounted for. The factored and expanded expressions agree: \(e^x(\cos x-\sin x)=e^x\cos x-e^x\sin x\). The derivative is valid for all real \(x\).
Worked Example: A Quotient with a Logarithmic Numerator
Differentiate \(H(x)=\dfrac{\ln x}{1+\cos x}\), and state its domain.
The numerator requires \(x>0\). The denominator must also be nonzero. Since \(1+\cos x=0\) when \(x=(2k+1)\pi\), where \(k\) is an integer, the domain excludes those points from \(x>0\). Set \(f(x)=\ln x\) and \(g(x)=1+\cos x\). Their derivatives are \(f'(x)=1/x\) and \(g'(x)=-\sin x\). Applying the quotient rule gives
This formula applies for \(x>0\) and \(1+\cos x\ne0\). As a check at \(x=1\), the denominator is \(1+\cos 1\), which is nonzero. Substitution into the quotient-rule form gives
Here \(\ln 1=0\), and the original quotient has \(H(1)=0\). The evaluated derivative formula is consistent with the quotient rule at this point.
A Practical Order of Operations
For a longer expression, work from its outermost operation inward, but do not use a chain-rule step for a basic function whose argument is simply \(x\). The following checklist keeps rule selection and domain checks together:
Require positive arguments for natural logarithms and nonzero denominators for quotients.
Classify the expression as a sum, product, or quotient, or as a combination of these.
Use linearity, the product rule, or the quotient rule at the operation joining the pieces.
Use the basic trigonometric, exponential, and logarithmic formulas, respecting their domains.
Compare the result with the rule's structure and state the points where the original expression and derivative are defined.
For example, in \(e^x\sin x+\ln x\), the top-level operation is addition. Use linearity first; within \(e^x\sin x\), use the product rule. The logarithm restricts the entire sum to \(x>0\). The order of operations helps prevent applying the product rule to terms that are only added.
Common Mistake: Differentiating Only the Numerator
A quotient is not differentiated by differentiating its numerator and leaving its denominator unchanged. For instance, for \(Q(x)=\sin x/e^x\), the incorrect calculation \(Q'(x)=\cos x/e^x\) ignores the changing denominator.
The quotient rule instead gives
Both \(\sin x\) and \(e^x\) are defined for all real \(x\), and \(e^x\ne0\) for every real \(x\), so this derivative is valid everywhere. At \(x=\pi/2\), the incorrect expression gives \(0\), whereas the correct derivative gives \(-1/e^{\pi/2}\). The discrepancy confirms that the denominator's derivative cannot be omitted.
Why Domain Checks Belong in the Answer
A formula for a derivative does not automatically apply everywhere the simplified algebraic expression might make sense. For example, a logarithmic term restricts the original function to positive inputs, and a quotient excludes inputs that make its denominator zero. Simplifying an expression does not restore points where the original expression was undefined.
On the AP exam, a complete derivative answer should therefore include any relevant domain restriction, especially when logarithms or quotients appear. A concise final statement such as “for \(x>0\)” or “for \(x>0\) with \(1+\cos x\ne0\)” records the conditions under which the calculation is valid.
Check Your Understanding
For each expression, identify the main rule or rules, and remember to state any domain restriction.
- Differentiate \(3\cos x+e^x\).
- Differentiate \(x\) is not a basic factor in this lesson; instead, differentiate \(e^x\sin x\) and state its domain.
- For \(\dfrac{\ln x}{e^x}\), what restrictions define the original domain, and which derivative rule applies?
- Explain why differentiating only the numerator of a quotient is generally incorrect.
- In \(\ln x+\sin x\), which term determines the real domain of the entire expression?