A1 · Lesson 8 · Logarithms
A logarithm counts zeros
How many zeros does a million have? Six. A billion? Nine. A thousandth? Three, on the other side of the point. That count is a logarithm, and you already know how to take one for any power of ten. The interesting question is what the count should be for a number like 2000, which sits between two powers of ten.
Play
- Slide x and watch the dot. The horizontal axis is a log scale, so 1, 10, 100 and 1000 are evenly spaced along it.
- Read in the strip. Put x on a power of ten, then halfway between two of them.
- Multiply x by 10 (move it one decade to the right). How much does change?
Predict
You multiply x by 10. What happens to ?
It goes up by exactly 1, wherever x starts. Multiplying by 10 adds one zero, and the logarithm counts zeros. That's why the line on this graph is straight: every step of one decade to the right is one step of 1 up.
Name it
The logarithm is the power of ten
is the power you have to raise 10 to in order to get :
Numbers between powers of ten have logarithms between whole numbers. A handful are worth knowing by heart, because the rest follow from them:
| 1 | 2 | 3 | 5 | 10 | |
|---|---|---|---|---|---|
| 0 | 0.301 | 0.477 | 0.699 | 1 |
They follow from three rules. Each one says that logarithms turn multiplying into adding:
So . The whole number part counts the zeros and the decimal part says where the number sits between them. And .
You'll also meet the natural logarithm, , which uses the number in place of 10. It's the one calculus prefers, and . Calculators usually label them log and ln, but in most programming languages log means , so check which one you're getting.
Logarithms only exist for positive numbers. A number below 1 has a negative logarithm, since you divide by ten to get there.
Worked example
Without a calculator, find and .
Show the solution
- Split 5000 and take its log. , so
- Split 0.02 and take its log. , so
- The method. Split each number into a digit and a power of ten. The power counts the zeros; the digit adds its logarithm from the table.
Answer and .
Worked example
A capacitor discharges as . How many time constants until it's down to 1% of where it started?
Show the solution
- Set the curve to 1%.
- Take the natural logarithm of both sides. so .
- Evaluate ln 100. so it takes about 4.6 time constants.
Answer about 4.6 time constants. This is where the rule "five time constants and it's done" comes from.
Check
Without a calculator, what is ?
Use , and .
Check
. What is ?
Check
What is ?
Check
Write using .
Type log10(x) for .
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Check
Using , and , but no calculator, what is ?
Check
A disturbance in an unstable amplifier doubles every 4 ms. How long does it take to grow by a factor of 10?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Explain why
On a log scale, 1, 10, 100 and 1000 are equally far apart. Why?
A log scale places each number at the position of its logarithm. The logarithms of 1, 10, 100 and 1000 are 0, 1, 2 and 3, which are evenly spaced. So equal steps along a log scale stand for equal factors, here a factor of ten each time.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.