Volume of solid of revolution

In Calculus I, we teach two different techniques for finding the volume of a solid of revolution:

  • Disks (or washers), in which the cross-section is perpendicular to the axis of revolution, and
  • Cylindrical shells, in which the cross-section is parallel to the axis of revolution.

Both of these could be expressed as either an integral with respect to x or as an integral with respect to y, depending on the axis of revolution. I won’t go into a full treatment of the procedure here; this can be found in places like http://www.cliffsnotes.com/math/calculus/calculus/applications-of-the-definite-integral/volumes-of-solids-of-revolution or http://mathworld.wolfram.com/SolidofRevolution.html or http://en.wikipedia.org/wiki/Disk_integration or http://en.wikipedia.org/wiki/Shell_integration.

A natural question asked by students is, “If I have the choice, should I use disks or shells?” The correct answer, of course, is “Pick the method that gives you the easier integral to compute.” But that’s not a very satisfying answer for novice students who’ve just been exposed to integral calculus. So, over the years, I developed a standard reply to this query:

That’s an excellent question, and it’s one of the classic conundrums faced by mankind over the years.

Should I choose Coke… or Pepsi?

McDonald’s… or Burger King?

Ginger… or Mary Ann?

Disks… or shells?

The answer is, it just takes a little practice and experience to determine which technique gives you the easier integral.

If you don’t get the cultural reference, here’s a reminder. As of 10 years ago, I could still tell this joke to college students and still get smiles of acknowledgement. But, given the passage of time, I’m not sure if this same joke would fly college students now.

Day One of my Calculus I class: Part 6

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I’ve told students that the topics in Calculus I build upon each other (unlike the topics of Precalculus), but that there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

I’ve then quickly used these themes to solve two completely different problems: (1) finding the speed of a falling object at impact and (2) finding the area under a parabola. I can usually cover these topics in less than 50 minutes, sometimes in 35 minutes. Again, because I’m not immediately holding my students responsible for the contents of this introduction, I feel freer to move a little quicker than I would otherwise in the hopes of showing the forest for all of the trees.

I then ask the obvious question: what do these two questions have to do with each other. One involves the distance-rate-time formula. The other involves the areas of rectangles. At first blush, these two questions seem completely unrelated. And at second blush. And at third blush.

I tell my class that these two apparently unrelated questions are indeed related by something called the Fundamental Theorem of Calculus. Somehow, the process of finding the area under a curve is intimately related to finding an instantaneous rate of change. I then make a bold, eye-catching statement: The Fundamental Theorem of Calculus is one of the greatest discoveries in the history of mankind, period. And, at the ripe old age of 17, 18, or 19 years old, my students are now privileged to understand this great accomplishment.

This ends my introduction to Calculus I. I’ll then begin the more mundane development of limits on the way to formally defining a derivative.

Day One of my Calculus I class: Part 5

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I’ve told students that the topics in Calculus I build upon each other (unlike the topics of Precalculus), but that there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

We are now trying to answer the following problem.

Problem #2. Find the area under the parabola f(x) = x^2 between x=0 and x=1.

Using five rectangles with right endpoints, we find the approximate answer of 0.44. With ten rectangles, the approximation is 0.385. With one hundred rectangles (and Microsoft Excel), the approximation is 0.33835. This last expression was found by evaluating

0.01[ (0.01)^2 + (0.02)^2 + \dots + (0.99)^2 + 1^2]

At this juncture, what I’ll do depends on my students’ background. For many years, I had the same group of students for both Precalculus and Calculus I, and so I knew full well that they had seen the formula for \displaystyle \sum_{k=1}^n k^2. And so I’d feel comfortable showing my students the contents of this post. However, if I didn’t know for sure that my students had at least seen this formula, I probably would just ask them to guess the limiting answer without doing any of the algebra to follow.

Assuming students have the necessary prerequisite knowledge, I’ll ask, “What happens if we have n rectangles?” Without much difficulty, they’ll see that the rectangles have a common width of 1/n. The heights of the rectangles take a little more work to determine. I’ll usually work left to right. The left-most rectangle has right-most x-coordinate of 1/n, and so the height of the leftmost rectangle is (1/n)^2. The next rectangle has a height of (2/n)^2, and so we must evaluate

\displaystyle \frac{1}{n} \left[ \frac{1^2}{n^2} + \frac{2^2}{n^2} + \dots + \frac{n^2}{n^2} \right], or

\displaystyle \frac{1}{n^3} \left[ 1^2 + 2^2 + \dots + n^2 \right]

I then ask my class, what’s the formula for this sum? Invariably, they’ve forgotten the formula in the five or six weeks between the end of Precalculus and the start of Calculus I, and I’ll tease them about this a bit. Eventually, I’ll give them the answer (or someone volunteers an answer that’s either correct or partially correct):

\displaystyle \frac{1}{n^3} \times \frac{n(n+1)(2n+1)}{6}, or \frac{(n+1)(2n+1)}{6n^2}.

I’ll then directly verify that our previous numerical work matches this expression by plugging in n=5, n= 10, and n = 100.

I then ask, “What limit do we need to take this time?” Occasionally, I’ll get the incorrect answer of sending n to zero, as students sometimes get mixed up thinking about the width of the rectangles instead of the number of rectangles. Eventually, the class will agree that we should send n to plus infinity. Fortunately, the answer \displaystyle \frac{(n+1)(2n+1)}{6n^2} is an example of a rational function, and so the horizontal asymptote can be immediately determined by dividing the leading coefficients of the numerator and denominator (since both have degree 2). We conclude that the limit is 2/6 = 1/3, and so that’s the area under the parabola.

Day One of my Calculus I class: Part 4

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I’ve told students that the topics in Calculus I build upon each other (unlike the topics of Precalculus), but that there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

I then applied these two themes to find the speed of a falling object at impact.

I now switch to a second, completely unrelated (or at least it seems completely unrelated) problem.

Problem #2. Find the area under the parabola f(x) = x^2 between x=0 and x=1.

I draw the picture and ask, “OK, what formula from geometry can we use for this one?” Stunned silence.

I say, “Of course you can’t do this yet. This is a curved thing. Back in high school geometry, you learned (with one exception) the areas of straight things. What straight things had area formulas in high school geometry?” I’ll always get rectangles and triangles as responses. Occasionally, someone will volunteer parallelogram or rhombus or kite.

So I ask the leading question, which of these shapes is easiest? Students always answer, “Rectangles.” Which then leads me to the next question: How can we approximate the area under a parabola with a bunch of rectangles?

Again, stunned silence. I let my students think about it for at least a minute, sometimes two minutes. Hopefully, one student will volunteer the answer that I want, though occasionally I’ll have to coax it out of them.

Eventually either a student volunteers (or else I tell the class) that we ought to use a bunch of thin rectangles. For starters, I’ll use five rectangles and a very rough sketch on the board.

RiemannSum

I’ll start with the right-most rectangle… what is its area? Students immediately see that the width is 1/5, but the length takes a little bit more thought. And I make my students figure it out without me giving them the answer. Eventually, someone notices that the height is simply f(1) = 1, so that the rightmost rectangle has an area of 0.2.

I then move to the rectangle that’s second to the right. This also has a width of 1/5, but the height is (0.8)^2 = 0.64. So the area is 0.128.

Eventually, we get that the sum of the areas is 0.008 + 0.032 + 0.072 + 0.128 + 0.2 = 0.44. Students can easily see that this is a decent approximation to the area under the parabola, but it’s a bit too large.

I then ask the same question that I had before: how can we get a better approximation? Students will usually volunteer either “More rectangles” or “Thinner rectangles,” which of course are logically equivalent. I then proceed with 10 equal-width rectangles. Occasionally, a student volunteers that perhaps we should use thinner rectangles only on the right side of the figure, which of course is a very astute observation. However, I tell my class that, for the sake of simplicity, we’ll stick with rectangles of equal width.

With ten rectangles (and I redraw the picture with ten thin rectangles), the approximation is quickly found to be

0.1 [ (0.1)^2 + (0.2)^2 + \dots + (0.9)^2 + 1^2] = 0.385

I like using ten rectangles, as that’s probably the largest number that can be handled in class without a calculator (until the very last step of adding up the areas).

By now, the class sees what the next steps are: take more and more rectangles. At this point, I’ll resort to classroom technology to make the process a little quicker. I personally prefer Microsoft Excel, though other software packages can be used for this purpose. For 100 rectangles, the class quickly sees that the sum of the rectangles is

0.01 [ (0.01)^2 + (0.02)^2 + \dots + (0.99)^2 +( 1.00)^2] = 0.33835

RiemannSum100

My class can see that the answer is still too large, but it’s certainly closer to the correct answer.

I’ll then tell the class that this is another example of passing to limits, the second theme of calculus. I’ll describe this more fully in the next post.

Day One of my Calculus I class: Part 3

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I’ve just told students that the topics in Calculus I build upon each other (unlike the topics of Precalculus), but that there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

We are now studying the following problem.

Problem #1. A building on campus is 144 feet tall. A professor takes a particularly annoying student to the top of the building, and throws him (or her) off to his (or her) certain demise. (Usually I pick a student that I know and like as the one to throw off the building. This became a badge of honor over the years.) The distance that the student travels (in feet) after t seconds is f(t) = 16t^2. How fast is the student going when he (or she) hits the concrete sidewalk?

At this point in the lecture, we have done some experimental numerical work with successfully smaller time intervals to find better and better approximations to the speed at impact.

  • With a time interval of length 3 seconds, the approximation is 48 ft/s.
  • With a time interval of length 1 seconds, the approximation is 80 ft/s.
  • With a time interval of length 0.5 seconds, the approximation is 88 ft/s.
  • With a time interval of length 0.1 seconds, the approximation is 94.4 ft/s.
  • With a time interval of length 0.01 seconds, the approximation is 95.84 ft/s.

I’ll then tell the class that this is an example of passing to limits, the second theme of calculus. By making the time intervals smaller and smaller, we get better and better approximations to the true speed at impact.

By this point, students realize that we’re getting better and better approximations… however, we’re probably not going to get the correct answer by just plugging in numbers. And we certainly can’t just take a time interval of 0 seconds since dividing by zero is a no-no.

Depending on my read of the class — on whether or not they’re ready for a little more abstraction — I’ll then ask the class, “How can we make these fractions without plugging in all of these numbers?” Usually students are at a loss at first. Perhaps someone will volunteer that we ought to introduce a variable… but, in my experience, even bright students at the start of calculus do not have this step of abstraction at the tips of their fingers. So I’ll lay out the fractions that we’ve studied so far, like

\displaystyle \frac{f(3) - f(2.9)}{0.1} \qquad and \qquad \displaystyle \frac{f(3)-f(2.99)}{0.01},

and ask, “How could we do this more systematically? Does anyone see a pattern in these fractions?” Hopefully someone will notice that the input of the second function call is 3 minus the denominator; if not, I’ll volunteer this observation to the class. So both of these fractions can be written as

\displaystyle \frac{f(3) - f(3-h)}{h},

where h is a small positive number. Let’s now simplify this fraction:

\displaystyle \frac{f(3) - f(3-h)}{h} = \displaystyle \frac{16(3)^2 - 16(3-h)^2}{h}

= \displaystyle \frac{144 - 16(9-6h+h^2)}{h}

= \displaystyle \frac{144 - 144 + 96h - 16h^2}{h}

= \displaystyle \frac{96h - 16h^2}{h}

= \displaystyle 96 - 16h.

The last step is permitted because h is assumed to be a nonzero number. I then check to see if the previous work matches this algebraic expression:

  • If h=1, then 96 - 16h = 80, matching the previous answer.
  • If h=0.1, then 96-16h = 94.8, matching the previous answer.

I then ask the class, what’s the ultimate goal with h? The answer: send h to zero. So we conclude that the velocity at impact is 96 - 16(0) = 96 ft/s, which is the final answer.

Reviewing, the curved thing was the changing speed of the falling object, which was approximated by the straight thing, the ordinary distance-rate-time formula. Finally, we passed to limits to find the real velocity at impact.

All of the above is eventually done more systematically later in the semester after the properties of derivatives have been more fully developed. However, I think that doing this calculation on the very first day of class gives my students a taste of what’s going to be happening in the days and weeks to come. Again, I emphasize that I probably cover this material in maybe 15-20 minutes, and that I don’t hold students immediately responsible for repeating such a calculation on their own. (I do hold them responsible for this, of course, after they know how to differentiate f(t) = 16 t^2.

Day One of my Calculus I class: Part 2

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I’ve just told students that the topics in Calculus I build upon each other (unlike the topics of Precalculus), but that there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

I then transition to applying these two themes to two different problems. Here’s the first.

Problem #1. A building on campus is 144 feet tall. A professor takes a particularly annoying student to the top of the building, and throws him (or her) off to his (or her) certain demise. (Usually I pick a student that I know and like as the one to throw off the building. This became a badge of honor over the years.) The distance that the student travels (in feet) after t seconds is f(t) = 16t^2. How fast is the student going when he (or she) hits the concrete sidewalk?

And then I ask my students how to solve this. Usually, they can come up with the first few ideas.

1. When the student hits the sidewalk and meet his/her demise? So we must solve 16t^2 = 144, so that t = \pm 3. (And I make sure that they remember that this quadratic equation has two roots.) The solution t = -3 is clearly extraneous, so the time elapsed until the student meets his/her demise is 3 seconds.

2. How fast is the student going after 3 seconds? Most students realize the inherent difficulty of this question because the student’s speed is increasing as he/she gets closer to the ground. Some students will volunteer the word “accelerate.”

At this point, I’ll volunteer that the changing speed is a curved thing. Back in pre-algebra, students were taught

\hbox{rate} = \hbox{distance} / \hbox{time}

under the assumption that the rate was constant. However, if the rate is changing, all bets are off.

Still, the question remains: how fast is the student moving after 3 seconds? How should we measure this? Usually, someone will suggest that we just divide 144 feet by 3 seconds, for a rate of 48 ft/sec. I then point out that this is an example of approximating a curved thing by a straight thing. The straight thing is the usual distance-rate-time formula, while the curved thing is the changing speed of the student as he/she falls. So the answer of 48 ft/sec is not the correct answer, but it’s an approximate answer.

This leads to the next question: is this estimate too high or too low? Unequivocally, students answer “too low” since the student travels the slowest at the start of the fall and the fastest at the end of the fall. So since this interval of 3 seconds includes the slower speeds at the start of the fall, the answer of 48 ft/sec will underestimate the speed at impact.

Which then leads to the next obvious question: How can we get a better approximation? I leave the question open-ended like this and take suggestions from the class. This often takes a while, and I’ll get a lot of creative (but bad) ideas. And that’s OK… the next step is hardly the most intuitive thing that immediately jumps to mind. I think that the process of keeping the answer unknown until someone volunteers the correct next step is worth it.

Eventually (though it might take a couple of minutes), somebody will suggest using a shorter time interval, like the distance traveled between t=2 and t=3. We see that f(2) = 64 and f(3) = 144, and so the new approximation is (144-64)/1 = 80 ft/s. I store these two approximations (48 ft/s with a time interval of 3 seconds and 80 ft/s with a time interval of 1 second in a table on the side of the chalkboard. The values derived below are entered in the table as they’re found.

I then note that the previous approximation was 48 ft/s, and then ask the class, “Do you think that 80 ft/s will be a better or worse approximation than 48 ft/s?” Invariably, they’ll say it’s a better approximation because the change in speed isn’t as great from t=2 to t=3 as from t=0 to t=3. I’ll then ask if they think that 80 ft/s is too high or too low. Again, they’ll answer too low for the same reason as before.

Then I ask the obvious next question, “How do we find a better approximation?” The class typically responds something to the effect of, “Take a smaller interval.” I ask for a suggestion, and I’ll usually get something like t=2.5 to t=3. We see that f(2.5)=100 ft/s and f(3) is still 144 ft/s, so that the new approximation is (144-100)/0.5 = 88 ft/s. Students will volunteer that this should be better than the previous two approximations but still less than the correct answer.

Then I do it again: “How do we find a better approximation?” The class typically respond, “Take an even smaller interval.” I suggest t=2.9 to t=3. We see that f(2.9)=134.56 ft/s (by this point, a calculator is certainly needed) and f(3) is still 144 ft/s, so that the new approximation is (144-134.56)/0.1 = 94.4 ft/s. If we do it again with t =2.99, we see that f(2.99) =143.0416 ft/s, for an approximation of (144-143.0416)/0.01 = 95.84 ft/s.

I turn to the class and ask, “Have we found the right answer yet?” They’ll answer “No” in unison, but they’ll note that the approximations are probably pretty good right now. Astute students will notice that the approximations appear to be “leveling off” to some final value.

I’ll then tell the class that this is an example of passing to limits, the second theme of calculus. By making the time intervals smaller and smaller, we get better and better approximations to the true speed at impact. In the next post, I’ll describe how I informally introduce the concept of a limit with this example.

Day One of my Calculus I class: Part 1

In this series of posts, I’d like to describe what I tell my students on the very first day of Calculus I. On this first day, I try to set the table for the topics that will be discussed throughout the semester. I should emphasize that I don’t hold students immediately responsible for the content of this lecture. Instead, this introduction, which usually takes 30-45 minutes, depending on the questions I get, is meant to help my students see the forest for all of the trees. For example, when we start discussing somewhat dry topics like the definition of a continuous function and the Mean Value Theorem, I can always refer back to this initial lecture for why these concepts are ultimately important.

I begin by noting the different topics that appear in Precalculus, which they should have taken in the recent past:

  • The definition of a function and an inverse function
  • Graphing polynomials and rational functions
  • Properties and applications of exponential and logarithmic functions
  • Trigonometry
  • Sequences and series

These different topics, when taught in Precalculus, really don’t talk to one another. With a couple of exceptions, it feels like five different units being squeezed into the same course. I’ll present a visual image of laying down an imaginary brick on the floor, and then laying down a second brick next to the first one, and so on. The above topics (with a couple of exceptions) really don’t build upon each other; they’re lateral to one another. In other words, these topics made the foundation necessary for the study of calculus. After all, the class was called Pre-Calculus.

Now that we’re in calculus, I tell my students, we’re going to have topics that build on this foundation, and the topics will build on each other. Continuing the building image, I’ll start laying imaginary bricks on the initial foundation, building vertically higher and higher, noting that the topics that we’ll see in Weeks 13 and 14 will ultimately be built upon the topics that we’ll talk about in Weeks 1 and 2. Unlike Precalculus, the topics in Calculus are explicitly interconnected, building up a body of thought from the foundation of Precalculus.

So the good news is that, unlike Precalculus, Calculus I will be an incrementally developed course from start to finish. The bad news, of course, is that Calculus I will be an incrementally developed course from start to finish. In Precalculus, if you didn’t particularly like one topic (say, logarithms), that really would not affect your success later on with a future topic (say, trigonometry). However, in Calculus, the whole course is put together from start to finish.

The good news is that while there are many interconnected topics in calculus, there are going to be two themes that run throughout the course:

  1. Approximating curved things by straight things, and
  2. Passing to limits

And we’re going to be applying these two themes again and again throughout the semester. (I wish I could take credit for synthesizing the topics of calculus into these two themes, but I learned this idea from my own calculus professor back in the mid-1980s.)

For the remainder of this first lecture, I show how these two themes apply to two completely different problems:

  1. Finding the speed of a falling object when it hits the ground.
  2. Finding the area under the curve y = x^2 between x = 0 and x = 1.

I’ll describe how I present these to new calculus students in the coming posts.

In-class demo: The binomial distribution and the bell curve

Many years ago, the only available in-class technology at my university was the Microsoft Office suite — probably Office 95 or 98. This placed severe restrictions on what I could demonstrate in my statistics class, especially when I wanted to have an interactive demonstration of how the binomial distribution gets closer and closer to the bell curve as the number of trials increases (as long as both np and n(1-p) are also decently large).

The spreadsheet in the link below is what I developed. It shows

  • The probability histogram of the binomial distribution for n \le 150
  • The bell curve with mean \mu = np and standard deviation \sigma = \sqrt{np(1-p)}
  • Also, the minimum and maximum values on the x-axis can be adjusted. For example, if n = 100 and p = 0.01, it doesn’t make much sense to show the full histogram; it suffices to have a maximum value around 5 or so.

In class, I take about 3-5 minutes to demonstrate the following ideas with the spreadsheet:

  • If n is large and both np and n(1-p) are greater than 10, then the normal curve provides a decent approximation to the binomial distribution.
  • The probability distribution provides exact answers to probability questions, while the normal curve provides approximate answers.
  • If n is small, then the normal approximation isn’t very good.
  • If n is large but p is small, then the normal approximation isn’t very good. I’ll say in words that there is a decent approximation under this limit, namely the Poisson distribution, but (for a class in statistics) I won’t say much more than that.

Doubtlessly, there are equally good pedagogical tools for this purpose. However, at the time I was limited to Microsoft products, and it took me untold hours to figure out how to get Excel to draw the probability histogram. So I continue to use this spreadsheet in my classes to demonstrate to students this application of the Central Limit Theorem.

Excel spreadhseet: binomial.xlsx

Fun lecture on geometric series (Part 2): Ways of counting money

Every once in a while, I’ll give a “fun lecture” to my students. The rules of a “fun lecture” are that I talk about some advanced applications of classroom topics, but I won’t hold them responsible for these ideas on homework and on exams. In other words, they can just enjoy the lecture without being responsible for its content.

This series of posts describes a fun lecture that I’ve given to my Precalculus students after they’ve learned about partial fractions and geometric series.

In the 1949 cartoon “Hare Do,” Bugs Bunny comes across the following sign when trying to buy candy (well, actually, a carrot) from a vending machine. The picture below can be seen at the 2:40 mark of this video: http://www.ulozto.net/live/xSG8zto/bugs-bunny-hare-do-1949-avi

BugsBunny20cents

How many ways are there of expressing 20 cents using pennies, nickels, dimes, and (though not applicable to this problem) quarters? Believe it or not, this is equivalent to the following very complicated multiplication problem:

\left[1 + x + x^2 + x^3 + x^4 + x^5 + \dots \right]

\times \left[1 + x^5 + x^{10} + x^{15} + x^{20} + x^{25} + \dots \right]

\times \left[1 + x^{10} + x^{20} + x^{30} + x^{40} + x^{50} + \dots \right]

\times \left[1 + x^{25} + x^{50} + x^{75} + x^{100} + x^{125} + \dots \right]

On the first line, the exponents are all multiples of 1. On the second line, the exponents are all multiples of 5. On the third line, the exponents are all multiples of 10. On the fourth line, the exponents are all multiples of 25.

How many ways are there of constructing a product of x^{20} from the product of these four infinite series? I offer a thought bubble if you’d like to think about it before seeing the answer.

green_speech_bubbleThere are actually 9 ways. We could choose 1 from the first, second, and fourth lines while choosing x^{20} from the third line. So,

1 \cdot 1 \cdot x^{20} \cdot 1 = x^{20}

There are 8 other ways. For each of these lines, the first term comes from the first infinite series, the second term comes from the second infinite series, and so on.

1 \cdot x^{10} \cdot x^{10} \cdot 1 = x^{20}

1 \cdot x^{20} \cdot 1 \cdot 1 = x^{20}

x^{10} \cdot 1 \cdot x^{10} \cdot 1 = x^{20}

x^5 \cdot x^{15} \cdot 1 \cdot 1 = x^{20}

x^{10} \cdot x^{10} \cdot 1 \cdot 1 = x^{20}

x^5 \cdot x^{15} \cdot 1 \cdot 1 = x^{20}

x^{20} \cdot 1 \cdot 1 \cdot 1 = x^{20}

x^5 \cdot x^5 \cdot x^{10} \cdot 1 = x^{20}

The nice thing is that each of these expressions is conceptually equivalent to a way of expressing 20 cents using pennies, nickels, dimes, and quarters. In each case, the value in parentheses matches an exponent.

  • 1 \cdot 1 \cdot x^{20} \cdot 1 = x^{20}: 2 dimes (20 cents).
  • 1 \cdot x^{10} \cdot x^{10} \cdot 1 = x^{20}: 2 nickels (10 cents) and 1 dime (10 cents)
  • 1 \cdot x^{20} \cdot 1 \cdot 1 = x^{20}: 4 nickels (20 cents)
  • x^{10} \cdot 1 \cdot x^{10} \cdot 1 = x^{20}: 10 pennies (10 cents) and 1 dime (10 cents)
  • x^{15} \cdot x^5 \cdot 1 \cdot 1 = x^{20}: 15 pennies (15 cents) and 1 nickel (5 cents)
  • x^{10} \cdot x^{10} \cdot 1 \cdot 1 = x^{20}: 10 pennies (10 cents) and 2 nickels (10 cents)
  • x^5 \cdot x^{15} \cdot 1 \cdot 1 = x^{20}: 5 pennies (5 cents) and 3 nickels (15 cents)
  • x^{20} \cdot 1 \cdot 1 \cdot 1 = x^{20}: 20 pennies (20 cents)
  • x^5 \cdot x^5 \cdot x^{10} \cdot 1 = x^{20}: 5 pennies (5 cents), 1 nickel (5 cents), and 1 dime (10 cents)

Notice that the last line didn’t appear in the Bugs Bunny cartoon.

green lineUsing the formula for an infinite geometric series (and assuming -1 < x < 1), we may write the infinite product as

f(x) = \displaystyle \frac{1}{(1-x)(1-x^5)(1-x^{10})(1-x^{25})}

When written as an infinite series — that is, as a Taylor series about x =0 — the coefficients provide the number of ways of expressing that many cents using pennies, nickels, dimes and quarters. This Taylor series can be computed with Mathematica:

generating1Looking at the coefficient of x^{20}, we see that there are indeed 9 ways of expressing 20 cents with pennies, nickels, dimes, and quarters. We also see that there are 242 of expressing 1 dollar and 1463 ways of expressing 2 dollars.

The United States also has 50-cent coins and dollar coins, although they are rarely used in circulation. Our answers become slightly different if we permit the use of these larger coins:

generating2Finally, just for the fun of it, the coins in the United Kingdom are worth 1 pence, 2 pence, 5 pence, 10 pence, 20 pence, 50 pence, 100 pence (1 pound), and 200 pence (2 pounds). With these different coins, there are 41 ways of expressing 20 pence, 4563 ways of expressing 1 pound, and 73,682 ways of expressing 2 pounds.

generating3

green line

For more discussion about this application of generating functions — including ways of determining the above coefficients without Mathematica — I’ll refer to the 1000+ results of the following Google search:

https://www.google.com/search?q=pennies+nickles+dimes+quarters+%22generating+function%22

FYI, previous posts on an infinite geometric series:

https://meangreenmath.com/2013/09/16/formula-for-an-infinite-geometric-series-part-9

https://meangreenmath.com/2013/09/17/formula-for-an-infinite-geometric-series-part-10

https://meangreenmath.com/2013/09/18/formula-for-an-infinite-geometric-series-part-11

Previous posts on Taylor series:

https://meangreenmath.com/2013/07/01/reminding-students-about-taylor-series-part-1/

https://meangreenmath.com/2013/07/02/reminding-students-about-taylor-series-part-2/

https://meangreenmath.com/2013/07/03/giving-students-a-refresher-about-taylor-series-part-3/

https://meangreenmath.com/2013/07/04/giving-students-a-refresher-about-taylor-series-part-4/

https://meangreenmath.com/2013/07/05/reminding-students-about-taylor-series-part-5/

https://meangreenmath.com/2013/07/06/reminding-students-about-taylor-series-part-6/

Fun lecture on geometric series (Part 1): Generating functions

Every once in a while, I’ll give a “fun lecture” to my students. The rules of a “fun lecture” are that I talk about some advanced applications of classroom topics, but I won’t hold them responsible for these ideas on homework and on exams. In other words, they can just enjoy the lecture without being responsible for its content.

This series of posts describes a 50-minute fun lecture — on the topic of generating functions — that I’ve given to my Precalculus students after they’ve learned about partial fractions and geometric series.

To launch the topic: In the 1949 cartoon “Hare Do,” Bugs Bunny comes across the following sign when trying to buy candy (well, actually, a carrot) from a vending machine. The picture below can be seen at the 2:40 mark of this video: http://www.ulozto.net/live/xSG8zto/bugs-bunny-hare-do-1949-avi

BugsBunny20cents

Notice that the price of candy from vending machines have increased somewhat since 1949. (Elsewhere in the cartoon, the price of a ticket to the movies was listed as 55 cents for adults, 20 cents for children, and 10 cents for rabbits.)

I wasn’t alive in 1949, but I vividly remember seeing this essentially mathematical problem while watching cartoons after school in the late 1970s. Now that I’m a little older — and can freeze-frame the above sign — I can see that the animators actually missed one way of expressing 20 cents. More on that later.

green line

Definition. The generating function of a sequence is defined to be an infinite series whose coefficients match the sequence.

Example #1. Consider the (boring) sequence 1, 1, 1, 1, \dots. The generating function for this sequence is

f(x) = 1 + 1x + 1x^2 + 1x^3 + \dots

If -1 < x < 1, then f(x) = \displaystyle \frac{1}{1-x}, using the formula for an infinite geometric series.

Example #2. For the slightly less boring sequence of 1, -1, 1, -1, \dots, the generating function is

f(x) = 1 - x + x^2 - x^3 + \dots,

which (if -1 < x < 1) is f(x) = \displaystyle \frac{1}{1+x}.

Example #3. Suppose a_n = \displaystyle {10 \choose n} if $0 \le n \le 10$ and a_n = 0 for n>10. Then the generating function is

f(x) = \displaystyle \sum_{n=0}^{10} {10 \choose n} x^n = (x+1)^{10}.

It turns out that the above problem from the Bugs Bunny cartoon can be viewed as a generating function. Let a_n denote the number of ways that n cents can be formed using pennies, nickels, dimes, and quarters? The Bugs Bunny cartoon is related to the value of a_{20}. What about one dollar? Two dollars? I’ll provide the answer in tomorrow’s post.

green line

FYI, previous posts on an infinite geometric series:

https://meangreenmath.com/2013/09/16/formula-for-an-infinite-geometric-series-part-9

https://meangreenmath.com/2013/09/17/formula-for-an-infinite-geometric-series-part-10

https://meangreenmath.com/2013/09/18/formula-for-an-infinite-geometric-series-part-11