Working with Logarithms

A Visual Log Scale The multiplicative number line is often called a ‘logarithmic scale’, or ‘log scale’ for short. Many physical measurements are much easier to represent on a log scale than a linear one.

If we scaled the universe down in the normal way, a ping-pong ball sized Earth would require a 4 metre sphere for the sun, 500 metres away. Pluto would be the size of a marble, 20km further down the road.

Tau Ceti (the nearest star with a possible Earth-like planet), would be a 3 metre sphere… on the moon! To represent the relative sizes and distances of widely varying objects such as cosmic bodies or, indeed, microscopic objects, we need a consistent way to condense the number line:

(cropped: for the complete pictures, visit xkcd.com) Using Logarithms to Solve Problems

The following problems all relate to compound .

The rule for calculating is:

퐹푖푛푎푙 푉푎푙푢푒 = 푃 × 퐼푛 where 푃 is the principal, 퐼 the (eg 1.02 for 2%) and 푛 the number of years.

Attempt the four questions using any method you like.

Principal (original amount) Interest rate (per year) Years Final amount 1. £1000 2% 5 풂 =? If I invest £1000 at 2% interest for 5 years, how much will I have?

푎 = 2. 풃 =? 3.5% 6 £2950.21 How much must I invest to get £2950.21 after 6 years at 3.5% interest?

푏 = 3. £2000 풄 =? 10 £3000 What interest rate would I need to grow £2000 into £3000 in 10 years?

푐 = 4. £1200 4% 풅 =? £2400 How many years will it take to grow £1200 into £2400 at 4% interest?

푑 = You will probably find that one of the values above required you to use trial and error. There is a better way, but it requires the use of a function that reverses .

Three types of equation involving powers The first two are straightforward; the last requires logarithms for all but the simplest cases. Equation: 43 = 푥 푦3 = 64 4푧 = 64 How to solve: Direct calculation Inverse powers (roots) Logarithms 1 푥 = 4 × 4 × 4 = ퟔퟒ 3 푧 = 푙표푔 64 = ퟑ 푦 = 643 = √64 = ퟒ 4 Commonly Used Logarithms

Some numbers are easy to take the logarithm of: we know that log2 16 = 4 because we recall that 24 = 16, for instance. But for more awkward numbers, it takes a calculator.

Most calculators are set up to easily calculate logs with base 10 or base 푒, since these are the most commonly used bases. With many log problems you can choose the base, and even if you can’t, there are ways to convert between bases.

Use the log button for base 10 logarithms. Check that log 100 gives you 2.

Use the ln button for the so-called natural log (base 푒). Check that ln 100 gives about 4.6.

Popular bases for logarithms: Base: Used by: Useful because: 퐥퐨퐠 ퟏퟐퟑퟒ = 10 Physicists Indicates the number of digits 3.091 … (eg the power when in standard form) 2 Programmers Indicates the number of bits 10.269 … (eg the number of binary digits needed) 푒 Mathematicians 푦 = 푒푥 has equal gradient and 푦 value 7.118 … 2.71 … (ie the rate of change is the height) Base 10 tells us that 1234 has just over 3 digits, so it’s 4 digits long. Base 2 tells us we need just over 10 bits in binary, so 11 bits: 10011010010. Base 푒 will come in handy when we need to differentiate exponential functions, because 푑푦 푦 = 푒푥 has gradient = 푒푥. The curve 푦 = 푒푥 has slope 1234 at the point 7.118, 1234 . 푑푥

How long is the longest known prime? 푝 = 300376418084 … 391086436351

The largest known prime, as of February 2016, is the massive number ퟐퟕퟒ,ퟐퟎퟕ,ퟐퟖퟏ − ퟏ. Your calculator struggles to deal with powers greater than 2 digits, but using logarithms we can find the approximate number of digits of this number in normal decimal notation.

Step 1: Ignore the −1. Powers of 2 never end in 0, so this won’t affect our answer. 274,207,281

Step 2: Take logs, base 10. The answer, when rounded up, will give us the number of digits. 74,207,281 log10 2

Step 3: Use the log rule 푛 log 퐴 = log 퐴푛 to bring the power down in front, and calculate. 74207281 log10 2 = 22,338,617.48 …

Step 4: Round up to the next whole number (the ‘ceiling’) to give the number of digits: ⌈22,338,617.48 … ⌉ = ퟐퟐ, ퟑퟑퟖ, ퟔퟏퟖ 풅풊품풊풕풔

Using Logarithms to Solve Problems SOLUTIONS

The following problems all relate to compound interest.

The rule for calculating compound interest is:

퐹푖푛푎푙 푉푎푙푢푒 = 푃 × 퐼푛 where 푃 is the principal, 퐼 the interest rate (eg 1.02 for 2%) and 푛 the number of years.

Attempt the four questions using any method you like.

Principal (original amount) Interest rate (per year) Years Final amount 1. £1000 2% 5 풂 =? If I invest £1000 at 2% interest for 5 years, how much will I have?

풂 = 1000 × 1.025 ≈ £ퟏퟏퟎퟒ. ퟎퟖ

2. 풃 =? 3.5% 6 £2950.21 How much must I invest to get £2950.21 after 6 years at 3.5% interest?

풃 = 2950.21 ÷ 1.0356 ≈ £ퟐퟒퟎퟎ. ퟎퟎ

3. £2000 풄 =? 10 £3000 What interest rate would I need to grow £2000 into £3000 in 10 years?

1 3000 10 풄 = 1 − ( ) ≈ 0.04138 = ퟒ. ퟏퟑퟖ% 2000

4. £1200 4% 풅 =? £2400 How many years will it take to grow £1200 into £2400 at 4% interest?

2400 풅 = log ( ) ≈ ퟏퟕ. ퟔퟕ 풚풆풂풓풔 풐풓 ퟏퟕ 풚풆풂풓풔, ퟐퟒퟔ 풅풂풚풔 1.04 1200

You will probably find that one of the values above required you to use trial and error. There is a better way, but it requires the use of a function that reverses exponentiation.

Three types of equation involving powers The first two are straightforward; the last requires logarithms for all but the simplest cases. Equation: 43 = 푥 푦3 = 64 4푧 = 64 How to solve: Direct calculation Inverse powers (roots) Logarithms 1 푥 = 4 × 4 × 4 = ퟔퟒ 3 푧 = 푙표푔 64 = ퟑ 푦 = 643 = √64 = ퟒ 4

Taking Logs to Solve Equations

Equations like 4푥 = 64 are easily solvable because we can easily spot that 64 = 43.

Equations like 4푥 = 70 are not so straightforward. But like any equation, provided we can find a way to reverse the process that has been applied to the unknown, we can solve it:

ퟒ풙 = ퟕퟎ Take logs (base 4) of both sides: 풙 = 퐥퐨퐠ퟒ ퟕퟎ ≈ ퟑ. ퟎퟔ Note that in this case, all you’re really doing is recognising the definition of the logarithm.

This method is fine if your calculator can deal with different bases, but many calculators only have the capacity to find log and ln, so what if we took logs using a different base?

ퟒ풙 = ퟕퟎ Take logs (base 10) of both sides: 풙 퐥퐨퐠ퟏퟎ ퟒ = 퐥퐨퐠ퟏퟎ ퟕퟎ Simplifying LHS using the log rule 푛 log 퐴 = log 퐴푛: 풙 퐥퐨퐠ퟏퟎ ퟒ = 퐥퐨퐠ퟏퟎ ퟕퟎ Dividing through by log10 4: 퐥퐨퐠ퟏퟎ ퟕퟎ 풙 = ≈ ퟑ. ퟎퟔ 퐥퐨퐠ퟏퟎ ퟒ Notice that here we don’t rely on any particular base. This is generally more convenient, but also gives us a new insight into logarithmic scales: the different scales are related log2 50 log10 50 multiplicatively. log2 50 and log10 50 are not equal, but = log2 30 log10 30

How many years will it take for the value of my house to triple at 8% a year?

Formulate the problem as an equation: 풙 × ퟏ. ퟎퟖ풏 = ퟑ풙 Divide through by 푥 (this shows that we didn’t need to know the price, only that it triples): ퟏ. ퟎퟖ풏 = ퟑ Taking logs of both sides: 풏 퐥퐨퐠ퟏퟎ ퟏ. ퟎퟖ = 퐥퐨퐠ퟏퟎ ퟑ Applying the rule 푙표푔 퐴푛 = 푛 푙표푔 퐴: 풏 퐥퐨퐠ퟏퟎ ퟏ. ퟎퟖ = 퐥퐨퐠ퟏퟎ ퟑ Dividing through by 푙표푔10 1.08: 퐥퐨퐠ퟏퟎ ퟑ 풏 = ≈ ퟏퟒ. ퟑ 풚풆풂풓풔 퐥퐨퐠ퟏퟎ ퟏ. ퟎퟖ

Logarithm Exam Questions The following questions are all taken from AQA Core 2 exams.

Laws of Logs (not provided in the formula book) log 퐴 + log 퐵 = log 퐴퐵 퐴 log 퐴 − log 퐵 = log 퐵 log 퐴푛 = 푛 log 퐴

log 10 = 1 & log 1 = 0

Question Hint 1. Use logarithms to solve the equation Take logs of both sides and make use of the 0.8푥 = 0.05, giving your answer to three rule for powers in logs: 푙표푔 퐴푛 = 푛 푙표푔 퐴. decimal places.

푛 2. Given that log푎 푥 = 3 log푎 6 − log푎 8 Use the rule 푙표푔 퐴 = 푛 푙표푔 퐴 to simplify where 푎 is a positive constant, find 푥. 3 푙표푔푎 6 first, then use the rule for adding logarithms: 푙표푔 퐴 + 푙표푔 퐵 = 푙표푔 퐴퐵.

3. It is given that 푛 solves the equation Use the rule for powers in logs to simplify 2 log푎 푛 − log푎 5푛 − 24 = log푎 4. Show 2 푙표푔푎 푛, then the rule for subtracting 2 퐴 that 푛 − 20푛 + 96 = 0, and hence find 푛. logarithms: 푙표푔 퐴 − 푙표푔 퐵 = 푙표푔 . 퐵

Question Hint 4. Given that log푎 푦 + log푎 5 = 7, express Combine the terms on the right into a single 푦 in terms of 푎, giving your answer in a logarithm using the rule for adding logs. form not involving logarithms. Next, reverse the function by using the opposite .

5. Express 푥푦 in terms of 푎, given that Write 푥 as a power of 푎, then find 푦 as a log푎 푥 = 3 and log푎 푦 − 3 log푎 2 = 4. power of 푎 by combining the left-hand-side first using log rules.

푥 6. Given that log2 푝 = 푚 and log8 푞 = 푛, Use the inverse function 8 to write 푞 in express 푝푞 in the form 2푦 where 푦 is an terms of 푛, first as a power of 8, then – by expression in 푚 and 푛. expressing 8 as a power of 2, as a power of 2 itself. Find an expression for 푝 in terms of 푚, and combine using index laws.

7. The curves 푦 = 4−푥 and 푦 = 3 × 4푥 Equate the right-hand-sides, and take logs. intersect at exactly one point. Find the 푥 Use the log rule involving powers in logs to coordinate of this point of intersection. isolate 푥, then rearrange.

Logarithm Exam Questions SOLUTIONS

The following questions are all taken from AQA Core 2 exams.

Question Solution 1. Use logarithms to solve the equation ln 0.8푥 = ln 0.05 0.8푥 = 0.05, giving your answer to three 푥 ln 0.8 = ln 0.05 decimal places. ln 0.05 푥 = ≈ ퟏퟑ. ퟒퟐퟓ ln 0.8

3 2. Given that log푎 푥 = 3 log푎 6 − log푎 8 log푎 푥 = log푎 6 − log푎 8 where 푎 is a positive constant, find 푥. 63 log 푥 = log 푎 푎 8 63 푥 = = ퟐퟕ 8

2 3. It is given that 푛 solves the equation log푎 푛 − log푎 5푛 − 24 = log푎 4 2 log 푛 − log 5푛 − 24 = log 4. Show 푛2 푎 푎 푎 log = log 4 that 푛2 − 20푛 + 96 = 0, and hence find 푛. 푎 5푛 − 24 푎 푛2 = 4 5푛 − 24 푛2 = 20푛 − 96 풏ퟐ − ퟐퟎ풏 + ퟗퟔ = ퟎ 풂풔 풓풆풒풖풊풓풆풅

4. Given that log푎 푦 + log푎 5 = 7, express log푎 5푦 = 7 푦 in terms of 푎, giving your answer in a 5푦 = 푎7 form not involving logarithms. 풂ퟕ 풚 = ퟓ

5. Express 푥푦 in terms of 푎, given that 푥 = 푎3 3 log푎 푥 = 3 and log푎 푦 − 3 log푎 2 = 4. log푎 푦 − log푎 2 = 4 푦 log = 4 푎 23 푦 = 푎4 8 푦 = 8푎4 푥푦 = 푎3 × 8푎4 = ퟖ풂ퟕ

푚 6. Given that log2 푝 = 푚 and log8 푞 = 푛, 푝 = 2 express 푝푞 in the form 2푦 where 푦 is an 푞 = 8푛 = 23 푛 = 23푛 expression in 푚 and 푛. 푝푞 = 2푚 × 23푛 = ퟐ풎+ퟑ풏

7. The curves 푦 = 4−푥 and 푦 = 3 × 4푥 4−푥 = 3 × 4푥 intersect at exactly one point. Find the 푥 ln 4−푥 = ln 3 × 4푥 coordinate of this point of intersection. −푥 ln 4 = ln 3 + 푥 ln 4 2푥 ln 4 = − ln 3 퐥퐧 ퟑ 풙 = − ퟐ 퐥퐧 ퟒ