Square roots and logarithms without a calculator (Part 5)

I’m in the middle of a series of posts concerning the elementary operation of computing a square root. This is such an elementary operation because nearly every calculator has a \sqrt{~~} button, and so students today are accustomed to quickly getting an answer without giving much thought to (1) what the answer means or (2) what magic the calculator uses to find square roots. I like to show my future secondary teachers a brief history on this topic… partially to deepen their knowledge about what they likely think is a simple concept, but also to give them a little appreciation for their elders.

One way that square roots can be computed without a calculator is by using log tables. This was a common computational device before pocket scientific calculators were commonly affordable… say, the 1920s.

As many readers may be unfamiliar with this blast from the past, Parts 3 and 4 of this series discussed the mechanics of how to use a log table. In Part 6, I’ll discuss how square roots (and other operations) can be computed with using log tables.

In this post, I consider the modern pedagogical usefulness of log tables, even if logarithms can be computed more easily with scientific calculators.

green line

A personal story: In either 1981 or 1982, my parents bought me my first scientific calculator. It was a thing of beauty… maybe about 25% larger than today’s TI-83s, with an LED screen that tilted upward. When it calculated something like \log_{10} 4213, the screen would go blank for a couple of seconds as it struggled to calculate the answer. I’m surprised that smoke didn’t come out of both sides as it struggled. It must have cost my parents a small fortune, maybe over $1000 after adjusting for inflation. Naturally, being an irresponsible kid in the early 1980s, it didn’t last but a couple of years. (It’s a wonder that my parents didn’t kill me when I broke it.)

So I imagine that requiring all students to use log tables fell out of favor at some point during the 1980s, as technology improved and the prices of scientific calculators became more reasonable.

I regularly teach the use of log tables to senior math majors who aspire to become secondary math teachers. These students who have taken three semesters of calculus, linear algebra, and several courses emphasizing rigorous theorem proving. In other words, they’re no dummies. But when I show this blast from the past to them, they often find the use of a log table to be absolutely mystifying, even though it relies on principles — the laws of logarithms and the point-slope form of a line — that they think they’ve mastered.

So why do really smart students, who after all are math majors about to graduate from college, struggle with mastering log tables, a concept that was expected of 15- and 16-year-olds a generation ago? I personally think that a lot of their struggles come from the fact that they don’t really know logarithms in the way that students of previous generation had to know them in order to survive precalculus. For today’s students, a logarithm is computed so easily that, when my math majors were in high school, they were not expected to really think about its meaning.

For example, it’s no longer automatic for today’s math majors to realize that \log_{10} 4213 has to be between 3 and 4 someplace. They’ll just punch the numbers in the calculators to get an answer, and the process happens so quickly that the answer loses its meaning.

They know by heart that \log_{b} xy = \log_{b} x + \log_{b} y and that \log_b b^x = x. But it doesn’t reflexively occur to them that these laws can be used to rewrite \log_{10} 4213 as 3 + \log_{10} 4.213.

When encountering 10^{1.8123}, their first thought is to plug into a calculator to get the answer, not to reflect and realize that the answer, whatever it is, has to be between 10 and 100 someplace.

Today’s math majors can be taught these approximation principles, of course, but there’s unfortunately no reason to expect that they received the same training with logarithms that students received a generation ago. So none of this discussion should be considered as criticism of today’s math majors; it’s merely an observation about the training that they received as younger students versus the training that previous generations received.

green line

So, do I think that all students today should exclusively learn how to use log tables? Absolutely not.If college students who have received excellent mathematical training can be daunted by log tables, you can imagine how the high school students of generations past must have felt — especially the high school students who were not particularly predisposed to math in the first place.

People like me that made it through the math education system of the 1980s (and before) received great insight into the meaning of logarithms. However, a lot of students back then found these tables as mystifying as today’s college students, and perhaps they did not survive the system because they found the use of the table to be exceedingly complex. In other words, while they were necessary for an era that pre-dated pocket calculators, log tables (and trig tables) were an unfortunate conceptual roadblock to a lot of students who might have had a chance at majoring in a STEM field. By contrast, logarithms are found easily today so that the steps above are not a hindrance to today’s students.

That said, I do argue that there is pedagogical value (as well as historical value) in showing students how to use log tables, even though calculators can accomplish this task much quicker. In other words, I wouldn’t expect students to master the art of performing the above steps to compute logarithms on the homework assignments and exams. But if they can’t perform the above steps, then there’s room for their knowledge of logarithms to grow.

And it will hopefully give today’s students a little more respect for their elders.

Square roots and logarithms without a calculator (Part 4)

I’m in the middle of a series of posts concerning the elementary operation of computing a square root. In Part 3 of this series, I discussed how previous generations computed logarithms without a calculator by using log tables. In this post, I’ll discuss how previous generations computed, using the language of the time, antilogarithms. In Part 5, I’ll discuss my opinions about the pedagogical usefulness of log tables, even if logarithms can be computed more easily with scientific calculators. And in Part 6, I’ll return to square roots — specifically, how log tables can be used to find square roots.

Let’s again go back to a time before the advent of pocket calculators… say, 1943.

The following log tables come from one of my prized possessions: College Mathematics, by Kaj L. Nielsen (Barnes & Noble, New York, 1958).

logtables1 logtables2

How to use the table, Part 5. The table can also be used to work backwards and find an antilogarithm. The term antilogarithm isn’t used much anymore, but the principle is still used in teaching students today. Suppose we wish to solve

\log_{10} x = 0.9509, or x = 10^{0.9509}.

Looking through the body of the table, we see that 9509 appears on the row marked 89 and the column marked 3. Therefore, $10^{0.9509} \approx 8.93$. Again, this matches (to three and almost four significant digits) the result of a modern calculator.

TIlog2

How to use the table, Part 6. Linear interpolation can also be used to find antilogarithms. Suppose we’re trying to evaluate 10^{0.9387},  or find the value of x so that $\log_{10} x = 0.9387$. From the table, we can trap 9387 between

\log_{10} 8.68 \approx 0.9385 and \log_{10} 8.69 \approx 0.9390

So we again use linear interpolation, except this time the value of y is known and the value of x is unknown:

m = \displaystyle \frac{0.9390-0.9385}{8.69-8.68} = 0.05

y - 0.9385= 0.05 (x - 8.68)

0.9387 - 0.9385= 0.05 (x - 8.68)

0.0002 = 0.05 (x-8.68)

0.004 =x-8.68

8.684 =x

So we estimate 10^{0.9387} \approx 8.684 This matches the result of a modern calculator to four significant digits:

TIlog4

How to use the table, Part 7.

How to use the table, Part 8.

Note: Sorry, but I’m not sure what happened… when the post came up this morning (August 4), I saw my work in Parts 7 and 8 had disappeared. Maybe one of these days I’ll restore this.

Square roots and logarithms without a calculator (Part 3)

I’m in the middle of a series of posts concerning the elementary operation of computing a square root. This is such an elementary operation because nearly every calculator has a \sqrt{~~} button, and so students today are accustomed to quickly getting an answer without giving much thought to (1) what the answer means or (2) what magic the calculator uses to find square roots. I like to show my future secondary teachers a brief history on this topic… partially to deepen their knowledge about what they likely think is a simple concept, but also to give them a little appreciation for their elders.

Today’s topic is the use of log tables. I’m guessing that many readers have either forgotten how to use a log table or else were never even taught how to use them. After showing how log tables were used in the past, I’ll conclude with some thoughts about its effectiveness for teaching students logarithms for the first time.

This will be a fairly long post about log tables. In the next post, I’ll discuss how log tables can be used to compute square roots.

To begin, let’s again go back to a time before the advent of pocket calculators… say, 1912.

Before the advent of pocket calculators, most professional scientists and engineers had mathematical tables for keeping the values of logarithms, trigonometric functions, and the like. The following images come from one of my prized possessions: College Mathematics, by Kaj L. Nielsen (Barnes & Noble, New York, 1958). Some saint gave this book to me as a child in the late 1970s; trust me, it was well-worn by the time I actually got to college.

With the advent of cheap pocket calculators, mathematical tables are a relic of the past. The only place that any kind of mathematical table common appears in modern use are in statistics textbooks for providing areas and critical values of the normal distribution, the Student t distribution, and the like.

That said, mathematical tables are not a relic of the remote past. When I was learning logarithms and trigonometric functions at school in the early 1980s — one generation ago — I distinctly remember that my school textbook had these tables in the back of the book.

And it’s my firm opinion that, as an exercise in history, log tables can still be used today to deepen students’ facility with logarithms. In this post and Part 4 of this series, I discuss how the log table can be used to compute logarithms and (using the language of past generations) antilogarithms without a calculator. In Part 5, I’ll discuss my opinions about the pedagogical usefulness of log tables, even if logarithms can be computed more easily nowadays with scientific calculators. In Part 6, I’ll return to square roots — specifically, how log tables can be used to find square roots.

logtables1 logtables2

How to use the table, Part 1. How do you read this table? The left-most column shows the ones digit and the tenths digit, while the top row shows the hundredths digit. So, for example, the bottom row shows ten different base-10 logarithms:

\log_{10} 9.90 \approx 0.9956, \log_{10} 9.91 \approx 0.9961, \log_{10} 9.92 \approx 0.9965,

\log_{10} 9.93 \approx 0.9969, \log_{10} 9.94 \approx 0.9974, \log_{10} 9.95 \approx 0.9978,

\log_{10} 9.96 \approx 0.9983, \log_{10} 9.97 \approx 0.9987, \log_{10} 9.98 \approx 0.9991,

\log_{10} 9.99 \approx 0.9996

So, rather than punching numbers into a calculator, the table was used to find these logarithms. You’ll notice that these values match, to four decimal places, the values found on a modern calculator.

TIlog

How to use the table, Part 2. What if we’re trying to take the logarithm of a number between 1 and 10 which has more than two digits after the decimal point, like \log_{10} 5.1264? From the table, we know that the value has to lie between

\log_{10} 5.12 \approx 0.7093 and \log_{10} 5.13 \approx 0.7101

So, to estimate \log_{10} 5.1264, we will employ linear interpolation. That’s a fancy way of saying “Find the line connecting (5.12,0.7093) and (5.13,0.7101), and find the point on the line whose x-coordinate is 5.1264. The graph of $y = \log_{10} x$ is not a straight line, of course, but hopefully this linear interpolation will be reasonably close to the correct answer.

Finding this line is a straightforward exercise in the point-slope form of a line:

m = \displaystyle \frac{0.7101-0.7093}{5.13-5.12} = 0.08

y - 0.7093= 0.08 (x - 5.12)

y = 0.7093+ 0.08 (5.1264-5.12)

y = 0.7093+ 0.08(0.0064) = 0.7093 + 0.000512 = 0.709812

Remembering that this log table is only good to four significant digits, we estimate \log_{10} 5.1264 \approx 0.7098.

With a little practice, one can do the above calculations with relative ease. Also, many log tables of the past had a column called “proportional parts” that essentially replaced the step of linear interpolation, thus speeding the use of the table considerably.

Again, this matches the result of a modern calculator to four decimal places:

TIlog3

How to use the table, Part 3. So far, we’ve discussed taking the logarithms of numbers between 1 and 10 and the antilogarithms of numbers between 0 and 1. Let’s now consider what happens if we pick a number outside of these intervals.

To find \log_{10} 12,345, we observe that

\log_{10}12345 = \log_{10} (10,000 \times 1.2345)

\log_{10} 12345 = \log_{10} 10,000 + \log_{10} 1.2345

\log_{10} 12345 = 4 + \log_{10} 1.2345

More intuitively, we know that the answer must lie between \log_{10} 10,000 = 4 and 100,000 = 5, so the answer must be 4.\hbox{something}. The value of \log_{10} 1.2345 is the necessary \hbox{something}.

We then find \log_{10} 1.2345 by linear interpolation. From the table, we see that

\log_{10} 1.23 \approx 0.0899 and \log_{10} 1.24 \approx 0.0934

Employing linear interpolation, we find

m = \displaystyle \frac{0.0934-0.0899}{1.24-1.23} = 0.35

y - 0.0899= 0.35 (x - 1.23)

y = 0.0899+ 0.35 (1.2345-1.23)

y = 0.0899+ 0.35(0.0045) = 0.0899 + 0.001575 = 0.091475

Remembering that this log table is only good to four significant digits, we estimate \log_{10} 1.2345 \approx 0.0915, so that \log_{10} 12,345 \approx 4.0915.

Again, this matches the result of a modern calculator to four decimal places (in this case, five significant digits):

TIlog5

How to use the table, Part 4.  Let’s now consider what happens if we pick a positive number less than 1. To find \log_{10} 0.00012345, we observe that

\log_{10}0.00012345 = \log_{10} \left( 1.2345 \times 10^{-4} \right)

\log_{10}0.00012345 = \log_{10} 1.2345 + \log_{10} 10^{-4}

\log_{10} 0.00012345 = -4 + \log_{10} 1.2345

We have already found \log_{10} 1.2345 \approx 0.0915 by linear interpolation. We therefore conclude that \log_{10} 12,345 \approx 0.0915 - 4 = -3.9085. Again, this matches the result of a modern calculator to four decimal places (in this case, five significant digits):

TIlog6

green line

So that’s how to compute logarithms without a calculator: we rely on somebody else’s hard work to compute these logarithms (which were found in the back of every precalculus textbook a generation ago), and we make clever use of the laws of logarithms and linear interpolation.

Log tables are of course subject to roundoff errors. (For that matter, so are pocket calculators, but the roundoff happens so deep in the decimal expansion — the 12th or 13th digit — that students hardly ever notice the roundoff error and thus can develop the unfortunate habit of thinking that the result of a calculator is always exactly correct.)

For a two-page table found in a student’s textbook, the results were typically accurate to four significant digits. Professional engineers and scientists, however, needed more accuracy than that, and so they had entire books of tables. A table showing 5 places of accuracy would require about 20 printed pages, while a table showing 6 places of accuracy requires about 200 printed pages. Indeed, if you go to the old and dusty books of any decent university library, you should be able to find these old books of mathematical tables.

In other words, that’s how the Brooklyn Bridge got built in an era before pocket calculators.

At this point you may be asking, “OK, I don’t need to use a calculator to use a log table. But let’s back up a step. How were the values in the log table computed without a calculator?” That’s a perfectly reasonable question, but this post is getting long enough as it is. Perhaps I’ll address this issue in a future post.

Engaging students: Solving exponential equations

In my capstone class for future secondary math teachers, I ask my students to come up with ideas for engaging their students with different topics in the secondary mathematics curriculum. In other words, the point of the assignment was not to devise a full-blown lesson plan on this topic. Instead, I asked my students to think about three different ways of getting their students interested in the topic in the first place.

I plan to share some of the best of these ideas on this blog (after asking my students’ permission, of course).

This student submission comes from my former student Jesse Faltys. Her topic: solving exponential equations.

green line

APPLICATIONS: What interesting (i.e., uncontrived) word problems using this topic can your students do now?

 Once your students have learned how to solve exponential equations, they can solve many different kinds of applied problems like population growth, bacterial decay, and even investment earning interest rate.    (Examples Found: http://www.education.com/study-help/article/pre-calculus-help-log-expo-applications/)

 Examples

 1. How long will it take for $1000 to grow to $1500 if it earns 8% annual interest, compounded monthly?

A = P \left( 1 + \displaystyle \frac{r}{n} \right)^{nt}

  • A (t) = 1500, P = 1000, r = 0.08, and n = 12.
  • We do not know t.
  • We will solve this equation for t and will round up to the nearest month.
  • In five years and one month, the investment will grow to about $1500.

2. A school district estimates that its student population will grow about 5% per year for the next 15 years.  How long will it take the student population to grow from the current 8000 students to 12,000?

  • We will solve for t in the equation 12,000 = 8000 e^{0.05t}.

12,000 = 8000 e^{0.05t}

1.5 = e^{0.05t}

0.05t = \ln 1.5

t = \displaystyle \frac{\ln 1.5}{0.05} \approx 8.1

  • The population is expected to reach 12,000 in about 8 years.

3. At 2:00 a culture contained 3000 bacteria.  They are growing at the rate of 150% per hour.  When will there be 5400 bacteria in the culture?

  • A growth rate of 150% per hour means that r = 1.5 and that t is measured in hours.

5400 = 3000 e^{1.5t}

1.8 = e^{1.5t}

1.5t = \ln 1.8

t = \displaystyle \frac{\ln 1.8}{1.5} \approx 0.39

  • At about 2:24 (0.39 \times 60 = 23.4 minutes) there will be 5400 bacteria.

A note from me: this last example is used in doctor’s offices all over the country. If a patient complains of a sore throat, a swab is applied to the back of the throat to extract a few bacteria. Bacteria are of course very small and cannot be seen. The bacteria are then swabbed to a petri dish and then placed into an incubator, where the bacteria grow overnight. The next morning, there are so many bacteria on the petri dish that they can be plainly seen. Furthermore, the shapes and clusters that are formed are used to determine what type of bacteria are present.

green line

CURRICULUM — How does this topic extend what your students should have learned in previous courses?

 The students need to have a good understanding of the properties of exponents and logarithms to be able to solve exponential equations.  By using properties of exponents, they should know that if both sides of the equations are powers of the same base then one could solve for x.  As we all know, not all exponential equations can be expressed in terms of a common base.  For these equations, properties of logarithms are used to derive a solution.  The students should have a good understanding of the relationship between logarithms and exponents.  Logs are the inverses of exponentials.  This understanding will allow the student to be able to solve real applications by converting back and forth between the exponent and log form.  That is why it is extremely important that a great review lesson is provided before jumping into solving exponential equations. The students will be in trouble if they have not successfully completed a lesson on these properties.

green line

TechnologyHow can technology be used to effectively engage students with this topic? 

1. Khan Academy provides a video titled “Word Problem Solving – Exponential Growth and Decay” which shows an example of a radioactive substance decay rate. The instructor on the video goes through how to organize the information from the world problem, evaluate in a table, and then solve an exponential equation. For our listening learners, this reiterates to the student the steps in how to solve exponential equations.

(http://www.khanacademy.org/math/trigonometry/exponential_and_logarithmic_func/exp_growth_decay/v/exponential-growth-functions)

2. Math warehouse is an amazing website that allows the students to interact by providing probing questions to make sure they are on the right train of thought.

For example, the question is 9^x = 27^2 and the student must solve for x.  The first “hint” the website provides is “look at the bases.  Rewrite them as a common base” and then the website shows them the work.  The student will continue hitting the “next” button until all steps are complete. This is allowing the visual learners to see how to write out each step to successfully complete the problem.

(http://www.mathwarehouse.com/algebra/exponents/solve-exponential-equations-how-to.php)

Reminding students about Taylor series (Part 6)

Sadly, at least at my university, Taylor series is the topic that is least retained by students years after taking Calculus II. They can remember the rules for integration and differentiation, but their command of Taylor series seems to slip through the cracks. In my opinion, the reason for this lack of retention is completely understandable from a student’s perspective: Taylor series is usually the last topic covered in a semester, and so students learn them quickly for the final and quickly forget about them as soon as the final is over.

Of course, when I need to use Taylor series in an advanced course but my students have completely forgotten this prerequisite knowledge, I have to get them up to speed as soon as possible. Here’s the sequence that I use to accomplish this task. Covering this sequence usually takes me about 30 minutes of class time.

I should emphasize that I present this sequence in an inquiry-based format: I ask leading questions of my students so that the answers of my students are driving the lecture. In other words, I don’t ask my students to simply take dictation. It’s a little hard to describe a question-and-answer format in a blog, but I’ll attempt to do this below.

In the previous posts, I described how I lead students to the definition of the Maclaurin series

f(x) = \displaystyle \sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k,

which converges to f(x) within some radius of convergence for all functions that commonly appear in the secondary mathematics curriculum.

green line

Step 7. Let’s now turn to trigonometric functions, starting with f(x) = \sin x.

What’s f(0)? Plugging in, we find f(0) = \sin 0 = 0.

As before, we continue until we find a pattern. Next, f'(x) = \cos x, so that f'(0) = 1.

Next, f''(x) = -\sin x, so that f''(0) = 0.

Next, f'''(x) = -\cos x, so that f''(0) = -1.

No pattern yet. Let’s keep going.

Next, f^{(4)}(x) = \sin x, so that f^{(4)}(0) = 0.

Next, f^{(5)}(x) = \cos x, so that f^{(5)}(0) = 1.

Next, f^{(6)}(x) = -\sin x, so that f^{(6)}(0) = 0.

Next, f^{(7)}(x) = -\cos x, so that f^{(7)}(0) = -1.

OK, it looks like we have a pattern… albeit more awkward than the patterns for e^x and \displaystyle \frac{1}{1-x}. Plugging into the series, we find that

\displaystyle \sin x= x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} \dots

If we stare at the pattern of terms long enough, we can write this more succinctly as

\sin x = \displaystyle \sum_{n=0}^\infty (-1)^n \frac{x^{2n+1}}{(2n+1)!}

The (-1)^n term accounts for the alternating signs (starting on positive with n=0), while the 2n+1 is needed to ensure that each exponent and factorial is odd.

Let’s see… \sin x has a Taylor expansion that only has odd exponents. In what other sense are the words “sine” and “odd” associated?

In Precalculus, a function f(x) is called odd if f(-x) = -f(x) for all numbers x. For example, f(x) = x^9 is odd since f(-x) = (-x)^9 = -x^9 since 9 is a (you guessed it) an odd number. Also, \sin(-x) = -\sin x, and so \sin x is also an odd function. So we shouldn’t be that surprised to see only odd exponents in the Taylor expansion of \sin x.

A pedagogical note: In my opinion, it’s better (for review purposes) to avoid the \displaystyle \sum notation and simply use the “dot, dot, dot” expression instead. The point of this exercise is to review a topic that’s been long forgotten so that these Taylor series can be used for other purposes. My experience is that the \displaystyle \sum adds a layer of abstraction that students don’t need to overcome for the time being.

green line

Step 8. Let’s now turn try f(x) = \cos x.

What’s f(0)? Plugging in, we find f(0) = \cos 1 = 0.

Next, f'(x) = -\sin x, so that f'(0) = 0.

Next, f''(x) = -\cos x, so that f'(0) = -1.

It looks like the same pattern of numbers as above, except shifted by one derivative. Let’s keep going.

Next, f'''(x) = \sin x, so that f'''(0) = 0.

Next, f^{(4)}(x) = \cos x, so that f^{(4)}(0) = 1.

Next, f^{(5)}(x) = -\sin x, so that f^{(5)}(0) = 0.

Next, f^{(6)}(x) = -\cos x, so that f^{(6)}(0) = -1.

OK, it looks like we have a pattern somewhat similar to that of $\sin x$, except only involving the even terms. I guess that shouldn’t be surprising since, from precalculus we know that \cos x is an even function since \cos(-x) = \cos x for all x.

Plugging into the series, we find that

\displaystyle \cos x= 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \dots

If we stare at the pattern of terms long enough, we can write this more succinctly as

\cos x = \displaystyle \sum_{n=0}^\infty (-1)^n \frac{x^{2n}}{(2n)!}

green line

As we saw with e^x, the above series converge quickest for values of x near 0. In the case of \sin x and \cos x, this may be facilitated through the use of trigonometric identities, thus accelerating convergence.

For example, the series for \cos 1000^o will converge quite slowly (after converting 1000^o into radians). However, we know that

\cos 1000^o= \cos(1000^o - 720^o) =\cos 280^o

using the periodicity of \cos x. Next, since $\latex 280^o$ is in the fourth quadrant, we can use the reference angle to find an equivalent angle in the first quadrant:

\cos 1000^o = \cos 280^o = \cos(360^o - 80^o) = \cos 80^o

Finally, using the cofunction identity \cos x = \sin(90^o - x), we find

\cos 1000^o = \cos 80^o = sin(90^o - 80^o) = \sin 10^o.

In this way, the sine or cosine of any angle can be reduced to the sine or cosine of some angle between 0^o and $45^o = \pi/4$ radians. Since \pi/4 < 1, the above power series will converge reasonably rapidly.

green line

Step 10. For the final part of this review, let’s take a second look at the Taylor series

e^x = \displaystyle 1 + x + \frac{x^2}{2} + \frac{x^3}{3} + \frac{x^4}{4} + \frac{x^5}{5} + \frac{x^6}{6} + \frac{x^7}{7} + \dots

Just to be silly — for no apparent reason whatsoever, let’s replace x by ix and see what happens:

e^{ix} = \displaystyle 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} \dots + i \left[\displaystyle x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} \dots \right]

after separating the terms that do and don’t have an i.

Hmmmm… looks familiar….

So it makes sense to define

e^{ix} = \cos x + i \sin x,

which is called Euler’s formula, thus proving an unexpected connected between e^x and the trigonometric functions.

Reminding students about Taylor series (Part 4)

I’m in the middle of a series of posts describing how I remind students about Taylor series. In the previous posts, I described how I lead students to the definition of the Maclaurin series

f(x) = \displaystyle \sum_{k=0}^{\infty} \frac{f^{(k)}(0)}{k!} x^k,

which converges to f(x) within some radius of convergence for all functions that commonly appear in the secondary mathematics curriculum.

green line

Step 4. Let’s now get some practice with Maclaurin series. Let’s start with f(x) = e^x.

What’s f(0)? That’s easy: f(0) = e^0 = 1.

Next, to find f'(0), we first find f'(x). What is it? Well, that’s also easy: f'(x) = \frac{d}{dx} (e^x) = e^x. So f'(0) is also equal to 1.

How about f''(0)? Yep, it’s also 1. In fact, it’s clear that f^{(n)}(0) = 1 for all n, though we’ll skip the formal proof by induction.

Plugging into the above formula, we find that

e^x = \displaystyle \sum_{k=0}^{\infty} \frac{1}{k!} x^k = \sum_{k=0}^{\infty} \frac{x^k}{k!} = 1 + x + \frac{x^2}{2} + \frac{x^3}{3} + \dots

It turns out that the radius of convergence for this power series is \infty. In other words, the series on the right converges for all values of x. So we’ll skip this for review purposes, this can be formally checked by using the Ratio Test.

green line

At this point, students generally feel confident about the mechanics of finding a Taylor series expansion, and that’s a good thing. However, in my experience, their command of Taylor series is still somewhat artificial. They can go through the motions of taking derivatives and finding the Taylor series, but this complicated symbol in \displaystyle \sum notation still doesn’t have much meaning.

So I shift gears somewhat to discuss the rate of convergence. My hope is to deepen students’ knowledge by getting them to believe that f(x) really can be approximated to high precision with only a few terms. Perhaps not surprisingly, it converges quicker for small values of x than for big values of x.

Pedagogically, I like to use a spreadsheet like Microsoft Excel to demonstrate the rate of convergence. A calculator could be used, but students can see quickly with Excel how quickly (or slowly) the terms get smaller. I usually construct the spreadsheet in class on the fly (the fill down feature is really helpful for doing this quickly), with the end product looking something like this:

Taylor0

In this way, students can immediately see that the Taylor series is accurate to four significant digits by going up to the x^4 term and that about ten or eleven terms are needed to get a figure that is as accurate as the precision of the computer will allow. In other words, for all practical purposes, an infinite number of terms are not necessary.

In short, this is how a calculator computes e^x: adding up the first few terms of a Taylor series. Back in high school, when students hit the e^x button on their calculators, they’ve trusted the result but the mechanics of how the calculator gets the result was shrouded in mystery. No longer.

Then I shift gears by trying a larger value of x:

Taylor1

I ask my students the obvious question: What went wrong? They’re usually able to volunteer a few ideas:

  • The convergence is slower for larger values of x.
  • The series will converge, but more terms are needed (and I’ll later use the fill down feature to get enough terms so that it does converge as accurate as double precision will allow).
  • The individual terms get bigger until k=11 and then start getting smaller. I’ll ask my students why this happens, and I’ll eventually get an explanation like

\displaystyle \frac{(11.5)^6}{6!} < \frac{(11.5)^6}{6!} \times \frac{11.5}{7} = \frac{(11.5)^7}{7!}

but

\displaystyle \frac{(11.5)^{11}}{11!} < \frac{(11.5)^{11}}{11!} \times \frac{11.5}{12} = \frac{(11.5)^{12}}{12!}

At this point, I’ll mention that calculators use some tricks to speed up convergence. For example, the calculator can simply store a few values of e^x in memory, like e^{16}, e^{8}, e^{4}, e^{2}, and e^{1} = e. I then ask my class how these could be used to find e^{11.5}. After some thought, they will volunteer that

e^{11.5} = e^8 \cdot e^2 \cdot e \cdot e^{0.5}.

The first three values don’t need to be computed — they’ve already been stored in memory — while the last value can be computed via Taylor series. Also, since 0.5 < 1, the series for e^{0.5} will converge pretty quickly. (Some students may volunteer that the above product is logically equivalent to turning 11 into binary.)

At this point — after doing these explicit numerical examples — I’ll show graphs of e^x and graphs of the Taylor polynomials of e^x, observing that the polynomials get closer and closer to the graph of e^x as more terms are added. (For example, see the graphs on the Wikipedia page for Taylor series, though I prefer to use Mathematica for in-class purposes.) In my opinion, the convergence of the graphs only becomes meaningful to students only after doing some numerical examples, as done above.

green line

At this point, I hope my students are familiar with the definition of Taylor (Maclaurin) series, can apply the definition to e^x, and have some intuition meaning that the nasty Taylor series expression practically means add a bunch of terms together until you’re satisfied with the convergence.

In the next post, we’ll consider another Taylor series which ought to be (but usually isn’t) really familiar to students: an infinite geometric series.

P.S. Here’s the Excel spreadsheet that I used to make the above figures: Taylor.