Calculators and complex numbers (Part 19)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Over the past few posts, we developed the following theorem for computing e^z in the case that z is a complex number.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Example. Find all complex numbers z so that e^z = 5.

Solution. If z = x + iy, then

e^x (\cos y + i \sin y) = 5 (\cos 0 + i \sin 0)

Matching parts, we see that e^x = 5 and that the angle y must be coterminal with 0 radians. In other words,

x = \ln 5 \qquad and \qquad y = 2\pi n for any integer n.

Therefore, there are infinitely many answers: z = \ln 5 + 2 \pi n i.

Notice that there’s nothing particularly special about the number 5. This could have been any nonzero number, including complex numbers, and there still would have been an infinite number of solutions. (This is completely analogous to solving a trigonometric equation like \sin \theta = 1, which similarly has an infinite number of solutions.) For example, the complex solutions of the equation

e^z = -2 - 2i

are z = \ln 2\sqrt{2} - \displaystyle \frac{3\pi}{4} + 2 \pi n i.

These observations lead to the following theorems, which I’ll state without proof.

Theorem. The range of the function f(z) = e^z is \mathbb{C} \setminus \{ 0 \}.

Theorem. e^z = e^w \Longleftrightarrow z = w + 2\pi n i.

Naturally, these conclusions are different than the normal case when z is assumed to be a real number.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 18)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

To begin, we recall that the trigonometric form of a complex number z = a+bi is

z = r(\cos \theta + i \sin \theta) = r e^{i \theta}

where r = |z| = \sqrt{a^2 + b^2} and \tan \theta = b/a, with \theta in the appropriate quadrant. As noted before, this is analogous to converting from rectangular coordinates to polar coordinates.

Definition. If z is a complex number, then we define

e^z = \displaystyle \sum_{n=0}^{\infty} \frac{z^n}{n!}

This of course matches the Taylor expansion of e^x for real numbers x.

In the last few posts, we proved the following theorem.

Theorem. If z and w are complex numbers, then $e^z e^w = e^{z+w}$.

This theorem allows us to compute e^z without directly plugging into the above infinite series.

Theorem. If z = x + i y, where x and y are real numbers, then

e^z = e^x (\cos y + i \sin y)

Proof. With the machinery that’s been developed over the past few posts, this one is actually a one-liner:

e^z = e^{x+iy} = e^x e^{iy} = e^x (\cos y + i \sin y).

For example,

e^{4+\pi i} = e^4 (\cos \pi + i \sin \pi) = -e^4

Notice that, with complex numbers, it’s perfectly possible to take e to a power and get a negative number. Obviously, this is impossible when using only real numbers.

Another example:

e^{-2+3i} = e^{-2} (\cos 3 +i \sin 3)

In this answer, we have to remember that the angle is 3 radians and not 3 degrees.

green line

For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

 

 

Calculators and complex numbers (Part 17)

In this series of posts, I explore properties of complex numbers that explain some surprising answers to exponential and logarithmic problems using a calculator (see video at the bottom of this post). These posts form the basis for a sequence of lectures given to my future secondary teachers.

Definition. If z is a complex number, then we define

e^z = \displaystyle \sum_{n=0}^{\infty} \frac{z^n}{n!}

Even though this isn’t the usual way of defining the exponential function for real numbers, the good news is that one Law of Exponents remains true. (At we saw in an earlier post in this series, we can’t always assume that the usual Laws of Exponents will remain true when we permit the use of complex numbers.)

Theorem. If z and w are complex numbers, then e^z e^w = e^{z+w}.

In yesterday’s post, I gave the idea behind the proof… group terms where the sums of the exponents of z and w are the same. Today, I will formally prove the theorem.

The proof of the theorem relies on a principle that doesn’t seem to be taught very often anymore… rearranging the terms of a double sum. In this case, the double sum is

e^z e^w = \displaystyle \sum_{n=0}^{\infty} \sum_{k=0}^{\infty} \frac{z^n}{n!} \frac{w^k}{k!}

This can be visualized in the picture below, where the x-axis represents the values of k and the y-axis represents the values of n. Each red dot symbolizes a term in the above double sum. For a fixed value of n, the values of k vary from 0 to \infty. In other words, we start with n =0 and add all the terms on the line n = 0 (i.e., the x-axis in the picture). Then we go up to n = 1 and then add all the terms on the next horizontal line. And so on.

double sum 1

I will rearrange the terms as follows: Let j = n+k. Then for a fixed value of j, the values of k will vary from 0 to j. This is perhaps best described in the picture below. The value of j, the sum of the coordinates, is constant along the diagonal lines below. The value of k then changes while moving along a diagonal line.

Even though this is a different way of adding the terms, we clearly see that all of the red circles will be hit regardless of which technique is used for adding the terms.

double sum 2

In this way, the double sum \displaystyle \sum_{n=0}^\infty \sum_{k=0}^\infty gets replaced by \displaystyle \sum_{j=0}^\infty \sum_{k=0}^j. Since n = j-k, we have

e^z e^w = \displaystyle \sum_{j=0}^{\infty} \sum_{k=0}^{j} \frac{z^{j-k}}{(j-k)!} \frac{w^k}{k!}

We now add a couple of j! terms to this expression for reasons that will become clear shortly:

e^z e^w = \displaystyle \sum_{j=0}^{\infty} \sum_{k=0}^{j} \frac{j!}{j!} \frac{1}{k! (j-k)!} w^k z^{j-k}

Since j! does not contain any ks, it can be pulled outside of the inner sum on k. We do this for the j! in the denominator:

= \displaystyle \sum_{j=0}^\infty \frac{1}{j!} \sum_{k=0}^j \frac{j!}{k!(j-k)!} w^k z^{j-k}

We recognize that \displaystyle \frac{j!}{k! (j-k)!} is a binomial coefficent:

= \displaystyle \sum_{j=0}^\infty \frac{1}{j!} \sum_{k=0}^j {j \choose k} w^k z^{j-k}

The inner sum is recognized as the formula for a binomial expansion:

= \displaystyle \sum_{j=0}^\infty \frac{1}{j!} (w+z)^j

Finally, we recognize this as the definition of e^{w+z}, using the dummy variable j instead of n. This proves that e^z e^w = e^{z+w} even if z and w are complex.

Without a doubt, this theorem was a lot of work. The good news is that, with this result, it will no longer be necessary to explicitly use the summation definition of e^z to actually compute e^z, as we’ll see tomorrow.

green line For completeness, here’s the movie that I use to engage my students when I begin this sequence of lectures.

Non-geometric infinite series (Part 12)

I conclude this series of posts with thoughts about infinite series which use reciprocals of positive integers. I offer this post for the enrichment of talented Precalculus students who have exhibited mastery of geometric series.

Geometric. As we’ve discussed at length, the series

1 + \displaystyle \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \dots

converges and is in fact equal to 2.

Harmonic. Including the reciprocals of all positive integers is called a harmonic series:

1 + \displaystyle \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \dots

As shown in the link to the MathWorld website, this series actually diverges, even though the terms get smaller and smaller.

So we’ve made an observation: if too many reciprocals are included, the series diverges. But if we take enough of them away, then we can still end up with a series that is infinite but converges.

Squares. Let’s now consider the reciprocals of perfect squares:

1 + \displaystyle \frac{1}{4} + \frac{1}{9} + \frac{1}{16} + \frac{1}{25} + \dots

Clearly, we’ve taken away a lot of the terms of the harmonic series? Have we taken enough away so that the series converges? It turns out that the answer is yes. And the answer is precisely what you’d think it should be (not): \pi^2/6. This is just another way that the circumference of a circle has an odd way of appearing in the most unexpected of places.

The proof that this series equals \pi^2/6 requires the clever use of Parseval’s theorem from Fourier analysis.

Fourth Powers. Let’s now turn to the reciprocals of fourth powers:

1 + \displaystyle \frac{1}{16} + \frac{1}{81} + \frac{1}{256} + \frac{1}{625} + \dots

By the Direct Comparison Test and the series for reciprocals of squares, this series converges. Using Parseval’s theorem, it can be shown that the answer is \pi^4/90.

Cubes. Now let’s investigate the reciprocals of cubes:

1 + \displaystyle \frac{1}{8} + \frac{1}{27} + \frac{1}{64} + \frac{1}{125} + \dots

Again by the Direct Comparison Test and the series for reciprocals for squares, this series must converge. This sum is called Apéry’s constant.  However, and amazingly, no one knows what the answer is. Of course, a computer can be programmed to evaluate this series to as many decimal places as desired. According to Wikipedia, this sum was evaluated to over 100 billion decimal places in 2010. However, to the best of my knowledge, no one has figured out if there’s a simple way of writing the answer, like \pi^2/6 or \pi^4/90.

So if you figure out a simple way to evaluate Apéry’s constant, feel free to call me collect.

The previous four series are example of Riemann’s zeta function, which is of central importance in number theory and is the focus of the celebrated Riemann Hypothesis, for which a solution is worth a cool $1 million.

Primes. Now let’s consider the reciprocals of primes:

\displaystyle \frac{1}{2} + \frac{1}{3} + \frac{1}{5} + \frac{1}{7} + \frac{1}{11} + \dots

As noted above, the harmonic series diverges, but if we remove enough terms from the harmonic series, then it’s possible to make an infinite series that converges. So the central question is, did we remove enough fractions (by taking away all of the composite denominators) so that the series converges?

Surprisingly, the answer is no: the sum of the reciprocals of the primes actually diverges. The proof actually requires a graduate-level class in analytic number theory.

green line

By no means would I expect high school students to master all of the above facts. As noted above, the subject of this post is mostly for the enrichment of high school students who have mastered infinite geometric series.

That said, students who know the following facts from Precalculus will be well-served when they reach calculus and other university-level mathematics courses.

  • They should either know the formula for an infinite geometric series or else be able to quickly derive it.
  • They should know that not every infinite geometric series is geometric.
  • They should know that not every infinite series converges.
  • They should be familiar with the meaning of the terms converge and diverge.

Formula for an infinite geometric series (Part 11)

Many math majors don’t have immediate recall of the formula for an infinite geometric series. They often can remember that there is a formula, but they can’t recollect the details. While it’s I think it’s OK that they don’t have the formula memorized, I think is a real shame that they’re also unaware of where the formula comes from and hence are unable to rederive the formula if they’ve forgotten it.

In this post, I’d like to give some thoughts about why the formula for an infinite geometric series is important for other areas of mathematics besides Precalculus. (There may be others, but here’s what I can think of in one sitting.)

1. An infinite geometric series is actually a special case of a Taylor series. (See https://meangreenmath.com/2013/07/05/reminding-students-about-taylor-series-part-5/ for details.) Therefore, it would be wonderful if students learning Taylor series in Calculus II could be able to relate the new topic (Taylor series) to their previous knowledge (infinite geometric series) which they had already seen in Precalculus.

2. An infinite geometric series is also a special case of the binomial series (1+x)^n, when n does not have to be a positive integer and hence Pascal’s triangle cannot be used to find the expansion.

3. Infinite geometric series is a rare case when an infinite sum can be found exactly. In Calculus II, a whole battery of tests (e.g., the Root Test, the Ratio Test, the Limit Comparison Test) are introduced to determine whether a series converges or not. In other words, these tests only determine if an answer exists, without determining what the answer actually is.

Throughout the entire undergraduate curriculum, I’m aware of only four types of series that can actually be evaluated exactly.

  • An infinite geometric series with -1 < r < 1
  • The Taylor series of a real analytic function. (Of course, an infinite geometric series is a special case of a Taylor series.)
  • A telescoping series. For example, using partial fractions and cancelling a bunch of terms, we find that

\displaystyle \sum_{k=1}^\infty \frac{1}{k^2+k} = \displaystyle \sum_{k=1}^\infty \left( \frac{1}{k} - \frac{1}{k+1} \right)

\displaystyle \sum_{k=1}^\infty \frac{1}{k^2+k} = \displaystyle \left( 1 - \frac{1}{2} \right) + \left( \frac{1}{2} - \frac{1}{3} \right) \dots

\displaystyle \sum_{k=1}^\infty \frac{1}{k^2+k} = 1

4. Infinite geometric series are essential for proving basic facts about decimal representations that we often take for granted.

5. Properties of an infinite geometric series are needed to find the mean and standard deviation of a geometric random variable, which is used to predict the number of independent trials needed before an event happens. This is used for analyzing the coupon collector’s problem, among other applications.

Formula for an arithmetic series (Part 7)

As we’ve discussed, the formula for an arithmetic series is

S_n = \displaystyle \frac{n}{2} (2a_1 + [n-1] d) = \displaystyle \frac{n}{2} (a_1 + a_n),

where n is the number of terms, a_1 is the first term, d is the common difference, and a_n is the last term. This formula may be more formally expressed as

S = \displaystyle \sum_{k=1}^n a_k = \displaystyle \frac{n}{2} (2a_1 + [n-1] d) = \displaystyle \frac{n}{2} (a_1 + a_n)

For homework and on tests, students are asked to directly plug into this formula and to apply this problem with word problems, like finding the total number of seats in an auditorium with 50 rows, where there are 12 seats in the front row and each row has two more seats than the row in front of it.

In my opinion, the ability to solve questions like the one below is the acid test for determining whether a student — who I assume can solve routine word problems like the one above — really understands series or is just familiar with series. In other words, if a student can solve routine word problems but is unable to handle a problem like the one below, then there’s still room for that student’s knowledge of series to deepen.

Calculate \displaystyle \sum_{k=11}^{60} (5k - 2)

There are two reasonable approaches for solving this problem.

Solution #1. Notice that 5k - 2 = 5(k-1) + 5 - 2 = 3 + 5(k-1). So this is really an arithmetic series whose first term is 3 and whose common difference is 5. Therefore,

S = \displaystyle \sum_{k=1}^{60} a_k = \displaystyle \frac{60}{2} (2[3] + [60-1] 5)=9030

However, I’m supposed to start the series on k=11, not k=1. That means that I need to subtract off the first ten terms of the above series. Now

S = \displaystyle \sum_{k=1}^{10} a_k = \displaystyle \frac{10}{2} (2[3] + [10-1] 5)= 255

Finally,

\displaystyle \sum_{k=11}^{60} a_k = \displaystyle \sum_{k=1}^{60} a_k - \displaystyle \sum_{k=1}^{10} a_k = 9030 - 255 = 8775

green line

Solution #2. Writing out the terms, we see that

\displaystyle \sum_{k=11}^{60} (5k - 2) = (5[11]-2) + (5[12]-2) + \dots + (5[60]-2)

or

\displaystyle \sum_{k=11}^{60} (5k - 2) = 53+58 + \dots +298

The right-hand side is an arithmetic series whose “first” term is 53 and whose last (50th) term is 298. Therefore,

\displaystyle \sum_{k=11}^{60} (5k - 2) = \frac{50}{2} (53+298) = 8775

green line

Of the two solutions, I suppose I have a mild preference for the first, as the second solution won’t work for something like \displaystyle \sum_{k=11}^{60} k^2. However, both solution demonstrate that the student is actually thinking about the meaning of the series instead of just plugging numbers in a formula, and so I’d be happy with either one in a Precalculus class.

Formula for an arithmetic series (Part 6)

In the previous posts of this series, I described two methods of deriving the formula

\displaystyle \sum_{k=1}^n k = \frac{n(n+1)}{2}

The first method concerned reversing the terms of the sum (or, almost equivalently, taking the terms in pairs). The second method used mathematical induction.

Mathematical induction can be applied to arithmetic series as well as other series. However, the catch is that you have to know the answer before proving that the answer actually is correct. By contrast, the first method did not require us to know the answer in advance — it just fell out of the calculation — but it cannot be applied to series that are not arithmetic.

Here’s a third method using the principle of telescoping series. This method has the strengths of the previous two methods: it does not require us to know the answer in advance, and it can also be applied to some other series which are not arithmetic.

To begin, consider the sum

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2]

At this early point, students often object, “Where did that come from?” I’ve said it before but I’ll say it again: I tell them my usual tongue-in-cheek story that this idea comes from the patented Bag of Tricks. Socrates gave the Bag of Tricks to Plato, Plato gave it to Aristotle, it passed down the generations, my teacher taught the Bag of Tricks to me, and I teach it to my students.

In any event, I will evaluate this sum in two different ways.

Step 1. Just write out the terms of the series, starting from k=1 and ending with k =n.

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = [1^2 - 0^2] + [2^2 - 1^2] + [3^2 - 2^2] + \dots + [n^2 - (n-1)^2]

Notice that, on the right-hand side, the 1^2 terms cancel, the 2^2 terms cancel, and so on. In fact, almost everything cancels. The only two terms that aren’t cancelled are the 0^2 and n^2 terms. Therefore,

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = n^2 - 0^2 = n^2

Step 2. Next, we’ll rewrite the original sum by expanding out the terms inside of the sum:

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = \displaystyle \sum_{k=1}^n [k^2 - (k^2 -2k + 1)]

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = \displaystyle \sum_{k=1}^n [2k-1]

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = \displaystyle \sum_{k=1}^n 2k - \displaystyle \sum_{k=1}^n 1

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = 2\displaystyle \sum_{k=1}^n k - \displaystyle \sum_{k=1}^n 1

Step 3. Of course, these different looking answers from Steps 1 and 2 have to be the same, so let’s set them equal to each other:

2\displaystyle \sum_{k=1}^n k - \displaystyle \sum_{k=1}^n 1 = n^2

There is one unknown in this equation, \displaystyle \sum_{k=1}^n k. The second sum is just the constant 1 added to itself n times, and so \displaystyle \sum_{k=1}^n 1 = n. Therefore, we solve for the unknown:

2 \left(\displaystyle \sum_{k=1}^n k \right) - n = n^2

2 \left(\displaystyle \sum_{k=1}^n k \right) = n^2 + n

\displaystyle \sum_{k=1}^n k = \displaystyle \frac{n^2 + n}{2}

green lineThe beauty of this approach is that this approach can be continued. For example, to obtain \displaystyle \sum_{k=1}^n k^2, we begin with

\displaystyle \sum_{k=1}^n [k^3 - (k-1)^3]

Step 1. By telescoping series,

\displaystyle \sum_{k=1}^n [k^3 - (k-1)^3] = n^3 - 0^3 = n^3

Step 2. Using the binomial theorem,

\displaystyle \sum_{k=1}^n [k^3 - (k-1)^3] = \displaystyle \sum_{k=1}^n [k^3 - (k^3 -3k^2+3k- 1)]

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = 3\displaystyle \sum_{k=1}^n k^2 - 3\displaystyle \sum_{k=1}^n k + \displaystyle \sum_{k=1}^n 1

\displaystyle \sum_{k=1}^n [k^2 - (k-1)^2] = 3\displaystyle \sum_{k=1}^n k^2 - 3\left( \frac{n(n+1)}{2} \right) + n

Step 3. Setting these two expressions equal to each other,

3\displaystyle \sum_{k=1}^n k^2 - 3\left( \frac{n(n+1)}{2} \right) + n= n^3

And we eventually conclude that:

\displaystyle \sum_{k=1}^n k^2 = \displaystyle \frac{n(n+1)(2n+1)}{6}

And then this could be continued to obtain closed-form expressions for higher exponents of k.