Unit 3, lesson 22

Elementary Derivative Rules

The constant, power, constant multiple, sum and difference rules, where the power rule is valid on the real line, and how they give the derivative of any polynomial and of the absolute value away from zero.

  • Theory part 43
  • Practice part 44
  • Differentiation Rules

Theory, part 43

Practice, part 44

Going back to the limit definition for every derivative works, but it is slow and easy to get wrong. A handful of rules, each proved once from the definition, let you differentiate every polynomial in a single line. The only care needed is to know exactly where each rule applies.

Key terms

Constant rule

Definition If f(x)=cf(x) = c for every real xx, where cc is a constant, then f′(x)=0f'(x) = 0 for every xx. In Leibniz notation,

ddx(c)=0.\frac{d}{dx}(c) = 0.

Proof. The difference quotient is c−ch=0\frac{c - c}{h} = 0 for every h≠0h \neq 0, so its limit is 00.

In plain words A horizontal line has slope zero, and a quantity that never changes has rate of change zero.

Example Both of these derivatives are zero,

ddx(7)=0,ddx(π2)=0.\frac{d}{dx}(7) = 0, \qquad \frac{d}{dx}\left(\pi^2\right) = 0.

The number π2\pi^2 looks complicated but it does not depend on xx.

Power rule and its real-domain restrictions

Definition The formula

ddx(xr)=rxr−1\frac{d}{dx}\left(x^r\right) = r x^{r - 1}

holds in the following cases.

  1. If r=nr = n is a positive integer, it holds for every real xx, reading x0x^0 as 11 when n=1n = 1.
  2. If r=nr = n is a negative integer, it holds for every x≠0x \neq 0.
  3. If r=pqr = \frac{p}{q} is a rational number in lowest terms with q>0q > 0 odd, then xr=(xq)px^r = \left(\sqrt[q]{x}\right)^p is defined for negative xx too, and the formula holds for every x≠0x \neq 0. If moreover r>1r > 1, it also holds at x=0x = 0, where both sides equal 00.
  4. For every real rr, with xrx^r defined through exponentials and logarithms when rr is irrational, it holds for every x>0x > 0.

For a positive integer nn the proof uses the binomial theorem, which gives

(x+h)n−xn=nxn−1h+(terms with h2 or higher).(x + h)^n - x^n = n x^{n - 1} h + (\text{terms with } h^2 \text{ or higher}).

Dividing by hh and letting h→0h \to 0 leaves nxn−1n x^{n - 1}. The other cases are proved later in the course, and we use them now.

In plain words Bring the exponent down in front and lower it by one. Then check that the input is allowed. The derivative can have a smaller domain than the function, especially at x=0x = 0 and for negative xx.

Example The rule gives ddx(x5)=5x4\frac{d}{dx}\left(x^5\right) = 5x^4 everywhere, and ddx(x−2)=−2x−3\frac{d}{dx}\left(x^{-2}\right) = -2x^{-3} for x≠0x \neq 0. For x2/3x^{2/3}, defined for all real xx, the derivative is 23x−1/3\frac{2}{3}x^{-1/3} for x≠0x \neq 0, and at x=−8x = -8 this gives 23⋅(−12)=−13\frac{2}{3} \cdot \left(-\frac{1}{2}\right) = -\frac{1}{3}. At x=0x = 0 the formula breaks down, which matches the cusp of x2/3x^{2/3} at the origin. Finally x1/2=xx^{1/2} = \sqrt{x} is defined on [0,∞)[0, \infty), but its derivative 12x−1/2\frac{1}{2}x^{-1/2} exists only for x>0x > 0.

Constant multiple rule

Definition If ff is differentiable at xx and cc is a constant, then cfc f is differentiable at xx and

ddx(cf(x))=cf′(x).\frac{d}{dx}\left(c f(x)\right) = c f'(x).

Proof. As h→0h \to 0,

cf(x+h)−cf(x)h=c⋅f(x+h)−f(x)h→cf′(x).\frac{c f(x + h) - c f(x)}{h} = c \cdot \frac{f(x + h) - f(x)}{h} \to c f'(x).

In plain words Stretching a graph vertically by a factor cc multiplies every slope by cc.

Example For a cubic term the rule gives ddx(4x3)=4⋅3x2=12x2\frac{d}{dx}\left(4x^3\right) = 4 \cdot 3x^2 = 12x^2. For x>0x > 0, writing 5x=5x−1/2\frac{5}{\sqrt{x}} = 5x^{-1/2} gives

ddx(5x)=5⋅(−12)x−3/2=−52x−3/2.\frac{d}{dx}\left(\frac{5}{\sqrt{x}}\right) = 5 \cdot \left(-\frac{1}{2}\right) x^{-3/2} = -\frac{5}{2}x^{-3/2}.

Sum and difference rules

Definition If ff and gg are both differentiable at xx, then so are f+gf + g and f−gf - g, and

ddx(f(x)±g(x))=f′(x)±g′(x).\frac{d}{dx}\left(f(x) \pm g(x)\right) = f'(x) \pm g'(x).

Proof. The difference quotient of f+gf + g is the sum of the difference quotients of ff and gg, and the limit of a sum is the sum of the limits. The difference works the same way. By induction the rule extends to any finite sum.

In plain words Differentiate term by term. The rate of change of a total is the total of the rates.

Example Term by term,

ddx(x4+x)=4x3+12xfor x>0,\frac{d}{dx}\left(x^4 + \sqrt{x}\right) = 4x^3 + \frac{1}{2\sqrt{x}} \quad \text{for } x > 0,

and

ddx(x3−x−1)=3x2+x−2for x≠0.\frac{d}{dx}\left(x^3 - x^{-1}\right) = 3x^2 + x^{-2} \quad \text{for } x \neq 0.

Derivatives of polynomials

Definition Every polynomial

p(x)=anxn+an−1xn−1+⋯+a1x+a0p(x) = a_n x^n + a_{n - 1} x^{n - 1} + \dots + a_1 x + a_0

is differentiable at every real xx, and

p′(x)=nanxn−1+(n−1)an−1xn−2+⋯+a1.p'(x) = n a_n x^{n - 1} + (n - 1) a_{n - 1} x^{n - 2} + \dots + a_1.

This follows from the power, constant multiple, sum and constant rules. If an≠0a_n \neq 0 and n≥1n \ge 1, so that pp has degree nn, then p′p' has degree n−1n - 1.

In plain words Handle each term on its own. The constant term disappears.

Example Let p(x)=4x3−5x2+7x−2p(x) = 4x^3 - 5x^2 + 7x - 2. Then p′(x)=12x2−10x+7p'(x) = 12x^2 - 10x + 7. At x=1x = 1 we get p(1)=4p(1) = 4 and p′(1)=9p'(1) = 9, so the tangent line there is y=4+9(x−1)y = 4 + 9(x - 1), or y=9x−5y = 9x - 5.

Derivative of the absolute value away from zero

Definition The absolute value is differentiable at every x≠0x \neq 0, with

ddx∣x∣=x∣x∣={1,x>0,−1,x<0,\frac{d}{dx} \lvert x \rvert = \frac{x}{\lvert x \rvert} = \begin{cases} 1, & x > 0, \\ -1, & x < 0, \end{cases}

and it is not differentiable at x=0x = 0. More generally, if ff is differentiable at aa and f(a)≠0f(a) \neq 0, then ∣f∣\lvert f \rvert is differentiable at aa with

∣f∣′(a)=f(a)∣f(a)∣f′(a).\lvert f \rvert'(a) = \frac{f(a)}{\lvert f(a) \rvert} f'(a).

The reason is that ff is continuous at aa, so it keeps the sign of f(a)f(a) on some open interval around aa, and there ∣f∣\lvert f \rvert equals ff or −f-f. Where f(a)=0f(a) = 0 the rule says nothing. Then ∣f∣\lvert f \rvert may fail to be differentiable, as ∣x∣\lvert x \rvert does at 00, or it may be differentiable, as ∣x3∣\lvert x^3 \rvert is at 00 with derivative 00.

In plain words Away from the points where the inside is zero, the absolute value just leaves the function alone or flips its sign, and the derivative follows along.

Example Take g(x)=∣x2−4∣g(x) = \lvert x^2 - 4 \rvert at x=1x = 1. There x2−4=−3<0x^2 - 4 = -3 < 0, so near x=1x = 1 we have g(x)=4−x2g(x) = 4 - x^2 and g′(1)=−2⋅1=−2g'(1) = -2 \cdot 1 = -2. At x=2x = 2, where x2−4=0x^2 - 4 = 0, the rule does not apply, and in fact gg has a corner there.

Check yourself

  1. Differentiate f(x)=3x4−2x+6f(x) = 3x^4 - \frac{2}{x} + 6 and state where your answer is valid.
Show the answer

Rewrite the function as f(x)=3x4−2x−1+6f(x) = 3x^4 - 2x^{-1} + 6. Then f′(x)=12x3+2x−2f'(x) = 12x^3 + 2x^{-2}, valid for every x≠0x \neq 0.

  1. Find the equation of the tangent line to y=x3−3x+1y = x^3 - 3x + 1 at x=2x = 2.
Show the answer

The derivative is y′=3x2−3y' = 3x^2 - 3, so the slope at x=2x = 2 is 99. The point is (2,3)(2, 3), and the tangent line is y=3+9(x−2)y = 3 + 9(x - 2), or y=9x−15y = 9x - 15.

  1. Where is f(x)=x3f(x) = \sqrt[3]{x} differentiable, and what is f′(−1)f'(-1)?
Show the answer

The power rule gives f′(x)=13x−2/3f'(x) = \frac{1}{3}x^{-2/3} for every x≠0x \neq 0. At 00 the graph has a vertical tangent and no derivative. Since (−1)−2/3=1(-1)^{-2/3} = 1, the value is f′(−1)=13f'(-1) = \frac{1}{3}.

How this lesson connects

It also uses exponent laws.