4.5  The Formal Derivative

The polynomials of this chapter are coefficient sequences, and Theorem 4.4.2 showed how to evaluate them and how to substitute into them. One more operation from school survives the passage to an arbitrary commutative ring: the derivative. This section defines it by its coefficients, proves the sum, product and power rules with the move of Lemma 4.2.3, and asks when a derivative can be 0. Over a field the answer depends on the characteristic of Chapter 2, and over Fp it is not the answer of calculus.

At school a double root shows itself in the graph. The parabola y=(x−1)2 touches the axis at 1 instead of crossing it, and its slope there is 0: the derivative 2(x−1) vanishes at 1 as well. Over Fp there is no graph and no slope; the field has p elements and no limits. What survives is the formula: the derivative of axn is naxn−1. We keep the formula and drop the limit. Chapter 5 uses the result to detect repeated roots; this section builds the tool.

Throughout, R is a commutative ring (Number Systems: From N to R, Definition 2.3.1). Polynomials are written f,g,h, with coefficients fk,gk,hk, because the letter p is kept for a prime. A dot with an integer on its left is a multiple, n⋅a=a+⋯+a with n terms (the “Multiples” paragraph of Number Systems: From N to R, Section 2.3, collected in Lemma 4.1.1 (d)); the product of two ring elements is written by juxtaposition.

4.5.1. The derivative by coefficients

At school, (3x4+5x2)′=12x3+10x. Each term moves down one place, and its coefficient is multiplied by the exponent it had. In R[x] “multiplied by the exponent” has a meaning without any division or limit: the exponent n is a natural number, and n⋅a is the n-th multiple of a. That recurring computation deserves a name.

The formal derivative moves every coefficient down one place and takes it as many times as its old exponent.

Definition 4.5.1 (Formal Derivative)

Let R be a commutative ring and f∈R[x]. The formal derivative of f is the sequence f′:N→R given by (f′)k:=(k+1)⋅fk+1for every k∈N, where (k+1)⋅fk+1 is the (k+1)-th multiple of fk+1. The higher derivatives are defined by f(0):=f,f(k+1):=(f(k))′(k∈N), and we write f″ for f(2).

In words: the coefficient of xk in f′ is read off from the coefficient of xk+1 in f, added to itself k+1 times. The definition uses only the addition of R, so it makes sense, word for word, over Z, Q, Z/6Z and Fp.

Well-definedness. Two things need checking: that f′ is again a polynomial, and that the higher derivatives exist.

  • f′∈R[x]. First, m⋅0=0 for every m∈N: by Lemma 4.1.1 (d), m⋅0=(m⋅1)0, and this is 0 by Number Systems: From N to R, Proposition 2.3.2 (b). Now choose N∈N with fk=0 for every k>N (Definition 4.1.1). For k≥N we have k+1>N, so fk+1=0 and (f′)k=(k+1)⋅0=0. So f′ has only finitely many non-zero terms, and f′∈R[x]. Moreover (f′)k=0 for k>N−1, so for N≥1, Proposition 4.2.1 writes f′ as an honest sum: f′=∑k=0N−1((k+1)⋅fk+1)xk=1⋅f1+(2⋅f2)x+⋯+(N⋅fN)xN−1.
  • Higher derivatives. Since u↦u′ is a function R[x]→R[x], Sets, Relations, and Cardinality, Theorem 2.3.1, with X=R[x], starting value f and step (k,u)↦u′, gives exactly one sequence k↦f(k) with the two displayed properties.

Monomials. Let a∈R and n∈N. The monomial axn has a in position n and 0 elsewhere (Definition 4.1.1), so (axn)k+1 is a when k+1=n and 0 otherwise. Hence ((axn)′)k is n⋅a when k=n−1, and (k+1)⋅0=0 otherwise: (M)(axn)′=(n⋅a)xn−1(n≥1),(ax0)′=0. The case n=0 is separate because xn−1 has no meaning there: −1∉N. Every constant has derivative 0.

The element n⋅1. By Lemma 4.1.1 (d), n⋅a=(n⋅1)a. So the exponent enters the derivative only through one element of R, the multiple n⋅1, and that element can be 0. In F2, 2⋅1=1+1=0, so (x2)′=(2⋅1)x=0. This is the whole difference between the derivative here and the derivative of calculus, and the rest of the section keeps track of it.

Why this definition. The formula is the school formula with the limit removed. Exercise C1 asks you to show that it is the only additive map R[x]→R[x] that sends constants to 0, sends x to 1 and obeys the product rule. A definition by limits is not available, since Fp and Z/6Z have no distances.

Warning. The coefficient of xk in f′ is (k+1)⋅fk+1, not k⋅fk: the derivative shifts before it multiplies. For f=x2 over Q, the coefficient of x1 in f′=2x is 2⋅f2=2, while 1⋅f1=0. Reading the formula without the shift gives ∑k(k⋅fk)xk, which is xf′, not f′.

Example (Formal derivatives in five rings)

Compute the following derivatives.

  • (i) (x4−2x3+2x−1)′ over Q.

  • (ii) a′, x′ and (x−c)′ over any commutative ring R, for a,c∈R.

  • (iii) (x3+x)′ over F3, and (x2)′ over F2.

  • (iv) ([2]x3+x)′ over Z/6Z.

  • (v) (xn)′ over Z, for n≥1.

  • (vi) The higher derivatives (x4)′, (x4)″ and (x4)‴ over Q and over F3.

Solution. In each case, by (M) and Lemma 4.1.1 (d), the derivative of axn with n≥1 is ((n⋅1)a)xn−1, and the derivative of a sum is computed coefficient by coefficient from Definition 4.5.1.

  • (i) The coefficients are f0=−1, f1=2, f2=0, f3=−2, f4=1, and fk=0 for k≥5. So (f′)0=1⋅2=2, (f′)1=2⋅0=0, (f′)2=3⋅(−2)=−6, (f′)3=4⋅1=4, and (f′)k=0 for k≥4. In Q the multiple n⋅a is the product na: n⋅a=(n⋅1)a by Lemma 4.1.1 (d), and n⋅1 is the rational number n, by induction on n from (n+1)⋅1=n⋅1+1, since the embeddings N⊆Z⊆Q preserve sums and 1 (Number Systems: From N to R, Proposition 2.2.3, Number Systems: From N to R, Proposition 2.4.4). Hence (x4−2x3+2x−1)′=4x3−6x2+2, as at school.

  • (ii) a=ax0, so a′=0 by (M). x=1x1 (Definition 4.1.1), so x′=(1⋅1)x0=1, since 1⋅1=0⋅1+1=1 by the recursion of multiples. The polynomial x−c has −c in position 0, 1 in position 1 and 0 elsewhere, so ((x−c)′)0=1⋅1=1, and ((x−c)′)k=(k+1)⋅0=0 for k≥1: (x−c)′=1.

  • (iii) Over F3, (x3+x)′=(3⋅1)x2+1=1, since 3⋅1=1+1+1=0 in F3 (Number Systems: From N to R, Theorem 3.4.3 (d): p⋅[1]=[p]=[0] in Z/pZ). Over F2, (x2)′=(2⋅1)x=0, since 1+1=0 in F2 (Example (Arithmetic on Z/nZ and the Field F2)).

  • (iv) ([2]x3+x)′=(3⋅[2])x2+1=[6]x2+1=1, since 3⋅[2]=(3⋅[1])[2]=[3][2]=[6]=[0], by Lemma 4.1.1 (d), Number Systems: From N to R, Theorem 3.4.3 (d), and the product of classes computed on representatives (Number Systems: From N to R, Theorem 3.4.1 (b)). The polynomial has degree 3 and its derivative has degree 0: the degree dropped by 3, not by 1.

  • (v) (xn)′=(n⋅1)xn−1=nxn−1, since in Z the multiple n⋅1 is the integer n (the “Multiples” paragraph cited above).

  • (vi) Apply (M) three times, with the rule m⋅(j⋅1)=(mj)⋅1 of Lemma 4.1.1 (d). Over any commutative ring, (x4)′=(4⋅1)x3,(x4)″=(3⋅(4⋅1))x2=(12⋅1)x2,(x4)‴=(2⋅(12⋅1))x=(24⋅1)x. Over Q, as in (i), these are 4x3, 12x2 and 24x. Over F3, 3⋅1=0, so 4⋅1=3⋅1+1⋅1=1 and 12⋅1=4⋅(3⋅1)=4⋅0=0, by Lemma 4.1.1 (d) and m⋅0=0. So (x4)′=x3, but already (x4)″=0, and then (x4)‴=0′=0 by (M).

Examples (iii) and (iv) are the new phenomena. Over F2 a non-constant polynomial has derivative 0; over Z/6Z the coefficient of x2 in the derivative, 3⋅[2], is [0] although neither 3⋅[1]=[3] nor [2] is. Both come from the element n⋅1 above.

Quick check. Compute (x3+x2+x+1)′ over F2.

Solution. (3⋅1)x2+(2⋅1)x+1=x2+1, since 3⋅1=1+1+1=1 and 2⋅1=0 in F2.

4.5.2. The rules of differentiation

Calculus proves the sum, product and power rules with limits. Here they must come from the coefficients. The sum rule is one line per coefficient. The product rule is where a direct attack hurts: the k-th coefficient of (fg)′ is (k+1)⋅∑i=0k+1figk+1−i, and matching it with f′g+fg′ means splitting each term between two sums with shifted indices. The move of Section 4.2, check on monomials, extend by additivity, avoids that: both sides of the product rule are additive in f and in g, so it is enough to compare them on monomials, where (M) does the work.

Theorem 4.5.1 (Rules for the Formal Derivative)

Let R be a commutative ring, f,g∈R[x], a,c∈R and m∈Z>0.

  • (a) (Linearity) (f+g)′=f′+g′, and (af)′=af′ for the constant a; moreover a′=0.
  • (b) (Product rule) (fg)′=f′g+fg′.
  • (c) (Power rule) (gm)′=(m⋅1)gm−1g′. In particular ((x−c)m)′=(m⋅1)(x−c)m−1.

Idea. ① Linearity is one coefficient at a time: the multiple (k+1)⋅b is additive in b and commutes with multiplication by a constant. ② For the product rule, both (fg)′ and f′g+fg′ are additive in each argument, by ①; so Lemma 4.2.3 reduces the rule to f=axi, g=bxj. There (M) and Lemma 4.2.2 (b) turn both sides into one monomial, and the coefficients agree because (i+j)⋅(ab)=i⋅(ab)+j⋅(ab). ③ The power rule is the product rule applied m−1 times, by induction.

Proof. Equality of polynomials is equality of all coefficients (Definition 4.1.1), so it is enough to compare coefficients in (a); (b) and (c) are then built on (a).

  • (a) Let k∈N. Since addition in R[x] is coefficientwise (Definition 4.2.1), ((f+g)′)k=(k+1)⋅(fk+1+gk+1)=(k+1)⋅fk+1+(k+1)⋅gk+1=(f′+g′)k, where the second equality is the rule n⋅(b+d)=n⋅b+n⋅d of Lemma 4.1.1 (d). For the constant a, (af)k+1=afk+1 by Theorem 4.2.4 (d), so ((af)′)k=(k+1)⋅(fk+1a)=((k+1)⋅fk+1)a=a(f′)k=(af′)k, using (F6) of R in the first and third equalities, the rule (n⋅b)d=n⋅(bd) of Lemma 4.1.1 (d) in the second, and Theorem 4.2.4 (d) in the last. Finally a′=0 is (M) with n=0.

  • (b) Define Φ,Ψ:R[x]×R[x]→R[x] by Φ(f,g):=(fg)′,Ψ(f,g):=f′g+fg′. By Theorem 4.2.4 (a), R[x] is a commutative ring, so (F1)–(F7), (F9) and Number Systems: From N to R, Proposition 2.3.2 hold in it.

    Additivity. Let f,h,g∈R[x]. By the distributive law (F9) of R[x] and (a), Φ(f+h,g)=(fg+hg)′=(fg)′+(hg)′=Φ(f,g)+Φ(h,g). By (a), (F9) and a regrouping of four terms by (F1) and (F2), Ψ(f+h,g)=(f′+h′)g+(f+h)g′=(f′g+fg′)+(h′g+hg′)=Ψ(f,g)+Ψ(h,g). Both maps are symmetric: Φ(f,g)=Φ(g,f) because fg=gf, and Ψ(f,g)=Ψ(g,f) because f′g+fg′=gf′+g′f=g′f+gf′, by (F6) and (F2) of R[x]. So each is additive in its second argument as well.

    Monomials. Let u=axi and v=bxj, with a,b∈R and i,j∈N. By Lemma 4.2.2 (b), uv=(ab)xi+j.

    Case i≥1 and j≥1. Then i+j≥1, and (M) gives Φ(u,v)=((i+j)⋅(ab))xi+j−1. On the other side, (M) gives u′=(i⋅a)xi−1 and v′=(j⋅b)xj−1, and Lemma 4.2.2 (b), with (i−1)+j=i+(j−1)=i+j−1 in N, gives Ψ(u,v)=((i⋅a)b)xi+j−1+(a(j⋅b))xi+j−1. Now (i⋅a)b=i⋅(ab), and a(j⋅b)=(j⋅b)a=j⋅(ba)=j⋅(ab), by Lemma 4.1.1 (d) and (F6) of R. Two monomials in the same position add coefficientwise (Definition 4.2.1), and i⋅(ab)+j⋅(ab)=(i+j)⋅(ab) (Lemma 4.1.1 (d)). So Ψ(u,v)=Φ(u,v).

    Case i=0. Then u=a is a constant, u′=0 by (a), and uv=(ab)xj. So Ψ(u,v)=0⋅v+av′=av′, by Number Systems: From N to R, Proposition 2.3.2 (b) and (F3) of R[x]. If j=0, then v′=0 and uv is a constant, so both sides are 0 (by (a) and Number Systems: From N to R, Proposition 2.3.2 (b)). If j≥1, then by (M) and Lemma 4.2.2 (b) with m=0, av′=(a(j⋅b))xj−1=(j⋅(ab))xj−1=((ab)xj)′=Φ(u,v), where the middle step is the computation of the previous case.

    Case j=0, i≥1. By the symmetry of Φ and Ψ this is the case i=0 with u and v exchanged.

    So Φ and Ψ agree whenever both arguments are monomials, and both are additive in each argument. By Lemma 4.2.3, with two arguments and T=R[x], Φ=Ψ. This is the product rule.

  • (c) First, (f−g)′=f′−g′: by (a), (f−g)′+g′=((f−g)+g)′=f′, and adding −g′ to both sides gives the claim, by (F2)–(F4) of R[x]. We prove the power rule by induction on m≥1 (Logic and Proof, Axiom 4.2.1, with base 1). For m=1: g0=1 (Lemma 4.1.1 (c)) and 1⋅1=1, so the right side is 1⋅1⋅g′=g′. Suppose (gm)′=(m⋅1)gm−1g′ for some m≥1. Since gm+1=gmg, the product rule (b) gives (gm+1)′=(gm)′g+gmg′=(m⋅1)gm−1g′g+gmg′=(m⋅1)gmg′+1⋅gmg′=((m+1)⋅1)gmg′. The third equality uses (F5), (F6), gm−1g=gm (the power recursion, since (m−1)+1=m) and (F7); the last uses (F9), the fact that constants add as in R (Theorem 4.2.4 (b)), and the recursion (m+1)⋅1=m⋅1+1 of multiples. This completes the induction.

For the particular case, (x−c)′=x′−c′=1−0=1, by the difference rule and Example (Formal derivatives in five rings) (ii). The power rule with g=x−c gives ((x−c)m)′=(m⋅1)(x−c)m−1⋅1, and ⋅1 may be dropped by (F7). This proves the theorem.

The theorem is the calculus toolkit with every limit removed, and it holds over every commutative ring. The power rule shows the element m⋅1 once more: the derivative of (x−c)m is (x−c)m−1 times the constant m⋅1, and over Fp that constant is 0 for m=p. So over Fp the polynomial (x−c)p has derivative 0, although it is not constant; the next subsection says exactly when this happens.

Remark. Over Q, and over the real numbers, f′ is the derivative of the polynomial function c↦f(c) in the sense of calculus. This book never uses the agreement, and nothing in it depends on it; it explains only why the formulas look familiar.

Quick check. Over F3, compute ((x+1)3)′ twice: by the power rule, and by expanding (x+1)3 first.

Solution. By Theorem 4.5.1 (c), ((x+1)3)′=(3⋅1)(x+1)2=0, since 3⋅1=0 in F3. Expanding, (x+1)3=x3+3x2+3x+1=x3+1 in F3[x], and (x3+1)′=(3⋅1)x2=0. The two answers agree.

4.5.3. When the derivative vanishes

In calculus, a function with derivative 0 on an interval is constant. Over F2 the polynomial x2 is not constant, yet (x2)′=0 (Example (Formal derivatives in five rings) (iii)). Which polynomials have derivative 0? Over a field the answer depends only on the characteristic. Recall Definition 2.5.1: charF is the least positive integer n with n⋅1=0 in F, and 0 if there is none; by Theorem 2.5.3 it is 0 or a prime.

Proposition 4.5.2 (When the Formal Derivative Is Zero)

Let F be a field (Definition 2.1.1) and f∈F[x].

  • (a) If charF=0, then f′=0 if and only if f is constant. Moreover, deg⁡f′=deg⁡f−1 whenever deg⁡f≥1.
  • (b) If charF=p>0, then p is prime, and the following are equivalent: (i) f′=0; (ii) fk=0 for every k∈N not divisible by p; (iii) f=g∘xp for some g∈F[x] (Definition 4.4.3).

Idea. Everything rests on one identity: for k≥1, the coefficient of xk−1 in f′ is k⋅fk=(k⋅1)fk. In a field a product is 0 only when a factor is. So f′=0 forces fk=0 exactly at the k with k⋅1≠0: in characteristic 0 that is every k≥1, and in characteristic p it is every k not divisible by p. A polynomial whose only non-zero coefficients sit at multiples of p is a polynomial in xp.

Proof. For every k≥1, Definition 4.5.1 at the index k−1 and Lemma 4.1.1 (d) give (∗)(f′)k−1=k⋅fk=(k⋅1)fk. As k runs through the integers ≥1, the index k−1 runs through N, so f′=0 if and only if (k⋅1)fk=0 for every k≥1.

  • (a) Let charF=0. Then k⋅1≠0 for every k≥1, by Definition 2.5.1. Suppose f′=0, and let k≥1. By (∗), (k⋅1)fk=0 with k⋅1≠0, so fk=0 by Theorem 2.1.1 (f). Thus f and the constant f0 agree in every position, and f=f0 (Definition 4.1.1). Conversely, a constant has derivative 0 by Theorem 4.5.1 (a).

    Now let n:=deg⁡f≥1, so that fn≠0 and fk=0 for every k>n (Definition 4.3.1). By (∗), (f′)n−1=(n⋅1)fn, a product of two non-zero elements of F, which is non-zero by Theorem 2.1.1 (f). For k≥n, (f′)k=(k+1)⋅fk+1=(k+1)⋅0=0, as in the well-definedness paragraph after Definition 4.5.1. So n−1 is the largest index of a non-zero coefficient of f′: deg⁡f′=n−1.

  • (b) Let charF=p>0. Then p is prime by Theorem 2.5.3.

By Proposition 2.5.2 (a), with c=p: for k∈N, k⋅1=0 if and only if p∣k.

(i)⇒(ii). Let f′=0 and let k∈N with p∤k. Then k≠0, since p∣0; so k≥1, and (k⋅1)fk=0 by (∗). By Proposition 2.5.2 (a), k⋅1≠0, so fk=0 by Theorem 2.1.1 (f).

(ii)⇒(i). Let k≥1. If p∤k, then fk=0 by (ii); if p∣k, then k⋅1=0 by Proposition 2.5.2 (a). Either way (k⋅1)fk=0 (Number Systems: From N to R, Proposition 2.3.2 (b)), so f′=0 by (∗).

(ii)⇒(iii). Choose N∈N with fk=0 for every k>N, and define g:N→F by gj:=fpj. For j>N we have pj≥j>N, so gj=0, and g∈F[x]. By Definition 4.4.3, then the power law (xp)j=xpj in the commutative ring F[x] (Lemma 4.1.1 (c)) and Theorem 4.2.4 (c), g∘xp=∑j=0Ngj(xp)j=∑j=0Nfpjxpj. We compare the coefficients of both sides with those of f at an index k∈N. Addition in F[x] is coefficientwise (Definition 4.2.1), so the k-th coefficient of a finite sum of polynomials is the finite sum of their k-th coefficients (induction on the number of terms, through the sum recursion of Lemma 4.1.1 (a)). The monomial fpjxpj has k-th coefficient fk if pj=k, and 0 otherwise.

  • If p∤k, no j has pj=k, so every term is 0 at k, and fk=0 by (ii).
  • If p∣k, then k=pj0 for some j0∈Z, and j0≥0: if j0<0, then pj0<0⋅p=0 by Number Systems: From N to R, Proposition 2.3.5 (c), since p>0, against k≥0. This j0 is unique (if pj=pj′, then j=j′ by Number Systems: From N to R, Proposition 2.3.5 (f), since p≠0). If j0≤N, the sum of the k-th coefficients has the single possibly non-zero term fpj0=fk, so it equals fk by (Σ3) of Lemma 4.1.1 (b). If j0>N, every term is 0 at k, and fk=0 because k=pj0≥j0>N.

In every case the k-th coefficients agree, so g∘xp=f.

(iii)⇒(ii). Let f=g∘xp, and choose N with gj=0 for j>N. The computation above gives f=∑j=0Ngjxpj, and by the first bullet, the coefficient of this sum at any k with p∤k is 0. This proves the proposition.

So in characteristic p the polynomials with derivative 0 are exactly the polynomials in xp. Over F2, x2+1=(x+1)∘x2; over F3, x6+2x3+1=(x2+2x+1)∘x3, and indeed its derivative is (6⋅1)x5+(6⋅1)x2=0, since 6⋅1=0 in F3. Part (a) is the case where the school statement survives, and its proof spends the hypothesis at exactly one place: k⋅1≠0.

Warning. “f′=0 means f is constant” and “differentiating lowers the degree by one” both fail in characteristic p. Over Fp, (xp)′=(p⋅1)xp−1=0, although xp has degree p; and (xp−x)′=(p⋅1)xp−1−1=−1 has degree 0, not p−1. Tests for repeated roots that use the derivative must therefore say which characteristic they assume. Chapter 5 concludes from (xp−x)′=−1 that xp−x has no repeated roots in Fp.

Quick check. Compute (x5+x)′ over F5.

Solution. (x5+x)′=(5⋅1)x4+1=1, since 5⋅1=0 in F5.

4.5.4. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Compute (x5−x)′ over Q and over F5.
  • (b) True or false: if f′=0, then f is constant. Answer over Q and over F2, with a reason or a witness.
  • (c) Let f∈(Z/6Z)[x] have degree 3 and leading coefficient [2]. What can deg⁡f′ be? Give a witness for each possibility.
  • (d) In the proof of the product rule (Theorem 4.5.1 (b)), why is the case i=0 treated separately?

Solution.

  • (a) Over Q: (x5−x)′=5x4−1, by (M), with 5⋅1=5. Over F5: (x5−x)′=(5⋅1)x4−1=−1, since 5⋅1=0 in F5; in the elements 0,…,4 of F5, −1=4.

  • (b) Over Q: true. Q is a field (Number Systems: From N to R, Theorem 2.4.3) of characteristic 0 (Example (The characteristics of the standard fields)); so Proposition 4.5.2 (a) applies. Over F2: false. The witness is x2, which is not constant, with (x2)′=(2⋅1)x=0 (Example (Formal derivatives in five rings) (iii)).

  • (c) deg⁡f′∈{1,0,−∞}, and each occurs. Write f=[2]x3+f2x2+f1x+f0. Then f′=(3⋅[2])x2+(2⋅f2)x+f1=(2⋅f2)x+f1, since 3⋅[2]=[6]=[0]. So deg⁡f′≤1 (Definition 4.3.1). Witnesses: [2]x3+x2 has derivative [2]x, of degree 1; [2]x3+x has derivative 1, of degree 0; [2]x3 has derivative 0, of degree −∞. The school rule “degree drops by one” fails because 3⋅[2]=[0]: the leading coefficient of f′ would be (3⋅1)lc(f), and here that product is 0.

  • (d) For i=0 the monomial u=ax0 is a constant, and (M) gives u′=0, not (0⋅a)x−1: the exponent i−1=−1 is not in N, so xi−1 has no meaning. The general computation, which writes u′=(i⋅a)xi−1, therefore cannot be used, and the case is checked directly.

B. Practice

Exercise (B1: The chain rule)

Let R be a commutative ring and f,g∈R[x]. Prove that (f∘g)′=(f′∘g)g′. Check the formula on f=x2, g=x2+1 over Z.

Solution. Fix g, and define Φ,Ψ:R[x]→R[x] by Φ(f):=(f∘g)′,Ψ(f):=(f′∘g)g′. The move is the one of the product rule: check on monomials, extend by additivity.

Additivity. By Definition 4.4.3 and Theorem 4.4.2 (a), u↦u∘g is a ring homomorphism R[x]→R[x] that fixes the constants and sends x to g; in particular (f+h)∘g=f∘g+h∘g. With Theorem 4.5.1 (a), Φ(f+h)=(f∘g+h∘g)′=Φ(f)+Φ(h), and, using also (F9) of R[x], Ψ(f+h)=(f′∘g+h′∘g)g′=Ψ(f)+Ψ(h).

Monomials. Let f=axn with a∈R, n∈N. By Theorem 4.2.4 (c), axn is the product of the constant a and the n-th power of x; a ring homomorphism preserves products and powers (Definition 4.4.2), so (axn)∘g=agn.

If n=0, then f=a and f∘g=a, so Φ(f)=0 by Theorem 4.5.1 (a). Also f′=0, and 0∘g=0 because a ring homomorphism sends 0 to 0 (Definition 4.4.2); so Ψ(f)=0⋅g′=0.

If n≥1, then by Theorem 4.5.1 (a) and (c), Φ(f)=(agn)′=a(gn)′=a(n⋅1)gn−1g′. On the other side f′=(n⋅a)xn−1 by (M), so f′∘g=(n⋅a)gn−1 and Ψ(f)=(n⋅a)gn−1g′. The constants agree: a(n⋅1)=(n⋅1)a=n⋅a, by (F6) and Lemma 4.1.1 (d), and constants multiply as in R (Theorem 4.2.4 (b)). So Φ(f)=Ψ(f).

By Lemma 4.2.3 with one argument and T=R[x], Φ=Ψ, which is the chain rule.

Check. Over Z, f∘g=(x2+1)2=x4+2x2+1, whose derivative is 4x3+4x. On the other side, f′=2x, f′∘g=2(x2+1) and g′=2x, so (f′∘g)g′=4x3+4x.

Exercise (B2: Higher derivatives)

For n,k∈N write P(n,k) for the product n(n−1)⋯(n−k+1) of k factors, defined by P(n,0):=1 and P(n,k+1):=P(n,k)(n−k); it is a natural number for k≤n.

  • (a) Let R be a commutative ring. Show that (xn)(k)=(P(n,k)⋅1)xn−k for k≤n, and (xn)(k)=0 for k>n.
  • (b) Let p be a prime. Show that f(p)=0 for every f∈Fp[x].

Solution.

  • (a) Induction on k≤n. For k=0, (xn)(0)=xn=(1⋅1)xn. Let k<n and suppose (xn)(k)=(P(n,k)⋅1)xn−k. Since n−k≥1, (M) gives (xn)(k+1)=((n−k)⋅(P(n,k)⋅1))xn−k−1=(P(n,k+1)⋅1)xn−(k+1), by the rule m⋅(j⋅b)=(mj)⋅b of Lemma 4.1.1 (d) and (n−k)P(n,k)=P(n,k+1) in N. This proves the formula for k≤n. At k=n the polynomial (xn)(n) is a constant, so (xn)(n+1)=0 by (M), and the derivative of 0 is 0; by induction, (xn)(k)=0 for every k>n.

  • (b) The coefficients of f(k). Let R be any commutative ring and f∈R[x]. We show by induction on k that (f(k))j=P(j+k,k)⋅fj+kfor every j∈N. For k=0 both sides are fj. If it holds for k, then by Definition 4.5.1 and Lemma 4.1.1 (d), (f(k+1))j=(j+1)⋅(P(j+k+1,k)⋅fj+k+1)=(P(j+k+1,k)(j+1))⋅fj+k+1=P(j+k+1,k+1)⋅fj+k+1, since the factor added by the recursion is (j+k+1)−k=j+1.

The case k=p over Fp. The number P(j+p,p)=(j+p)(j+p−1)⋯(j+1) is a product of the p consecutive integers j+1,…,j+p. Divide j=qp+r with 0≤r<p (Number Systems: From N to R, Theorem 3.1.2); then j+(p−r)=(q+1)p, and 1≤p−r≤p, so one of the factors is divisible by p. A product with a factor divisible by p is divisible by p (Number Systems: From N to R, Proposition 3.1.1 (c), one factor at a time). So P(j+p,p)=Mp with M∈Z, and P(j+p,p)⋅fj+p=M⋅(p⋅fj+p)=M⋅((p⋅1)fj+p)=M⋅0=0, by Lemma 4.1.1 (d), which allows integer multiples, p⋅1=0 in Fp (Number Systems: From N to R, Theorem 3.4.3 (d)), Number Systems: From N to R, Proposition 2.3.2 (b) and M⋅0=0. So every coefficient of f(p) is 0. For instance, over F3, (x4)‴=(P(4,3)⋅1)x=(24⋅1)x=0.

C. Going deeper

Exercise (C1: Derivations)

Let R be a commutative ring, and let δ:R[x]→R[x] be a map such that, for all f,g∈R[x] and every constant a, δ(f+g)=δ(f)+δ(g),δ(a)=0,δ(fg)=δ(f)g+fδ(g). Prove that δ(f)=f′δ(x) for every f∈R[x]. Deduce that f↦f′ is the only such map with δ(x)=1.

Solution. Both sides are additive in f. δ is additive by hypothesis, and f↦f′δ(x) is additive by Theorem 4.5.1 (a) and (F9) of R[x] (Theorem 4.2.4 (a)).

Powers of x. We show δ(xn)=(n⋅1)xn−1δ(x) for every n≥1, by induction. For n=1, (1⋅1)x0δ(x)=δ(x). If it holds for n, then, since xn+1=xnx, δ(xn+1)=δ(xn)x+xnδ(x)=(n⋅1)xn−1δ(x)x+xnδ(x)=(n⋅1+1)xnδ(x)=((n+1)⋅1)xnδ(x), by (F5), (F6), (F7), (F9) of R[x], xn−1x=xn, and the recursion of multiples. Also δ(x0)=δ(1)=0, since 1 is a constant.

Monomials. Let a∈R and n∈N. By Theorem 4.2.4 (c), axn is the product of the constant a and xn, so δ(axn)=δ(a)xn+aδ(xn)=aδ(xn). If n=0, this is 0=(ax0)′δ(x), by (M). If n≥1, it is a(n⋅1)xn−1δ(x)=(n⋅a)xn−1δ(x)=(axn)′δ(x), by (F6), Lemma 4.1.1 (d) and (M).

Conclusion. The two additive maps δ and f↦f′δ(x) agree on every monomial, so they are equal by Lemma 4.2.3 (one argument, T=R[x]).

Uniqueness. The formal derivative satisfies the three conditions, by Theorem 4.5.1 (a) and (b), and x′=1 (Example (Formal derivatives in five rings) (ii)). If δ satisfies them with δ(x)=1, then δ(f)=f′⋅1=f′ for every f.

Marking scheme. (10 points) - 2: both sides additive in f, with the additivity of f↦f′δ(x) justified. - 2: δ(axn)=aδ(xn) from the product condition and δ(a)=0. - 3: δ(xn)=(n⋅1)xn−1δ(x) by induction, with the case n=0 handled separately. - 2: comparison with (axn)′, using a(n⋅1)=n⋅a. - 1: conclusion by extending from monomials, and the uniqueness statement.

A solution that shows instead that K:={f∈R[x]:δ(f)=f′δ(x)} is all of R[x] is marked on the same points: closure of K under + earns the first 2; the constants and x in K earn the next 2; closure of K under products, by Theorem 4.5.1 (b), earns the 3; K=R[x] earns the 2; the uniqueness statement earns the last 1.

Fatal errors (0 for the step): checking only on xn, with no account of the coefficient a (that is where δ(a)=0 is needed); writing x−1 in the case n=0.

Exercise (C2: Find the error)

Here is an argument.

Claim. If f∈Q[x] and f′=0, then f is constant.

Proof. (1) For k≥1, the coefficient of xk−1 in f′ is k⋅fk=(k⋅1)fk, by the definition of f′ and the rules for multiples. (2) Since f′=0, (k⋅1)fk=0 for every k≥1. (3) For k≥1 we have k≠0, so k⋅1≠0; since Q has no zero divisors, fk=0 for every k≥1. (4) So f=f0x0 is constant.

Is the claim true? Does the argument prove it? Name the line that fails and the reason, give a counterexample to the illegal step, and repair the argument.

Solution. The claim is true: it is Proposition 4.5.2 (a) for F=Q. The argument, as written, does not prove it.

Lines (1), (2) and (4) are correct: (1) is Definition 4.5.1 with Lemma 4.1.1 (d), (2) reads f′=0 coefficient by coefficient, and (4) compares coefficients (Definition 4.1.1). The second half of line (3) is correct too: Q is a field (Number Systems: From N to R, Theorem 2.4.3), so it has no zero divisors (Theorem 2.1.1 (f)).

Line (3) fails, in its first half. “k≠0 in Z, so k⋅1≠0 in the ring” is a general “fact” that is neither proved nor true, and the line uses nothing about Q to support it: entry (N9) of Logic and Proof, Example (What is not allowed). Counterexample to the step: in F2, k=2 gives 2⋅1=1+1=0. The same four lines, read over F2, would “prove” that x2 is constant, since (x2)′=0 (Example (Formal derivatives in five rings) (iii)). There is no counterexample to the conclusion, which is true.

Repair. What line (3) needs is that Q has characteristic 0 (Definition 2.5.1): for k≥1, k⋅1 is the rational number k (induction on k, since the embeddings N⊆Z⊆Q preserve sums and 1, Number Systems: From N to R, Proposition 2.2.3 and Number Systems: From N to R, Proposition 2.4.4), and k≠0. With that sentence in place of “so”, the argument is the proof of Proposition 4.5.2 (a), whose hypothesis is exactly the characteristic.

Marking scheme. (10 points) - 2: says the claim is true and that the argument, as written, does not prove it. - 3: names the first half of line (3) and the reason: k≠0 does not give k⋅1≠0 in a general ring, (N9), or an equivalent statement. - 2: a counterexample to the step, such as 2⋅1=0 in F2, or the “proof” that x2 is constant over F2. - 3: repairs the step by proving k⋅1≠0 in Q for every k≥1, that is, charQ=0. Two routes earn full marks: k⋅1=k via the embeddings, as in the solution; or k⋅1>0 by Number Systems: From N to R, Proposition 2.3.5 (h), since Q is an ordered field (Number Systems: From N to R, Theorem 2.5.1) with 1≠0. Fatal errors (0 for the step): a counterexample to the conclusion (there is none); blaming the no-zero-divisors half of line (3), which is correct.

R. Review

Exercise (R1)

Let R be a commutative ring and E:R[x]→R[x], E(f):=f+f′. Show that E is an injective homomorphism of the group (R[x],+) to itself. If 1≠0 in R, show that E(fg)=E(f)E(g) fails for some f,g.

Solution. The tools are the notion of a group homomorphism and its kernel, Definition 3.3.1, written additively (Definition 3.1.1), and Proposition 3.3.3.

The group. By Theorem 4.2.4 (a), R[x] satisfies (F1)–(F4), so (R[x],+) is an abelian group, with identity the zero polynomial and inverse −f.

A homomorphism. By Theorem 4.5.1 (a) and (F1), (F2) of R[x], E(f+g)=(f+g)+(f′+g′)=(f+f′)+(g+g′)=E(f)+E(g), which is the homomorphism condition in additive notation.

The kernel is {0}. Let f≠0, with n:=deg⁡f, so fn≠0 and fn+1=0 (Definition 4.3.1). By Definition 4.5.1, (f′)n=(n+1)⋅fn+1=(n+1)⋅0=0, as in the well-definedness paragraph after it. Addition is coefficientwise (Definition 4.2.1), so E(f)n=fn+0=fn≠0, and E(f)≠0. Also 0=0x0, so 0′=0 by (M), and E(0)=0+0=0 by (F3) of R[x]. So ker⁡E={0}, and E is injective by Proposition 3.3.3.

Not multiplicative. Take f=g=x. By Example (Formal derivatives in five rings) (ii), x′=1, so E(x)=x+1, and E(x)E(x)=(x+1)2=x2+2x+1 by Number Systems: From N to R, Proposition 2.3.2 (d). On the other side, (M) gives (x2)′=(2⋅1)x=2x, so E(x2)=x2+2x. The two differ in position 0, where they have 1 and 0; since 1≠0, E(x⋅x)≠E(x)E(x). So only the group structure of R[x] is respected, and E is not a ring homomorphism.

Exercise (R2)

For f∈R[x] and z∈C, let f(z) denote the value obtained by substituting z for x, where a real coefficient a is read as the complex number a. Show that f(z―)=f(z)―. Deduce that if z0∈C is a root of f that is not real, then z0― is a different root of f.

Solution. The tool is the uniqueness in Theorem 4.4.2 (b), applied to the field C of Chapter 1.

The setting. C is a field, and R⊆C is closed under its operations (Theorem 1.2.4); so C and R are commutative rings and R[x] is defined. Let ι:R→C be the map of Proposition 1.1.1; it preserves +, ⋅ and 1, so it is a ring homomorphism (Definition 4.4.2). For s∈C, let Φs:R[x]→C be the homomorphism of Theorem 4.4.2 with φ=ι and this s; then f(z) means Φz(f).

Conjugation is a ring homomorphism. By Theorem 1.2.2 (a) and (b), u+v―=u―+v― and uv―=u―v―, and 1―=1, since 1=1+0i and 1―=1−0i=1 (Definition 1.2.1).

Two homomorphisms. Let A(f):=Φz(f)― and B(f):=Φz―(f). Then A is a composite of ring homomorphisms, hence one (Definition 4.4.2), and B is one by Theorem 4.4.2 (a). On a constant a∈R, A(a)=ι(a)―=ι(a), since a=a+0i has conjugate a−0i=a; and B(a)=ι(a). On x, A(x)=z―=B(x). By the uniqueness in Theorem 4.4.2 (b), A=B: f(z)―=f(z―) for every f∈R[x].

Roots. If f(z0)=0, then f(z0―)=0―=0. If z0=a+bi is not real, then b≠0, so z0―=a−bi≠a+bi: equality would give −b=b by comparing imaginary parts (Definition 1.1.1), so 2b=0, and b=0 because 2=2⋅1≠0 in the ordered field R (Number Systems: From N to R, Proposition 2.3.5 (h)) and R has no zero divisors (Number Systems: From N to R, Proposition 2.3.5 (f)). So the non-real roots of a real polynomial come in pairs z0≠z0―.

The identity and the first deduction are the statement of Proposition 1.6.4, and the distinctness of z0― is the paragraph after it; Chapter 1 proved both by a direct computation with the sum ∑kakzk. Here the computation is replaced by the uniqueness of a substitution homomorphism. Polynomials with rational coefficients are a special case, since Q sits inside R.

Exercise (R3)

Show that Z[x] and F2[x] are countable, and that the set of all sequences N→F2 is uncountable. Which clause of the definition of a polynomial does the difference rest on?

Solution. The tools are the countability results of Sets, Relations, and Cardinality, Chapter 3, read on N=ω through Number Systems: From N to R, Corollary 1.7.3.

Z and F2 are countable. N×N is countable (Sets, Relations, and Cardinality, Theorem 3.2.6). The class map N×N→Z=(N×N)/∼ is surjective (Sets, Relations, and Cardinality, Definition 2.5.4), so Z is countable by Sets, Relations, and Cardinality, Proposition 3.2.4; this is the count of Number Systems: From N to R, Exercise (R2). The map N→F2, n↦[n], is surjective, since every class is [0] or [1] (Number Systems: From N to R, Theorem 3.4.3 (b)); so F2 is countable (Sets, Relations, and Cardinality, Definition 3.2.1).

Polynomials of bounded length. Let R be Z or F2, and for N∈N let AN:={f∈R[x]:fk=0 for every k>N}. By Exercise (B1: Polynomials of bounded length as tuples), AN is in bijection with RN+1. For N≥1, RN+1 is countable by Sets, Relations, and Cardinality, Corollary 3.2.7 (b); for N=0 it is R itself. So each AN is countable, as the image of a countable set under a bijection (Sets, Relations, and Cardinality, Proposition 3.2.4).

The union. Every polynomial lies in some AN (Definition 4.1.1), so R[x]=⋃N∈NAN, a countable union of countable sets, which is countable by Sets, Relations, and Cardinality, Theorem 3.3.3 (a). (That theorem uses the axiom of countable choice to pick a list of each AN.)

All sequences. The set {0,1}N is uncountable (Sets, Relations, and Cardinality, Theorem 3.4.1). The map {0,1}→F2, 0↦[0], 1↦[1], is a bijection; composing a sequence with its inverse turns every sequence N→F2 into a sequence of zeros and ones, and this is a surjection onto {0,1}N. If the sequences N→F2 were countable, so would be {0,1}N, by Sets, Relations, and Cardinality, Proposition 3.2.4. So they are uncountable.

The clause. The difference is the clause only finitely many of Definition 4.1.1: a polynomial is a sequence that is 0 from some point on, so it is determined by a finite tuple, and there are countably many finite tuples. A general sequence carries infinitely many independent choices. The same count, with the polynomials written as integer tuples, is the proof of Sets, Relations, and Cardinality, Theorem 3.3.4.

Exercise (R4)

Find all f∈Q[x] with f∘x2=f2.

Solution. Answer: f=0, and f=xn for n∈N.

They work. 0∘x2=0=02, and xn∘x2=(x2)n=x2n=(xn)2 by Definition 4.4.3 and the power laws (Lemma 4.1.1 (c)).

The tool is look at the top coefficient, then at the next non-zero one. Let f≠0 satisfy f∘x2=f2, with n:=deg⁡f and a:=lc(f). As in the proof of Proposition 4.5.2 (b), f∘x2=∑j=0nfjx2j, whose coefficient at 2j is fj and whose coefficients at odd positions are 0. So its coefficient at 2n is a, and none beyond 2n is non-zero. By Theorem 4.3.2 (b), since Q has no zero divisors, f2 has degree 2n and leading coefficient a2. Hence a2=a, so a(a−1)=0, and a=1 since a≠0 (Theorem 2.1.1 (f)).

Now let r:=f−xn, so f=xn+r and deg⁡r<n (Theorem 4.3.1, since the coefficients at n cancel). Suppose r≠0, and let k:=deg⁡r<n. By Number Systems: From N to R, Proposition 2.3.2 (d) in the commutative ring Q[x] (Theorem 4.2.4 (a)), f2=x2n+2xnr+r2. Its coefficient at n+k is 2rk: x2n contributes 0, since n+k<2n; 2xnr contributes 2rk, since multiplying by xn shifts by n (Lemma 4.2.2 (a)); and r2 contributes 0, since deg⁡r2≤2k<n+k (Theorem 4.3.2 (a)). On the other side, the coefficient of f∘x2 at n+k is 0: if n+k is odd, it is an odd position; if n+k=2j, then k<j<n, so fj=rj=0, because j<n and j>deg⁡r. Hence 2rk=0 in Q, and rk=0 since 2≠0: a contradiction with rk=lc(r)≠0. So r=0 and f=xn.

Why the look-alikes fail. Evaluating at points gives f(c2)=f(c)2 for every c∈Q, a statement about polynomial functions; turning it back into a statement about coefficients needs the fact that a polynomial over an infinite field is determined by its values, which this chapter does not prove (Proposition 4.4.4 (d) shows that over a finite ring with 1≠0 it is false). Differentiating with the chain rule of Exercise B1 gives 2x(f′∘x2)=2ff′, an equation of the same kind and no easier.

Over F2 every f works. There (u+v)2=u2+v2, since 2uv=0, and c2=c for c∈F2; so f2=∑kfk2x2k=∑kfkx2k=f∘x2. The step that fails is “2rk=0 implies rk=0”: in F2, 2=0.