Math Core

Lesson 2.5 · Differentiation: Definition and Basic Rules

Sum, difference and constant multiple rules

The power rule handles one term at a time. Real functions are built from many terms: 4x3−5x2+7x−94x^3 - 5x^2 + 7x - 9, or a position formula with several pieces. Two simple rules let you differentiate any polynomial term by term, and with a little rewriting, much more.

The rules

Constant multiple, sum and difference rules

If ff and gg are differentiable and cc is a constant, then

ddx[c f(x)]=c f′(x)\frac{d}{dx}\big[c\,f(x)\big] = c\,f'(x)ddx[f(x)+g(x)]=f′(x)+g′(x),ddx[f(x)−g(x)]=f′(x)−g′(x)\frac{d}{dx}\big[f(x) + g(x)\big] = f'(x) + g'(x), \qquad \frac{d}{dx}\big[f(x) - g(x)\big] = f'(x) - g'(x)

In words: constants factor out, and you can differentiate a sum or difference one term at a time.

Both rules come straight from the definition and the limit laws. For the sum rule:

ddx[f+g]=lim⁡h→0[f(x+h)+g(x+h)]−[f(x)+g(x)]h=lim⁡h→0f(x+h)−f(x)h+lim⁡h→0g(x+h)−g(x)h=f′(x)+g′(x)\begin{aligned} \frac{d}{dx}\big[f + g\big] &= \lim_{h \to 0} \frac{\big[f(x + h) + g(x + h)\big] - \big[f(x) + g(x)\big]}{h} \\ &= \lim_{h \to 0} \frac{f(x + h) - f(x)}{h} + \lim_{h \to 0} \frac{g(x + h) - g(x)}{h} = f'(x) + g'(x) \end{aligned}

Graphically, the constant multiple rule says that stretching a graph vertically by a factor of cc multiplies every slope by cc. The sum rule says that when you add two functions, their rates of change add.

Differentiating polynomials

Combine these rules with the power rule and the constant rule, and every polynomial takes one line.

Worked example: A polynomial, term by term

Find f′(x)f'(x) for f(x)=4x3−5x2+7x−9f(x) = 4x^3 - 5x^2 + 7x - 9.

f′(x)=4⋅3x2−5⋅2x+7⋅1−0=12x2−10x+7\begin{aligned} f'(x) &= 4 \cdot 3x^2 - 5 \cdot 2x + 7 \cdot 1 - 0 \\ &= 12x^2 - 10x + 7 \end{aligned}

The constant term −9-9 disappears, and the linear term 7x7x becomes its slope, 77.

Rewrite first

You don't have a product or quotient rule yet (those come in two lessons), but you often don't need one. If you can expand a product or split a quotient with a single-term denominator, do that, then differentiate term by term.

Worked example: Expand, then differentiate

Find g′(x)g'(x) for g(x)=(2x−1)2g(x) = (2x - 1)^2.

Expand: g(x)=4x2−4x+1g(x) = 4x^2 - 4x + 1. Then

g′(x)=8x−4g'(x) = 8x - 4

Worked example: Split the fraction

Find h′(x)h'(x) for h(x)=x2+3xxh(x) = \dfrac{x^2 + 3x}{\sqrt{x}}, x>0x > 0.

Divide each term of the numerator by x1/2x^{1/2}:

h(x)=x2x1/2+3xx1/2=x3/2+3x1/2h(x) = \frac{x^2}{x^{1/2}} + \frac{3x}{x^{1/2}} = x^{3/2} + 3x^{1/2}

Now use the power rule on each term:

h′(x)=32x1/2+32x−1/2=32x+32xh'(x) = \frac{3}{2} x^{1/2} + \frac{3}{2} x^{-1/2} = \frac{3}{2}\sqrt{x} + \frac{3}{2\sqrt{x}}

Horizontal tangents and velocity

A horizontal tangent line has slope 00, so you find one by solving f′(x)=0f'(x) = 0. These points will matter a lot in Unit 5, where they help locate maximums and minimums.

Worked example: Finding horizontal tangents

Find all xx where f(x)=x3−3x2−9x+2f(x) = x^3 - 3x^2 - 9x + 2 has a horizontal tangent line.

f′(x)=3x2−6x−9=3(x2−2x−3)=3(x−3)(x+1)f'(x) = 3x^2 - 6x - 9 = 3(x^2 - 2x - 3) = 3(x - 3)(x + 1)

Setting f′(x)=0f'(x) = 0 gives x=3x = 3 and x=−1x = -1.

The horizontal tangent lines at x = −1 (y = 7) and x = 3 (y = −25).Open in grapher →

If s(t)s(t) gives the position of an object moving along a line, then its derivative s′(t)s'(t) is the velocity: the instantaneous rate of change of position. Unit 4 develops this fully; for now, differentiating a position function is just another use of these rules.

Common mistake

There is no rule that lets you differentiate a product factor by factor. ddx[(x+3)(x−5)]\dfrac{d}{dx}\big[(x + 3)(x - 5)\big] is not 1⋅1=11 \cdot 1 = 1. Expand first to get x2−2x−15x^2 - 2x - 15, whose derivative is 2x−22x - 2. The same goes for quotients: never differentiate the top and bottom separately.

Tip

Check a derivative by evaluating it at a convenient point and comparing with a quick secant slope. For f(x)=x3−3x2−9x+2f(x) = x^3 - 3x^2 - 9x + 2, f′(0)=−9f'(0) = -9; the slope from x=−0.01x = -0.01 to x=0.01x = 0.01 is f(0.01)−f(−0.01)0.02≈−9.0\dfrac{f(0.01) - f(-0.01)}{0.02} \approx -9.0. They agree.

Practice

Practice 1

Find f′(x)f'(x) for f(x)=6x4−2x3+x−8f(x) = 6x^4 - 2x^3 + x - 8.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 2

Find f′(x)f'(x) for f(x)=(x+3)(x−5)f(x) = (x + 3)(x - 5).

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 3

Find f′(x)f'(x) for f(x)=x3−4x+2xf(x) = \dfrac{x^3 - 4x + 2}{x}.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 4

Let f(x)=5x−3xf(x) = 5\sqrt{x} - \dfrac{3}{x}. Find f′(1)f'(1).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find all values of xx at which f(x)=2x3+3x2−12xf(x) = 2x^3 + 3x^2 - 12x has a horizontal tangent line.

Separate answers with commas, e.g. 2, -5

Practice 6

A particle moves along a line with position s(t)=t3−6t2+9ts(t) = t^3 - 6t^2 + 9t meters at time tt seconds. Find its velocity at t=4t = 4, in meters per second.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Let h(x)=4f(x)−3g(x)h(x) = 4f(x) - 3g(x), where ff and gg are differentiable with f′(3)=2f'(3) = 2 and g′(3)=−5g'(3) = -5. What is h′(3)h'(3)?

Practice 8

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

Enter an expression, e.g. 3x^2 - 2x + 1