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.
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.
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.
Worked example
Find ∫(3eˣ + 2/x) dx.
- Integrate each term. A number in front stays in front.
- 3eˣ becomes 3eˣ, because eˣ integrates to eˣ.
- 2/x is 2 × 1/x, and it becomes 2 ln|x|.
- 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.
- The inside is 3x, so a = 3.
- Integrate eˣ to get eˣ, then replace x by 3x: e³ˣ.
- Divide by a = 3. The integral is e³ˣ/3 + c.
- Check: differentiating e³ˣ/3 gives 3e³ˣ/3 = e³ˣ.
Answer: e³ˣ/3 + c
Worked example
Find ∫ cos 2x dx.
- The inside is 2x, so a = 2.
- Integrate cos x to get sin x, then replace x by 2x: sin 2x.
- Divide by a = 2. The integral is sin 2x/2 + c.
- 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.
- The area is the integral of e²ˣ from 0 to 1.
- An integral of e²ˣ is e²ˣ/2.
- At x = 1: e²/2. At x = 0: e⁰/2 = 1/2.
- The area is (e² − 1)/2. With e² = 7.389, this is 6.389 ÷ 2 = 3.19.
- So the area is 3.19 square units, to 3 significant figures.
Answer: 3.19 square units
Worked example
Find the area under y = 1/x from x = 1 to x = 4, to 3 significant figures.
- The area is the integral of 1/x from 1 to 4. An integral is ln|x|.
- At x = 4: ln 4. At x = 1: ln 1 = 0.
- The area is ln 4 − 0 = ln 4.
- The calculator gives ln 4 = 1.386, which is 1.39 to 3 significant figures.
Answer: 1.39 square units
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.
- An integral of cos x is sin x. At π it is sin π = 0, and at 0 it is 0. So the integral is 0.
- The curve crosses the axis at x = π/2. Split the range there.
- From 0 to π/2: sin(π/2) − sin 0 = 1 − 0 = 1. This part is above the axis, so its area is 1.
- From π/2 to π: sin π − sin(π/2) = 0 − 1 = −1. This part is below the axis, so its area is 1.
- The area is 1 + 1 = 2.
Answer: The integral is 0, and the area is 2.
Worked example
Find the area under y = cos 2x from x = 0 to x = π/4.
- An integral of cos 2x is sin 2x/2.
- At x = π/4: sin(π/2)/2 = 1/2. At x = 0: sin 0 ÷ 2 = 0.
- The area is 1/2 − 0 = 1/2 square unit.
Answer: 0.5 square unit
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
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.
- 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.
- On squared paper let 10 small squares be 1 unit on both axes. Plot the five points and join them with a smooth curve.
- Shade the region under the curve between x = 0 and x = 1.
- 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.
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.
Find ∫ 4eˣ dx.
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.
Which of these is the integral of 1/x, for x above 0?
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.
- If you chose B: That is the gradient of 1/x. We are going the other way. Read this page again.
- If you chose C: This divides by 0, so it is not a number. Read this page again.
Which of these is the integral of sin x?
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.
- If you chose A: The gradient of cos x is −sin x, not sin x. You have lost the minus sign. Read this page again.
- If you chose B: The gradient of sin x is cos x, not sin x. Read this page again.
- If you chose C: The gradient of −sin x is −cos x, not sin x. Read this page again.
Find ∫ e⁴ˣ dx.
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.
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.
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.
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.
A learner works out the integral of cos x from 0 to π and gets 0. What does this show?
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.
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.
From an earlier chapter
Find ∫₁³ 6x² dx. This is from chapter 2.
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.
What is ∫ 1/(3x) dx? The fraction 1/(3x) is (1/3) × (1/x).
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.