Skip to main content

About this free course

Share this free course

Introduction to differentiation
Introduction to differentiation

Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.

2.3 Sum rule

Now suppose that you know the formulas for the derivatives of two functions, and you want to know the formula for the derivative of their sum. For example, you already know the formulas for the derivatives of the functions f of x equals x squared and g of x equals x cubed , but suppose that you want to know the formula for the derivative of the function k of x equals x squared plus x cubed .

When you add two functions, the y -coordinates of the points on the two graphs are added. For example, Figure 27 shows the graphs of f of x equals x squared , g of x equals x cubed and k of x equals x squared plus x cubed , and the point with x -coordinate 1 on each of the three graphs.

Described image
Figure 27 The graphs of two functions, and the graph of the sum of these functions

The effect that adding the functions has on the gradients is quite complicated to think about, but in fact it’s just what you might expect: if you add two functions, then the gradient of the sum function at any particular x -value is the sum of the gradients of the two original functions at that x -value.

For example, Figure 28 shows the tangents at the three points marked in Figure 27. You can see that they have gradients 2, 3 and 5 (the sum of 2 and 3), respectively.

Described image
Figure 28 Tangents to the graphs in Figure 27

The general rule can be stated as follows.

Sum rule (Lagrange notation)

If k of x equals f of x plus g of x , where f and g are functions, then

k super prime of x equals f super prime of x plus g super prime of x comma

for all values of x at which both f and g are differentiable.

For example, since the derivative of f of x equals x squared is f super prime of x equals two times x , and the derivative of g of x equals x cubed is g super prime of x equals three times x squared , it follows from the sum rule that the derivative of k of x equals x squared plus x cubed is

k super prime of x equals two times x plus three times x squared full stop

The sum rule extends to sums of larger numbers of functions. For example, if k of x equals sum with 3 summands f of x plus g of x plus h of x , then

k super prime of x equals sum with 3 summands f super prime of x plus g super prime of x plus h super prime of x comma

for all values of x at which all of f , g and h are differentiable.

It also follows from the sum rule, together with the constant multiple rule, that if k of x equals f of x minus g of x , then

k super prime of x equals f super prime of x minus g super prime of x comma

for all values of x at which both f and g are differentiable. You can see this by writing the equation k of x equals f of x minus g of x as

k of x equals f of x plus left parenthesis negative g of x right parenthesis full stop

Then, since the derivative of negative g of x is negative g super prime of x by the constant multiple rule, it follows by the sum rule that

multiline equation row 1 k super prime of x equals f super prime of x plus left parenthesis negative g super prime of x right parenthesis row 2 Blank equals f super prime of x minus g super prime of x comma

as claimed. Again, this fact extends to sums and differences of larger numbers of functions. For example, if k of x equals f of x plus g of x minus h of x , then k super prime of x equals f super prime of x plus g super prime of x minus h super prime of x for all values of x at which all of f , g and h are differentiable.

Here is the sum rule expressed in Leibniz notation.

Sum rule (Leibniz notation)

If y equals u plus v , where u and v are functions of x , then

d y divided by d x equals d u divided by d x plus d v divided by d x comma

for all values of x at which both u and v are differentiable.

Like the constant multiple rule, the sum rule can be formally proved by using the idea of differentiation from first principles, and you’ll see this done at the end of this section. First, however, you need to practise using it.

The next example shows you how to do this. In particular, it illustrates that you can sometimes differentiate a function that isn’t expressed as a sum of functions by first rearranging its formula so that it is. It also illustrates how you can use the sum rule together with the constant multiple rule.

Example 4 Using the sum rule

Differentiate the following functions.

  • a. f of x equals x plus two times x super one solidus three

  • b. f of x equals left parenthesis x plus two right parenthesis times left parenthesis x minus five right parenthesis

  • c. y equals two times x minus one divided by x

  • d. y equals five times left parenthesis x squared minus two times x plus one right parenthesis

Solution

  • a.By the sum rule, you can differentiate each term individually (and add the results).

    f of x equals x plus two times x super one solidus three , so

    multiline equation row 1 f super prime of x equals one plus two multiplication one divided by three times x super negative two solidus three row 2 Blank equals one plus two divided by three times x super two solidus three full stop
  • b.First write the function as a sum of functions, by multiplying out.

    equation sequence part 1 f of x equals part 2 left parenthesis x plus two right parenthesis times left parenthesis x minus five right parenthesis equals part 3 x squared minus three times x minus 10 , so

    Differentiate each term individually.

    multiline equation row 1 f super prime of x equals two times x minus three minus zero row 2 Blank equals two times x minus three full stop
  • c.First write the function as a sum of functions, by expanding the fraction.

    equation sequence part 1 y equals part 2 two times x minus one divided by x equals part 3 two times x divided by x minus one divided by x equals part 4 two minus one divided by x equals part 5 two minus x super negative one , so

    Differentiate each term individually. Simplify your answer.

    multiline equation row 1 d y divided by d x equals zero minus left parenthesis negative one right parenthesis times x super negative two row 2 Blank equation sequence part 1 equals part 2 x super negative two equals part 3 one divided by x squared full stop
  • d.By the constant multiple rule, the derivative of five times left parenthesis x squared minus two times x plus one right parenthesis is 5 times the derivative of x squared minus two times x plus one . To differentiate x squared minus two times x plus one , differentiate each term individually.

    y equals five times left parenthesis x squared minus two times x plus one right parenthesis , so

    equation sequence part 1 d y divided by d x equals part 2 five times left parenthesis two times x minus two plus zero right parenthesis equals part 3 10 times left parenthesis x minus one right parenthesis full stop

    Alternatively, multiply out the brackets and then differentiate each term individually.

    equation sequence part 1 y equals part 2 five times left parenthesis x squared minus two times x plus one right parenthesis equals part 3 five times x squared minus 10 times x plus five , so

    equation sequence part 1 d y divided by d x equals part 2 five multiplication two times x minus 10 multiplication one plus zero equals part 3 10 times x minus 10 full stop

Activity 10 Using the sum rule

Differentiate the following functions.

  • a. f of x equals six times x squared minus two times x plus one

  • b. f of x equals sum with 3 summands two divided by three times x cubed plus two times x squared plus x minus one divided by two

  • c. f of x equals five times x plus one

  • d. g of t equals one divided by two times t plus Square root of t

  • e. f of x equals left parenthesis one plus x squared right parenthesis times left parenthesis one plus three times x right parenthesis

  • f. k of u equals left parenthesis u plus three right parenthesis squared

  • g. f of x equals 30 times left parenthesis x super three solidus two minus x right parenthesis

  • h. f of x equals x times left parenthesis x super three solidus two minus x right parenthesis

  • i. v equals left parenthesis t minus two right parenthesis times left parenthesis t plus five right parenthesis divided by t

  • j. y equals x plus Square root of x divided by x squared

  • k. y equals left parenthesis x super one solidus three plus one right parenthesis times left parenthesis x super one solidus three plus five times x right parenthesis

Answer

  • a. f of x equals six times x squared minus two times x plus one , so

    f super prime of x equals 12 times x minus two full stop
  • b. f of x equals sum with 3 summands two divided by three times x cubed plus two times x squared plus x minus one divided by two , so

    multiline equation row 1 f super prime of x equals two divided by three multiplication three times x squared plus two multiplication two times x plus one row 2 Blank equals sum with 3 summands two times x squared plus four times x plus one full stop
  • c. f of x equals five times x plus one , so

    f super prime of x equals five full stop

    (Notice that in general the derivative of f of x equals m times x plus c is f super prime of x equals m , as you’d expect.)

  • d. equation sequence part 1 g of t equals part 2 one divided by two times t plus Square root of t equals part 3 one divided by two times t plus t super one solidus two , so

    multiline equation row 1 f super prime of t equals one divided by two plus one divided by two times t super negative one solidus two row 2 Blank equals one divided by two plus one divided by two multiplication one divided by t super one solidus two row 3 Blank equals one divided by two plus one divided by two multiplication one divided by Square root of t row 4 Blank equals one divided by two times left parenthesis one plus one divided by Square root of t right parenthesis full stop
  • e.
     
    multiline equation row 1 f of x equals left parenthesis one plus x squared right parenthesis times left parenthesis one plus three times x right parenthesis row 2 Blank equals sum with 4 summands one plus three times x plus x squared plus three times x cubed comma

    so

    f super prime of x equals sum with 3 summands three plus two times x plus nine times x squared full stop
  • f.
     
    multiline equation row 1 k of u equals left parenthesis u plus three right parenthesis squared row 2 Blank equals sum with 3 summands u squared plus six times u plus nine comma

    so

    k super prime of u equals two times u plus six full stop
  • g. f of x equals 30 times left parenthesis x super three solidus two minus x right parenthesis , so

    multiline equation row 1 f super prime of x equals 30 times left parenthesis three divided by two times x super one solidus two minus one right parenthesis row 2 Blank equals 30 times left parenthesis three divided by two times Square root of x minus one right parenthesis row 3 Blank equals 45 times Square root of x minus 30 row 4 Blank equals 15 times left parenthesis three times Square root of x minus two right parenthesis full stop
  • h. equation sequence part 1 f of x equals part 2 x times left parenthesis x super three solidus two minus x right parenthesis equals part 3 x super five solidus two minus x squared , so

    f super prime of x equals five divided by two times x super three solidus two minus two times x full stop

    (Note that this function can’t be differentiated in a similar way to the function in part ((g)), because the multiplier of the brackets, x , isn’t a constant, and hence the constant multiple rule doesn’t apply.)

  • i.
     
    multiline equation row 1 v equals left parenthesis t minus two right parenthesis times left parenthesis t plus five right parenthesis divided by t row 2 Blank equals t squared plus three times t minus 10 divided by t row 3 Blank equals t plus three minus 10 times t super negative one comma

    so

    multiline equation row 1 d v divided by d t equals one minus 10 multiplication left parenthesis negative one right parenthesis times t super negative two row 2 Blank equals one plus 10 times t super negative two row 3 Blank equals one plus 10 divided by t squared full stop

    (The final answer can also be expressed as

    t squared plus 10 divided by t squared full stop right parenthesis
  • j.
     
    multiline equation row 1 y equals x plus Square root of x divided by x squared row 2 Blank equals x plus x super one solidus two divided by x squared row 3 Blank equals x super negative one plus x super negative three solidus two comma

    so

    multiline equation row 1 d y divided by d x equals negative x super negative two minus three divided by two times x super negative five solidus two row 2 Blank equals negative one divided by x squared minus three divided by two times x super five solidus two full stop

    (The final answer can be expressed in various ways. For example, you could combine the fractions and simplify the result like this:

    multiline equation row 1 negative one divided by x squared minus three divided by two times x super five solidus two equals negative two times x divided by two times x cubed minus three times x super one solidus two divided by two times x cubed row 2 Blank equals negative two times x plus three times Square root of x divided by two times x cubed full stop right parenthesis
  • k.
     
    multiline equation row 1 y equals left parenthesis x super one solidus three plus one right parenthesis times left parenthesis x super one solidus three plus five times x right parenthesis row 2 Blank equals sum with 4 summands x super two solidus three plus five times x super four solidus three plus x super one solidus three plus five times x comma

    so

    multiline equation row 1 d y divided by d x equals sum with 4 summands two divided by three times x super negative one solidus three plus 20 divided by three times x super one solidus three plus one divided by three times x super negative two solidus three plus five row 2 Blank equals sum with 4 summands two divided by three times x super one solidus three plus 20 times x super one solidus three divided by three plus one divided by three times x super two solidus three plus five full stop

In this section you’ve seen how to differentiate any power function, and you’ve met the constant multiple rule and the sum rule. So, in particular, you can now differentiate any polynomial function, that is, any function of the form

multiline equation row 1 f of x equals a sum of terms comma each of the form a times x super n comma row 2 Blank where a is a number and n is a non minus negative integer full stop

Of course, you can also differentiate many other functions too, such as some functions involving negative or fractional powers of x .

You’ve seen that every function of the form f of x equals x super n , where n is a positive integer, is differentiable at every value of x , and that so is every constant function. These facts, together with the constant multiple rule and the sum rule, give the following useful fact.

Every polynomial function (with domain  double-struck cap r ) is differentiable at every value of x .

To finish this section, here’s a proof of the sum rule, using differentiation from first principles. It uses the Lagrange notation form of the sum rule, which is repeated below.

Sum rule (Lagrange notation)

If k of x equals f of x plus g of x , where f and g are functions, then

k super prime of x equals f super prime of x plus g super prime of x comma

for all values of x at which both f and g are differentiable.

A proof of the sum rule

Suppose that f and g are functions, and that the function k is given by k of x equals f of x plus g of x . Let x denote any value at which both f and g are differentiable. To find k super prime of x , you have to consider what happens to the difference quotient for k at x , which is

k times left parenthesis x plus h right parenthesis minus k of x divided by h

(where h can be either positive or negative, but not zero), as h gets closer and closer to zero. Since k of x equals f of x plus g of x , this expression is equal to

left parenthesis f times left parenthesis x plus h right parenthesis plus g times left parenthesis x plus h right parenthesis right parenthesis minus left parenthesis f of x plus g of x right parenthesis divided by h comma

that is,

f times left parenthesis x plus h right parenthesis plus g times left parenthesis x plus h right parenthesis minus f of x minus g of x divided by h comma

which is equal to

left parenthesis f times left parenthesis x plus h right parenthesis minus f of x divided by h right parenthesis plus left parenthesis g times left parenthesis x plus h right parenthesis minus g of x divided by h right parenthesis full stop

The expression in the first pair of large brackets is the difference quotient for  f at  x , and the expression in the second pair of large brackets is the difference quotient for  g at  x . So as h gets closer and closer to zero, the values of these two expressions get closer and closer to f super prime of x and g super prime of x , respectively. Hence the whole expression gets closer and closer to f super prime of x plus g super prime of x . So

k super prime of x equals f super prime of x plus g super prime of x comma

which is the sum rule.