Introduction
Rational expressions can look more complicated to differentiate than they really are. Factoring may expose common factors, and dividing a polynomial by a monomial denominator may turn a fraction into a short sum of powers. Those simplifications make basic differentiation rules easier to apply.
There is one important detail to track throughout: the domain of the original function. Cancelling a factor can simplify the formula, but it does not put the input that made the original denominator zero back into the function’s domain.
A Reliable Workflow
For a rational function built from polynomials, use the following sequence:
Set the original denominator equal to zero and record its real roots as excluded inputs.
Factor the numerator and denominator, then cancel only common factors. Cancellation is valid where the cancelled factor is nonzero.
Divide each term by the monomial, or express the denominator as a negative power. Keep track of any zero denominator.
Use the power rule and the sum and constant-multiple rules on the simplified expression.
The derivative is defined only at inputs where the original function is defined and differentiable.
The power rule states that for an integer \(n\), \(\frac{d}{dx}x^n=nx^{n-1}\) wherever the expression is defined and differentiable. In particular, for a negative integer exponent, this rule applies away from zero. The sum rule allows us to differentiate a finite sum one term at a time, and the constant-multiple rule allows a constant factor to remain outside the derivative.
Worked Example: Cancelling a Common Linear Factor
Worked Example: Cancelling a Common Linear Factor
Differentiate \(f(x)=\frac{x^2-9}{x-3}\), stating the domain.
Step 1: Find the original domain. The denominator is zero when \(x-3=0\), so \(x=3\) is excluded. Thus the domain is all real numbers except \(3\).
Step 2: Factor and simplify.
The condition \(x\ne3\) remains part of the description of \(f\), even though the simplified formula is defined at \(3\).
Step 3: Differentiate on the original domain.
Check at \(x=1\) using the difference quotient. Near \(1\), the simplified formula gives \(f(1+h)=4+h\) and \(f(1)=4\). Therefore, for nonzero \(h\) sufficiently close to zero,
The limit is \(1\), agreeing with the derivative formula. The check concerns an input in the original domain; \(x=3\) remains excluded.
Why Cancellation Does Not Restore an Excluded Input
When a common factor is cancelled, the simplified expression and the original expression have equal values wherever the original expression is defined. That equality supports differentiating the simplified expression at allowed inputs. It does not change the function’s original domain.
Here is why the derivative calculation is valid at an allowed input. Suppose \(f(x)\) simplifies to \(g(x)\), and let \(a\) be in the original domain. The factors in the original denominator are nonzero at \(a\), so they remain nonzero for all \(x\) sufficiently close to \(a\). In that neighborhood, excluding no new point at \(a\), the expressions agree: \(f(x)=g(x)\). Consequently, their difference quotients at \(a\) agree for sufficiently small nonzero \(h\):
If the limit on the right exists, the limit on the left exists and has the same value. Thus the derivative of the simplified expression gives the derivative of the original function at every input in its domain. An excluded input is not covered by this reasoning because \(f(a)\) does not exist there.
Worked Example: Factoring Both Polynomials
Worked Example: Factoring Both Polynomials
Differentiate \(g(x)=\frac{x^2-1}{x^2+3x+2}\), and state every excluded input.
Step 1: Find the original domain. Factor the denominator and identify its zeros:
The denominator is zero at \(x=-1\) and \(x=-2\). Both inputs must be excluded.
Step 2: Factor the numerator and cancel.
To use the basic rules, rewrite the simplified fraction as a constant plus a reciprocal linear term:
Step 3: Differentiate. The derivative formula for a reciprocal linear function gives \(\frac{d}{dx}(x+2)^{-1}=-(x+2)^{-2}\), for \(x\ne-2\). Therefore,
The input \(-1\) is still excluded, even though it no longer makes the simplified denominator zero.
Check at \(x=0\) with the difference quotient. The simplified function has \(g(0)=-\frac12\). For small nonzero \(h\),
Taking the limit as \(h\) approaches zero gives \(\frac34\). The derivative formula also gives \(g'(0)=\frac{3}{(0+2)^2}=\frac34\), as required.
Rewriting Monomial Denominators as Powers
A monomial denominator is a single constant multiple of a power of \(x\), such as \(3x^2\). If \(x\ne0\), dividing each term in a polynomial by this denominator rewrites the rational expression as a sum of powers. A denominator containing a positive power of \(x\) makes \(x=0\) an excluded input unless the original expression has already been defined in some other way; for a rational expression as written, record that restriction before simplifying.
For example, the division \(x^m/x^n=x^{m-n}\) is valid when \(x\ne0\). If \(m-n\) is negative, the result is a reciprocal power. This is exactly the kind of term to which the power rule applies away from zero.
Worked Example: A Polynomial Over a Monomial
Worked Example: A Polynomial Over a Monomial
Differentiate \(p(x)=\frac{6x^3-3x+12}{3x^2}\), and state its domain.
Step 1: Record the restriction. The original denominator \(3x^2\) is zero at \(x=0\). The domain is therefore \(x\ne0\).
Step 2: Divide each term by the denominator.
In particular, \(-\frac{3x}{3x^2}=-x^{-1}\), and \(\frac{12}{3x^2}=4x^{-2}\).
Step 3: Apply the power rule term by term.
Check at \(x=2\) using the difference quotient. The proposed derivative gives
To check directly from the simplified expression, \(p(2)=2(2)-\frac12+\frac{4}{4}=\frac92\). For \(h\ne0\) sufficiently small,
Indeed, the term \(-x^{-1}\) contributes \(\frac{1}{2(2+h)}\) to the quotient, and the term \(4x^{-2}\) contributes \(-\frac{4+h}{(2+h)^2}\). Taking the limit gives \(2+\frac14-\frac44=\frac54\), confirming the calculation.
A Common Pitfall: Losing a Hole
A frequent error is to simplify correctly and then silently replace the original function’s domain with the domain of the simplified formula. For example, after cancelling in the first worked example, someone might write:
This is wrong. The cancellation equality applies only when \(x\ne3\), because the original fraction is undefined at \(3\). The corrected conclusion is
The simplified formula does have a value at \(3\), and it defines a continuous extension of the original function there. But that extension is a different function, because it has a larger domain. Keeping the original restrictions avoids confusing a derivative of the extension with a derivative of the given function.
Putting the Checks Together
Before accepting a rational differentiation result, check three separate features:
- Algebra: Were all factors correctly factored and cancelled? Did division by a monomial produce the correct powers and coefficients?
- Calculus: Was the power rule applied to each term, including negative powers, with the exponent reduced by one?
- Domain: Are the zeros of the original denominator still excluded from the derivative’s domain?
These checks complement one another. A correct derivative formula with an incorrect domain is incomplete, and a correct domain does not compensate for an algebra or differentiation error. The purpose of simplifying first is to make the differentiation manageable while preserving the original function’s meaning.
Check Your Understanding
For each question, keep the original denominator in view as you simplify.
- For \(r(x)=\frac{x^2-16}{x-4}\), what is the original domain, and what is \(r'(x)\) on that domain?
- Factor and simplify \(\frac{x^2-4}{x^2+x-2}\). Which inputs are excluded from the original function?
- Rewrite \(\frac{5x^3+10x}{5x^2}\) as a sum of powers, and differentiate it on its domain.
- Why does cancelling a factor not make an input where the original denominator was zero part of the original function’s domain?
- For \(q(x)=\frac{x^2-25}{x-5}\), explain why the derivative is not defined at \(x=5\), even though the simplified formula has a derivative there.