M5.5.4 Chapter 4

More functions to integrate

What is the integral of eˣ, of 1/x, and of sin x and cos x?

Your guess

Pick one before you read on. It is fine to be wrong.

Your guess
  • You picked A. Read on. At the end, the chapter comes back to your guess.

  • You picked B. Read on. At the end, the chapter comes back to your guess.

  • You picked C. Read on. At the end, the chapter comes back to your guess.

By the end you can

  • Integrate eˣ, 1/x, sin x and cos x
  • Integrate e³ˣ and cos 2x

Chapter 1 showed how to integrate powers of x, and it left one gap, 1/x. In the book on differentiation you found the gradients of eˣ, the natural logarithm ln x, sin x and cos x. Every one of those facts, read backwards, is a fact about integration. Here are the four pairs.

A table with the heads function and gradient. The rows read eˣ and eˣ, ln x and 1/x, sin x and cos x, cos x and −sin x.functiongradienteˣeˣln x1/xsin xcos xcos x−sin x
The gradients you already know. Each row, read from right to left, is an integral.

Reading the table from right to left gives the integrals. First, eˣ has gradient eˣ, so ∫ eˣ dx = eˣ + c. Second, ln x has gradient 1/x, so ∫ 1/x dx = ln|x| + c, for x not equal to 0. Third, sin x has gradient cos x, so ∫ cos x dx = sin x + c. Last, cos x has gradient −sin x, so −cos x has gradient sin x. That gives ∫ sin x dx = −cos x + c, with a minus sign.

Two small points. The bars in ln|x| are the absolute value. They make the answer work for negative x as well, where ln x does not exist. And in sin x and cos x the angle x is in radians. The gradient of sin x is cos x only in radians. For a tiny angle, sin x is almost x, so the gradient at 0 is 1, which is cos 0. In degrees the gradient at 0 would be π/180, which would put a factor of π/180 in every gradient and a factor of 180/π in every integral.

A table with the heads integrate and to get. The rows read eˣ and eˣ + c, 1/x and ln|x| + c, cos x and sin x + c, sin x and −cos x + c, e³ˣ and e³ˣ/3 + c, cos 2x and sin 2x/2 + c, sin 2x and −cos 2x/2 + c.integrateto geteˣeˣ + c1/xln|x| + ccos xsin x + csin x−cos x + ce³ˣe³ˣ/3 + ccos 2xsin 2x/2 + csin 2x−cos 2x/2 + c
The four basic integrals, and three with a number before x. The last three come from the next rule.

Worked example

Find ∫(3eˣ + 2/x) dx.

  1. Integrate each term. A number in front stays in front.
  2. 3eˣ becomes 3eˣ, because eˣ integrates to eˣ.
  3. 2/x is 2 × 1/x, and it becomes 2 ln|x|.
  4. Add the constant. The answer is 3eˣ + 2 ln|x| + c.

Answer: 3eˣ + 2 ln|x| + c

Now e³ˣ, and others with a number in front of x. Differentiate e³ˣ with the chain rule: you get 3e³ˣ. That has an extra factor 3. So to get e³ˣ alone, divide by 3. The integral of e³ˣ is e³ˣ/3 + c. We can check by differentiating: 3e³ˣ ÷ 3 = e³ˣ.

The same idea works for every function with a linear inside. If ∫ f(x) dx = F(x) + c, then ∫ f(ax + b) dx = (1/a) F(ax + b) + c. The factor 1/a is there because the chain rule multiplies by a when F(ax + b) is differentiated. It works only when the inside is a straight line ax + b. Chapter 5 deals with other insides.

Worked example

Find ∫ e³ˣ dx.

  1. The inside is 3x, so a = 3.
  2. Integrate eˣ to get eˣ, then replace x by 3x: e³ˣ.
  3. Divide by a = 3. The integral is e³ˣ/3 + c.
  4. Check: differentiating e³ˣ/3 gives 3e³ˣ/3 = e³ˣ.

Answer: e³ˣ/3 + c

Worked example

Find ∫ cos 2x dx.

  1. The inside is 2x, so a = 2.
  2. Integrate cos x to get sin x, then replace x by 2x: sin 2x.
  3. Divide by a = 2. The integral is sin 2x/2 + c.
  4. Check: differentiating sin 2x gives 2 cos 2x. Dividing by 2 gives cos 2x.

Answer: sin 2x/2 + c

These integrals give exact areas. The area under y = 1/x from x = 1 to x = 4 is ln 4 − ln 1, which is ln 4. Here the calculator gives ln 4 = 1.386. And the area under y = e²ˣ comes with a factor 1/2. For trig functions the limits are in radians, so π/2 means 90°.

Worked example

Find the area under y = e²ˣ from x = 0 to x = 1, to 3 significant figures.

  1. The area is the integral of e²ˣ from 0 to 1.
  2. An integral of e²ˣ is e²ˣ/2.
  3. At x = 1: e²/2. At x = 0: e⁰/2 = 1/2.
  4. The area is (e² − 1)/2. With e² = 7.389, this is 6.389 ÷ 2 = 3.19.
  5. So the area is 3.19 square units, to 3 significant figures.

Answer: 3.19 square units

A graph with the x axis named x from 0 to 1 and a y axis from 0 to 8 named y. A curve named y = e²ˣ rises from 1 on the y axis to about 7.4 at x = 1. The region under the curve from x = 0 to x = 1 is hatched and named A.00.5102468xyy = e²ˣA
The area A is (e² − 1)/2, which is 3.19.

Worked example

Find the area under y = 1/x from x = 1 to x = 4, to 3 significant figures.

  1. The area is the integral of 1/x from 1 to 4. An integral is ln|x|.
  2. At x = 4: ln 4. At x = 1: ln 1 = 0.
  3. The area is ln 4 − 0 = ln 4.
  4. The calculator gives ln 4 = 1.386, which is 1.39 to 3 significant figures.

Answer: 1.39 square units

A graph with the x axis named x from 0 to 5 and a y axis from 0 to 2 named y. A curve named y = 1/x falls from the top left, passes through 1 at x = 1 and flattens towards the x axis. The region under the curve from x = 1 to x = 4 is hatched and named A.012345012xyy = 1/xA
The area A is ln 4, which is 1.39. The curve gets lower, but the area keeps growing.

Take care with sine and cosine, because they swing above and below the axis. The integral from 0 to π of cos x is sin π − sin 0 = 0. But the area is not 0. The curve is above the axis from 0 to π/2, and below it from π/2 to π. The two parts are equal in size and cancel in the integral. The area is the sum of their sizes.

Worked example

Find the integral of cos x from 0 to π, and the area between the curve and the x axis over the same range.

  1. An integral of cos x is sin x. At π it is sin π = 0, and at 0 it is 0. So the integral is 0.
  2. The curve crosses the axis at x = π/2. Split the range there.
  3. From 0 to π/2: sin(π/2) − sin 0 = 1 − 0 = 1. This part is above the axis, so its area is 1.
  4. From π/2 to π: sin π − sin(π/2) = 0 − 1 = −1. This part is below the axis, so its area is 1.
  5. The area is 1 + 1 = 2.

Answer: The integral is 0, and the area is 2.

A graph with the x axis named x (radians) from 0 to π, marked at π/2 and π, and a y axis from −1 to 1 named y. A curve named y = cos x falls from 1 at x = 0, crosses the x axis at π/2 and reaches −1 at π. The region above the axis from 0 to π/2 is hatched and named P. The region below the axis from π/2 to π is cross hatched and named Q.0π/2π−101x (radians)yy = cos xPQ
P and Q have equal area, 1 each. The integral from 0 to π is P − Q = 0, but the area is P + Q = 2.

Worked example

Find the area under y = cos 2x from x = 0 to x = π/4.

  1. An integral of cos 2x is sin 2x/2.
  2. At x = π/4: sin(π/2)/2 = 1/2. At x = 0: sin 0 ÷ 2 = 0.
  3. The area is 1/2 − 0 = 1/2 square unit.

Answer: 0.5 square unit

A graph with the x axis named x (radians) from 0 to π/2, marked at π/4 and π/2, and a y axis from −1 to 1 named y. A curve named y = cos 2x falls from 1 at x = 0, crosses the x axis at π/4 and reaches −1 at π/2. The region under the curve from x = 0 to x = π/4 is hatched and named A.0π/4π/2−101x (radians)yy = cos 2xA
The area A is 1/2. The wave repeats every π, so it is half as wide as cos x and crosses the axis at π/4.

See it three ways

With things

You run a stopwatch while a spring bounces up and down. The velocity of the spring follows a wave like cos x. The area under the velocity wave is how far the spring is from where it started. Area above the line counts one way. Area below the line counts the other way, and the two can cancel.

As a picture

A table with the heads integrate and to get. The rows read eˣ and eˣ + c, 1/x and ln|x| + c, cos x and sin x + c, sin x and −cos x + c.integrateto geteˣeˣ + c1/xln|x| + ccos xsin x + csin x−cos x + c

In words

Each result is a gradient fact read backwards. A number before x divides the answer by that number.

In symbols

∫ f(ax + b) dx = (1/a) F(ax + b) + c.

Try it

Count squares under y = eˣ

You need: squared paper, a ruler, a pencil, a calculator.

  1. Use the calculator to find eˣ for x = 0, 0.25, 0.5, 0.75 and 1. You get 1, 1.28, 1.65, 2.12 and 2.72.
  2. On squared paper let 10 small squares be 1 unit on both axes. Plot the five points and join them with a smooth curve.
  3. Shade the region under the curve between x = 0 and x = 1.
  4. Count the small squares, and divide your count by 100.

What you will see: Your answer should be close to 1.72, which is e − 1. The integral of eˣ from 0 to 1 is e¹ − e⁰ = 1.72.

If you cannot try it, this is what happens.
A graph with the x axis named x from 0 to 1 and a y axis from 0 to 3 named y. A curve named y = eˣ rises from 1 on the y axis to about 2.7 at x = 1. The region under the curve from x = 0 to x = 1 is hatched and named A.00.510123xyy = eˣA

A wrong idea many people have

The integral of 1/x is x⁰ ÷ 0, from the power rule, so 1/x cannot be integrated.

Why it feels right: The power rule works for every other power, and 1/x is x⁻¹. So it seems it should work here too.

The test that breaks it: Try the rule for x⁻¹: raise the power by 1 to get x⁰, then divide by the new power, 0. We cannot divide by 0. But the gradient of ln x is 1/x, so 1/x does have an integral.

What is true: The integral of 1/x is ln|x| + c. This is the one power of x that the power rule cannot do.

A wrong idea many people have

The integral of e³ˣ is e³ˣ, the same as for eˣ.

Why it feels right: The function eˣ is its own integral, so any e to a power seems to be its own integral too.

The test that breaks it: Differentiate e³ˣ. The chain rule gives 3e³ˣ, not e³ˣ. So e³ˣ is not an integral of e³ˣ.

What is true: Divide by the number in front of x. The integral of e³ˣ is e³ˣ/3 + c.

Key words

natural logarithm
ln x, the logarithm to base e. Its gradient is 1/x.
absolute value
the size of a number with its sign ignored. |−3| = 3.
radians
the unit for angles in which the gradient of sin x is cos x.

Back to your guess

The answer is B: The integral of 1/x is the natural logarithm of x, ln x.

The power rule fails for 1/x because it would divide by 0. But in the book on differentiation, the gradient of ln x was 1/x. Going backwards, the integral of 1/x is ln x, with absolute value signs so that it also works for negative x. The fraction −1/x² is what you get by differentiating 1/x.

Check yourself

Try each one before you look. A wrong answer tells you where to go next.

  1. Find ∫ 4eˣ dx.

    Tap your answer.
    1. Yes, that is right. The integral of eˣ is eˣ. The number 4 stays in front. Add c.

    2. Not this one. You used the power rule on eˣ. The letter e is a number and x is the power, so the power rule does not apply. Read this page again. Try another.

    3. Not this one. You lost the 4. A number in front of an integral stays in front. Read this page again. Try another.

    4. Not this one. Do not divide by 4. The 4 is a multiplier outside, not a number before x. Read this page again. Try another.

    See the answer

    4eˣ + c

    The integral of eˣ is eˣ. The number 4 stays in front. Add c.

    • If you chose B: You used the power rule on eˣ. The letter e is a number and x is the power, so the power rule does not apply. Read this page again.
    • If you chose C: You lost the 4. A number in front of an integral stays in front. Read this page again.
    • If you chose D: Do not divide by 4. The 4 is a multiplier outside, not a number before x. Read this page again.
  2. Which of these is the integral of 1/x, for x above 0?

    Tap your answer.
    1. Yes, that is right. The gradient of ln x is 1/x. So the integral of 1/x is ln x + c. The absolute value bars make it work for negative x as well.

    2. Not this one. That is the gradient of 1/x. We are going the other way. Read this page again. Try another.

    3. Not this one. This divides by 0, so it is not a number. Read this page again. Try another.

    See the answer

    ln x + c

    The gradient of ln x is 1/x. So the integral of 1/x is ln x + c. The absolute value bars make it work for negative x as well.

  3. Which of these is the integral of sin x?

    Tap your answer.
    1. Not this one. The gradient of cos x is −sin x, not sin x. You have lost the minus sign. Read this page again. Try another.

    2. Not this one. The gradient of sin x is cos x, not sin x. Read this page again. Try another.

    3. Not this one. The gradient of −sin x is −cos x, not sin x. Read this page again. Try another.

    4. Yes, that is right. The gradient of cos x is −sin x, so the gradient of −cos x is sin x. The integral of sin x is −cos x + c.

    See the answer

    −cos x + c

    The gradient of cos x is −sin x, so the gradient of −cos x is sin x. The integral of sin x is −cos x + c.

  4. Find ∫ e⁴ˣ dx.

    Tap your answer.
    1. Not this one. Differentiating e⁴ˣ gives 4e⁴ˣ, so this has an extra factor 4. Read this page again. Try another.

    2. Not this one. You multiplied by 4 instead of dividing. Integration divides by the number before x. Read this page again. Try another.

    3. Yes, that is right. Differentiating e⁴ˣ gives 4e⁴ˣ. To remove the factor 4, divide by 4.

    See the answer

    e⁴ˣ/4 + c

    Differentiating e⁴ˣ gives 4e⁴ˣ. To remove the factor 4, divide by 4.

    • If you chose A: Differentiating e⁴ˣ gives 4e⁴ˣ, so this has an extra factor 4. Read this page again.
    • If you chose B: You multiplied by 4 instead of dividing. Integration divides by the number before x. Read this page again.
  5. Find the integral of sin x from x = 0 to x = π, the area under one hump of the sine wave.

    See the answer

    2

    An integral of sin x is −cos x. At π: −cos π = 1. At 0: −cos 0 = −1. The difference is 1 − (−1) = 2.

  6. Find the integral of e^(3x) from 0 to 1, to 3 significant figures.

    See the answer

    6.36

    An integral of e^(3x) is e^(3x)/3. From 0 to 1 this is (e³ − 1)/3 = 6.36. In general the integral of e^(ax) from 0 to b is (e^(ab) − 1) ÷ a.

  7. Find the area under y = 1/x from x = 1 to x = 5, to 3 significant figures.

    See the answer

    1.61

    The integral of 1/x is ln x. The area is ln 5 − ln 1 = ln 5 = 1.609, which is 1.61.

  8. A learner works out the integral of cos x from 0 to π and gets 0. What does this show?

    Tap your answer.
    1. Not this one. The curve has area above and below the axis. They are equal and cancel in the integral. Read this page again. Try another.

    2. Yes, that is right. The integral is the signed area. From 0 to π/2 the curve is above the axis and the signed area is 1. From π/2 to π it is below and the signed area is −1. The total is 0, but the area is 2.

    3. Not this one. An integral can be 0. The signed areas can cancel, as they do here. Read this page again. Try another.

    See the answer

    The part above the axis cancels the part below. The area is found by splitting the range.

    The integral is the signed area. From 0 to π/2 the curve is above the axis and the signed area is 1. From π/2 to π it is below and the signed area is −1. The total is 0, but the area is 2.

    • If you chose A: The curve has area above and below the axis. They are equal and cancel in the integral. Read this page again.
    • If you chose C: An integral can be 0. The signed areas can cancel, as they do here. Read this page again.
  9. Find the area under y = cos 3x from x = 0 to x = π/6. Give your answer as a fraction.

    See the answer

    1/3

    An integral of cos 3x is sin 3x/3. At x = π/6: sin(π/2)/3 = 1/3. At 0 it is 0. The area is 1/3.

  10. From an earlier chapter

    Find ∫₁³ 6x² dx. This is from chapter 2.

    Tap your answer.
    1. Not this one. You put in the upper limit and forgot to subtract the value at the lower limit. Go to M5.5.2. Try another.

    2. Yes, that is right. An integral of 6x² is 2x³. At 3 it is 54, and at 1 it is 2. So 54 − 2 = 52.

    3. Not this one. You put the limits into 6x², not into its integral 2x³. Go to M5.5.2. Try another.

    4. Not this one. You added the two values. The integral is F(b) − F(a), a subtraction. Go to M5.5.2. Try another.

    See the answer

    52

    An integral of 6x² is 2x³. At 3 it is 54, and at 1 it is 2. So 54 − 2 = 52.

    • If you chose A: You put in the upper limit and forgot to subtract the value at the lower limit. Go to M5.5.2.
    • If you chose C: You put the limits into 6x², not into its integral 2x³. Go to M5.5.2.
    • If you chose D: You added the two values. The integral is F(b) − F(a), a subtraction. Go to M5.5.2.
  11. What is ∫ 1/(3x) dx? The fraction 1/(3x) is (1/3) × (1/x).

    Tap your answer.
    1. Not this one. The gradient of ln|3x| is 1/x, not 1/(3x). The 3 cancels when you differentiate. Read this page again. Try another.

    2. Not this one. You multiplied by 3. The factor is 1/3, because 1/(3x) is a 3th of 1/x. Read this page again. Try another.

    3. Yes, that is right. A number in front stays in front. The integral is (1/3) ln|x| + c. Differentiating gives (1/3) × 1/x = 1/(3x).

    See the answer

    ln|x|/3 + c

    A number in front stays in front. The integral is (1/3) ln|x| + c. Differentiating gives (1/3) × 1/x = 1/(3x).

    • If you chose A: The gradient of ln|3x| is 1/x, not 1/(3x). The 3 cancels when you differentiate. Read this page again.
    • If you chose B: You multiplied by 3. The factor is 1/3, because 1/(3x) is a 3th of 1/x. Read this page again.

Keep it

Copy this into your exercise book.

∫eˣ = eˣ + c. ∫1/x = ln|x| + c. ∫cos x = sin x + c. ∫sin x = −cos x + c. For ax inside, divide by a. Angles in radians. Split a range where a wave crosses the axis.

Draw: A cosine wave from 0 to π with the part above the axis hatched and the part below cross hatched.

Reading with a child? A short page for the adult: what this chapter teaches and three questions to ask.

No internet tomorrow? Save the whole book as one file (910 KB). It opens on any phone.