Chapter VI · Derivatives and integrals

Derivatives of polynomials and rational functions

§§117–118 35 min

Polynomials differentiated term by term and factor by factor, what the derivative reveals about repeated roots, and rational functions through partial fractions, with a first proof that 1/x is not the derivative of any rational function.

Why this matters

With the rules of §114 we can differentiate any polynomial or rational function. §117 and §118 do this systematically, and two by-products turn out to matter more than the formulas. First, the derivative detects repeated roots: a polynomial and its derivative share a root exactly when that root is repeated. Second, partial fractions show that differentiating a rational function never produces a simple factor in the denominator, so 1/x1/x is not the derivative of any rational function. The function whose derivative is 1/x1/x must be something new, and in Chapter IX it turns out to be the logarithm.

The idea

A polynomial is a sum of multiples of powers, so by rules (1), (2) and (xm)′=mxm−1(x^m)' = mx^{m-1} it is differentiated term by term:

ϕ(x)=a0xn+a1xn−1+⋯+an⟹ϕ′(x)=na0xn−1+(n−1)a1xn−2+⋯+an−1.\phi(x) = a_0x^n + a_1x^{n-1} + \dots + a_n \quad\Longrightarrow\quad \phi'(x) = na_0x^{n-1} + (n-1)a_1x^{n-2} + \dots + a_{n-1}.

More revealing is the factored form. Write ϕ(x)=a0(x−α1)m1(x−α2)m2⋯(x−αν)mν\phi(x) = a_0(x - \alpha_1)^{m_1}(x - \alpha_2)^{m_2}\cdots(x - \alpha_\nu)^{m_\nu}, with distinct roots αr\alpha_r (real or complex) of multiplicities mrm_r. The product rule for many factors gives

ϕ′(x)=ϕ(x){m1x−α1+m2x−α2+⋯+mνx−αν}.\phi'(x) = \phi(x)\left\{\frac{m_1}{x - \alpha_1} + \frac{m_2}{x - \alpha_2} + \dots + \frac{m_\nu}{x - \alpha_\nu}\right\}.

Each term of the bracket cancels one factor x−αrx - \alpha_r. So a root of multiplicity mm survives in ϕ′\phi' with multiplicity m−1m - 1, and a simple root disappears.

Explore What the derivative does to the roots

Try this. Start with a double root at α\alpha and simple roots at β\beta and γ\gamma. Watch the filled dot on the ϕ′\phi' plot at α\alpha. Raise the multiplicity of α\alpha to 33, then make every root simple. Finally drag the roots together and apart.

ϕ(x)=(x+1.5)2x(x−1.4)\phi(x) = (x + 1.5)^{2}x(x - 1.4)
xφ
xφ′
  • φ and its roots (bigger dot = higher multiplicity)
  • φ′: repeated roots (filled) and the roots between (hollow)
φ has degree 4, so φ′ has degree 3. Roots of φ′ found: 3 counted with multiplicity — −1.5 (multiplicity 1) — and one strictly between each pair of neighbouring roots: −0.5899, 0.8899.
A root of multiplicity mm of φ is a root of multiplicity m−1m-1 of φ′; a simple root of φ is not a root of φ′. These account for every root of φ′.
What to notice

At a root of multiplicity m≥2m \ge 2 the graph of ϕ\phi touches or flattens against the axis, and ϕ′\phi' has a root of multiplicity m−1m - 1 there. A simple root of ϕ\phi is never a root of ϕ′\phi'. Between any two neighbouring roots of ϕ\phi there is always exactly one more root of ϕ′\phi' (hollow dot), at the top or bottom of the hump. Counting both kinds always gives deg⁡ϕ−1\deg\phi - 1 roots, so for a polynomial with only real roots these are all the roots of ϕ′\phi'.

Precise statements

Theorem Derivative of a polynomial Hardy: §117 A

If ϕ(x)=a0xn+a1xn−1+⋯+an\phi(x) = a_0x^n + a_1x^{n-1} + \dots + a_n, then ϕ′(x)=na0xn−1+(n−1)a1xn−2+⋯+an−1\phi'(x) = na_0x^{n-1} + (n-1)a_1x^{n-2} + \dots + a_{n-1}. If ϕ(x)=a0∏r(x−αr)mr\phi(x) = a_0\prod_r (x - \alpha_r)^{m_r}, then ϕ′(x)=a0∑rmr(x−αr)mr−1∏s≠r(x−αs)ms\phi'(x) = a_0\sum_r m_r(x - \alpha_r)^{m_r - 1}\prod_{s \ne r}(x - \alpha_s)^{m_s}.

Theorem Repeated roots Hardy: Examples XLI, 2–3

Let ϕ\phi be a polynomial and m≥1m \ge 1. If (x−α)m(x - \alpha)^m divides ϕ(x)\phi(x) exactly (that is, α\alpha is a root of multiplicity exactly mm), then (x−α)m−1(x - \alpha)^{m-1} divides ϕ′(x)\phi'(x) exactly. In particular, α\alpha is a repeated root of ϕ\phi if and only if ϕ(α)=0\phi(\alpha) = 0 and ϕ′(α)=0\phi'(\alpha) = 0.

Theorem Rolle’s theorem for polynomials Hardy: Examples XLI, 10

Between any two real roots of a polynomial ϕ\phi lies a root of ϕ′\phi'.

Hardy proves this one by algebra, valid for polynomials only. The general Rolle’s theorem comes in §122.

Rational functions R(x)=P(x)/Q(x)R(x) = P(x)/Q(x) are differentiated by the quotient rule, R′=(P′Q−PQ′)/Q2R' = (P'Q - PQ')/Q^2. The result is in lowest terms when QQ has no repeated factor; otherwise it can be simplified. The cleaner route is through partial fractions. Algebra shows that RR can be written as a polynomial Π(x)\Pi(x) plus a sum of terms A/(x−α)pA/(x - \alpha)^p, where α\alpha runs through the roots of QQ and pp runs from 11 up to the multiplicity of α\alpha. This partial fraction decomposition is unique. By rule (4), extended to complex α\alpha in §115,

ddx A(x−α)p=−pA(x−α)p+1.\frac{d}{dx}\,\frac{A}{(x - \alpha)^p} = -\frac{pA}{(x - \alpha)^{p+1}}.
Theorem Derivative of a rational function Hardy: §118

If R(x)=Π(x)+∑r∑p=1mrAr,p(x−αr)pR(x) = \Pi(x) + \displaystyle\sum_{r}\sum_{p=1}^{m_r}\frac{A_{r,p}}{(x - \alpha_r)^p}, then R′(x)=Π′(x)−∑r∑p=1mrpAr,p(x−αr)p+1R'(x) = \Pi'(x) - \displaystyle\sum_{r}\sum_{p=1}^{m_r}\frac{pA_{r,p}}{(x - \alpha_r)^{p+1}}. In particular, (xm)′=mxm−1(x^m)' = mx^{m-1} for every integer mm, positive or negative (with x≠0x \ne 0 when m<0m < 0).

Corollary 1/x is not the derivative of a rational function Hardy: Examples XLII, 3–4

If (x−α)m(x - \alpha)^m is the exact power of x−αx - \alpha in the denominator of RR (in lowest terms), then the exact power in the denominator of R′R' is (x−α)m+1(x - \alpha)^{m+1}. Consequently the denominator of a derivative of a rational function never has a simple factor, and no rational function has derivative 1/x1/x.

Proofs

Proof Repeated roots
Strategy

Split off the factor (x−α)m(x - \alpha)^m and apply the product rule. The power drops by one, and the cofactor that remains does not vanish at α\alpha.

Factor

Write ϕ(x)=(x−α)mψ(x)\phi(x) = (x - \alpha)^m\psi(x), where ψ\psi is a polynomial with ψ(α)≠0\psi(\alpha) \ne 0 (that is what “exactly” means).

Differentiate

ϕ′(x)=m(x−α)m−1ψ(x)+(x−α)mψ′(x)=(x−α)m−1χ(x)\phi'(x) = m(x - \alpha)^{m-1}\psi(x) + (x - \alpha)^m\psi'(x) = (x - \alpha)^{m-1}\chi(x), where χ(x)=mψ(x)+(x−α)ψ′(x)\chi(x) = m\psi(x) + (x - \alpha)\psi'(x).

The cofactor does not vanish at α\alpha

χ(α)=mψ(α)≠0\chi(\alpha) = m\psi(\alpha) \ne 0. So (x−α)m−1(x - \alpha)^{m-1} divides ϕ′\phi' exactly.

The test for a repeated root

If m≥2m \ge 2 then m−1≥1m - 1 \ge 1, so ϕ′(α)=0\phi'(\alpha) = 0. If m=1m = 1 then (x−α)0=1(x - \alpha)^0 = 1 is the exact power, so ϕ′(α)=χ(α)≠0\phi'(\alpha) = \chi(\alpha) \ne 0. Hence a root α\alpha of ϕ\phi is repeated exactly when ϕ′(α)=0\phi'(\alpha) = 0.

Proof Rolle’s theorem for polynomials (Hardy’s algebraic proof)
Strategy

Take two consecutive real roots α<β\alpha < \beta. Remove the factors (x−α)m(x−β)n(x - \alpha)^m(x - \beta)^n; what remains has no root in [α,β][\alpha, \beta], so it has one sign there. Then show that the cofactor of ϕ′\phi' has opposite signs at α\alpha and β\beta, and use the intermediate value property of a polynomial (§101).

Factor

ϕ(x)=(x−α)m(x−β)nθ(x)\phi(x) = (x - \alpha)^m(x - \beta)^n\theta(x), where θ\theta is a polynomial with no root in [α,β][\alpha, \beta]. Being continuous and never zero there, θ\theta has a fixed sign; say θ>0\theta > 0 on [α,β][\alpha, \beta].

Differentiate

ϕ′(x)=(x−α)m−1(x−β)n−1F(x)\phi'(x) = (x - \alpha)^{m-1}(x - \beta)^{n-1}F(x), where F(x)={m(x−β)+n(x−α)}θ(x)+(x−α)(x−β)θ′(x)F(x) = \{m(x - \beta) + n(x - \alpha)\}\theta(x) + (x - \alpha)(x - \beta)\theta'(x).

Opposite signs at the ends

F(α)=m(α−β)θ(α)<0F(\alpha) = m(\alpha - \beta)\theta(\alpha) < 0 and F(β)=n(β−α)θ(β)>0F(\beta) = n(\beta - \alpha)\theta(\beta) > 0.

Conclude

FF is a polynomial, hence continuous, so it vanishes at some ξ\xi with α<ξ<β\alpha < \xi < \beta. Then ϕ′(ξ)=0\phi'(\xi) = 0. For two roots that are not consecutive, apply this to any consecutive pair between them.

Proof No simple factor in the denominator of R′R'
Strategy

Differentiate the partial fraction decomposition term by term. Every power of x−αx - \alpha goes up by one, so the lowest power that can occur in a denominator is the second. Then use the uniqueness of the decomposition.

Term by term

R′(x)=Π′(x)−∑r∑ppAr,p(x−αr)−p−1R'(x) = \Pi'(x) - \sum_r\sum_p pA_{r,p}(x - \alpha_r)^{-p-1}. Here Π′\Pi' is a polynomial and every remaining term has exponent p+1≥2p + 1 \ge 2.

The highest power at α\alpha

If (x−α)m(x - \alpha)^m is the exact power in the denominator of RR, then Aα,m≠0A_{\alpha, m} \ne 0, so the term −mAα,m/(x−α)m+1-mA_{\alpha,m}/(x - \alpha)^{m+1} is present in R′R' and nothing else has as high a power of x−αx - \alpha. So the exact power in the reduced denominator of R′R' is m+1m + 1.

1/x1/x is not a derivative

Suppose R′=1/xR' = 1/x for some rational RR. The decomposition of 1/x1/x is the single term 1/x1/x, a simple factor. By the first step, the decomposition of R′R' has no terms of exponent 11. Partial fraction decompositions are unique, so these cannot be the same function. (The same argument shows that any rational function whose denominator, in lowest terms, has a simple factor is not the derivative of a rational function.)

Explore Drill: polynomials and rational functions

Try this. Differentiate each function on paper first, then pick the matching formula. For the last one, try both the quotient rule and partial fractions.

1 of 4: differentiate ϕ(x)=(x−1)2(x+2)\phi(x) = (x-1)^2(x+2)
xy
  • φ′(x) from chord slopes
Hint: use the product rule, or expand. The dashed curve is the true derivative, found numerically; pick the formula you think matches it.
Right first time: 0 of 0 tried.
What to notice

The quotient rule and partial fractions must agree. Partial fractions often give the derivative almost without effort, which is why Hardy recommends them, especially for repeated differentiation (next lesson but one).

Worked examples and exercises

Exercise ●○○ Hardy: Examples XLI, 1

Show that if ϕ\phi is a polynomial then ϕ′(x)\phi'(x) is the coefficient of hh in the expansion of ϕ(x+h)\phi(x + h) in powers of hh.

Hint
Expand ϕ(x+h)=c0+c1h+c2h2+…\phi(x + h) = c_0 + c_1h + c_2h^2 + \dots, where the ckc_k depend on xx. What is c0c_0?

Solution

ϕ(x+h)\phi(x + h) is a polynomial in hh (with coefficients depending on xx): ϕ(x+h)=c0+c1h+c2h2+⋯+cnhn\phi(x + h) = c_0 + c_1h + c_2h^2 + \dots + c_nh^n. Putting h=0h = 0 gives c0=ϕ(x)c_0 = \phi(x). So {ϕ(x+h)−ϕ(x)}/h=c1+c2h+⋯+cnhn−1→c1\{\phi(x + h) - \phi(x)\}/h = c_1 + c_2h + \dots + c_nh^{n-1} \to c_1 as h→0h \to 0. Thus ϕ′(x)=c1\phi'(x) = c_1.

Exercise ●○○ Hardy: Examples XLI, 6

Show that ax2+2bx+cax^2 + 2bx + c (with a≠0a \ne 0) has a double root if and only if ac−b2=0ac - b^2 = 0, using the derivative.

Hint
A double root α\alpha must also be a root of the derivative 2(ax+b)2(ax + b).

Solution

By the theorem on repeated roots, α\alpha is a double root exactly when it is a root of both ϕ\phi and ϕ′(x)=2(ax+b)\phi'(x) = 2(ax + b). The derivative vanishes only at α=−b/a\alpha = -b/a, and ϕ(−b/a)=b2/a−2b2/a+c=(ac−b2)/a\phi(-b/a) = b^2/a - 2b^2/a + c = (ac - b^2)/a. So there is a double root exactly when ac−b2=0ac - b^2 = 0.

Exercise ●●○ Hardy: Examples XLI, 7

Show that the equation 1x−a+1x−b+1x−c=0\dfrac{1}{x - a} + \dfrac{1}{x - b} + \dfrac{1}{x - c} = 0 (with aa, bb, cc real) can have a pair of equal roots only if a=b=ca = b = c.

Hint
The left side is ϕ′(x)/ϕ(x)\phi'(x)/\phi(x) for ϕ(x)=(x−a)(x−b)(x−c)\phi(x) = (x - a)(x - b)(x - c).
Hint
When does a quadratic 3x2−2px+q3x^2 - 2px + q have equal roots? Express the condition through (a−b)2+(b−c)2+(c−a)2(a - b)^2 + (b - c)^2 + (c - a)^2.

Solution

With ϕ(x)=(x−a)(x−b)(x−c)\phi(x) = (x - a)(x - b)(x - c), the left side equals ϕ′(x)/ϕ(x)\phi'(x)/\phi(x) wherever ϕ(x)≠0\phi(x) \ne 0. So the roots of the equation are those roots of the quadratic ϕ′(x)=3x2−2(a+b+c)x+(ab+bc+ca)\phi'(x) = 3x^2 - 2(a + b + c)x + (ab + bc + ca) that differ from aa, bb and cc. A pair of equal roots of the equation is therefore a double root of ϕ′\phi', which requires the discriminant to vanish:

4(a+b+c)2−12(ab+bc+ca)=4(a2+b2+c2−ab−bc−ca)=2{(a−b)2+(b−c)2+(c−a)2}=0.4(a + b + c)^2 - 12(ab + bc + ca) = 4(a^2 + b^2 + c^2 - ab - bc - ca) = 2\{(a - b)^2 + (b - c)^2 + (c - a)^2\} = 0.

For real a,b,ca, b, c this forces a=b=ca = b = c. (Curiously, when a=b=ca = b = c the equation reads 3/(x−a)=03/(x - a) = 0 and has no roots at all, so in fact equal roots never occur.)

Exercise ●○○ Hardy: Examples XLII, 1

Show that ddxx1+x2=1−x2(1+x2)2\dfrac{d}{dx}\dfrac{x}{1 + x^2} = \dfrac{1 - x^2}{(1 + x^2)^2} and ddx1−x21+x2=−4x(1+x2)2\dfrac{d}{dx}\dfrac{1 - x^2}{1 + x^2} = -\dfrac{4x}{(1 + x^2)^2}.

Solution

By the quotient rule, the first derivative is {(1+x2)−x⋅2x}/(1+x2)2=(1−x2)/(1+x2)2\{(1 + x^2) - x \cdot 2x\}/(1 + x^2)^2 = (1 - x^2)/(1 + x^2)^2. For the second, {−2x(1+x2)−(1−x2)2x}/(1+x2)2=(−2x−2x3−2x+2x3)/(1+x2)2=−4x/(1+x2)2\{-2x(1 + x^2) - (1 - x^2)2x\}/(1 + x^2)^2 = (-2x - 2x^3 - 2x + 2x^3)/(1 + x^2)^2 = -4x/(1 + x^2)^2. A quicker route for the second: (1−x2)/(1+x2)=−1+2/(1+x2)(1 - x^2)/(1 + x^2) = -1 + 2/(1 + x^2), whose derivative is −4x/(1+x2)2-4x/(1 + x^2)^2 by the reciprocal rule.

Exercise Partial fractions do the work ●●○ Hardy: §118; Examples XLII, 3

Let R(x)=1x2(x−1)R(x) = \dfrac{1}{x^2(x - 1)}. Find its partial fractions, differentiate, and check the claim about the denominator of R′R'.

Hint
Try R(x)=Ax+Bx2+Cx−1R(x) = \dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x - 1}. Multiply through by x2(x−1)x^2(x - 1) and compare.

Solution

1=Ax(x−1)+B(x−1)+Cx21 = Ax(x - 1) + B(x - 1) + Cx^2. Putting x=0x = 0 gives B=−1B = -1; putting x=1x = 1 gives C=1C = 1; comparing coefficients of x2x^2 gives A+C=0A + C = 0, so A=−1A = -1. Thus R=−1x−1x2+1x−1R = -\dfrac1x - \dfrac1{x^2} + \dfrac{1}{x - 1}, and

R′(x)=1x2+2x3−1(x−1)2.R'(x) = \frac{1}{x^2} + \frac{2}{x^3} - \frac{1}{(x - 1)^2}.

The denominator of RR contains x2x^2 and (x−1)1(x - 1)^1; that of R′R' contains x3x^3 and (x−1)2(x - 1)^2, each power raised by one, and no simple factor, as the corollary predicts.

Check yourself

Check yourself True or false?

If ϕ\phi is a polynomial with ϕ(α)=0\phi(\alpha) = 0 and ϕ′(α)=0\phi'(\alpha) = 0, then (x−α)2(x - \alpha)^2 divides ϕ(x)\phi(x).

Why

True. If α\alpha were a simple root, the theorem on repeated roots gives ϕ′(α)=mψ(α)=ψ(α)≠0\phi'(\alpha) = m\psi(\alpha) = \psi(\alpha) \ne 0. So α\alpha has multiplicity at least 22. This is Examples XLI, 3.

Check yourself Choose one

A polynomial ϕ\phi of degree 77 has the real roots −1-1 (multiplicity 33), 00 (simple) and 22 (multiplicity 33), and no others. How many roots does ϕ′\phi' have strictly between −1-1 and 22, other than at −1-1, 00, 22 themselves?

Why

There is one root of ϕ′\phi' in each of the gaps (−1,0)(-1, 0) and (0,2)(0, 2). Together with multiplicity 22 at −1-1 and multiplicity 22 at 22, this gives 2+2+2=6=deg⁡ϕ−12 + 2 + 2 = 6 = \deg\phi - 1 roots, which are all of them. The simple root 00 is not a root of ϕ′\phi'.

Check yourself Enter a number

What is the derivative of x−3x^{-3} at x=1x = 1?

Why

By §118 the rule (xm)′=mxm−1(x^m)' = mx^{m-1} holds for negative integers: −3x−4-3x^{-4}, which is −3-3 at x=1x = 1. (Or: x−3=1/x3x^{-3} = 1/x^3 and the reciprocal rule gives −3x2/x6-3x^2/x^6.)

Check yourself True or false?

There is a rational function RR with R′(x)=1xR'(x) = \dfrac{1}{x} for all x≠0x \ne 0.

Why

False. Derivatives of rational functions never have a simple factor such as xx in their reduced denominator, because differentiation raises every power of x−αx - \alpha by one. So the function with derivative 1/x1/x, the logarithm, is not rational. That is why it needs a chapter of its own (Chapter IX).

Hardy’s language

Summary

Summary
  • Polynomials differentiate term by term; in factored form, ϕ′/ϕ=∑mr/(x−αr)\phi'/\phi = \sum m_r/(x - \alpha_r).
  • A root of multiplicity mm of ϕ\phi is a root of multiplicity exactly m−1m - 1 of ϕ′\phi'. So α\alpha is a repeated root exactly when ϕ(α)=ϕ′(α)=0\phi(\alpha) = \phi'(\alpha) = 0.
  • Between two real roots of a polynomial lies a root of its derivative (Rolle, proved algebraically here).
  • Rational functions: use partial fractions; {A/(x−α)p}′=−pA/(x−α)p+1\{A/(x - \alpha)^p\}' = -pA/(x - \alpha)^{p+1}, and (xm)′=mxm−1(x^m)' = mx^{m-1} for all integers mm.
  • Differentiating raises each power in the denominator by one, so 1/x1/x is not the derivative of a rational function.