# Monthly Archives: May 2012

## Function Composition

Here’s a paraphrase of a project I’ve assigned to algebra and precalculus classes over the years.  I initially found it years ago in Student Research Projects in Calculus by Marcus Cohen, et al.

Given $f(x)=\frac{1}{x}$ and $g(x)=1-x$.  Functions f and g can be composed with themselves and each other in many ways, but only a finite number of unique functions will result.

• How many functions can result from these compositions?
• Give an algebraic form of each unique function and convince me that you know you have found them all.

That’s it.

I typically allow them to work in small groups of 2 or 3 to test and refine their arguments.  Following are three different successful approaches my students have used over the years.  I’d love to hear of any other approaches.

SOLTUION ALERT! — Don’t read any further if you want to solve this problem on your own.

METHOD 1:  Composition Chains

Ignoring subtle domain differences, most discover $f(f(x))=g(g(x))=x$.  Some then realize that in any random composition sequence of any number of fs and gs, whenever two of the same function are side-by-side in the composition, those letters “cancel out.”  They conclude from this that any new functions after f, g, and $f(f(x))=g(g(x))=x$ must result from alternating fs and gs.  Generating the function list from there gives:

1. $\displaystyle f(x)=\frac{1}{x}$
2. $\displaystyle g(f(x))=1-\frac{1}{x}=\frac{x-1}{x}$
3. $\displaystyle f(g(f(x)))=\frac{x}{x-1}$
4. $\displaystyle g(f(g(f(x))))=1-\frac{x}{x-1}=\frac{-1}{x-1}$
5. $\displaystyle f(g(f(g(f(x)))))=1-x=g(x)$
6. $\displaystyle g(f(g(f(g(f(x))))))=x$
7. $\displaystyle f(g(f(g(f(g(f(x)))))))=\frac{1}{x}=f(x)$

But the last line repeats the first, so there are only 6 functions possible.  Starting with g produces the same chain in a different order.

METHOD 2:  Charts

The next most commonly submitted approach begins with a chart with f and g on the first row and compositions of each in successive rows.  When a previously identified function is encountered, that branch of the chart can be considered terminated as the compositions of that function have already been charted.  As every new function is composed in every way possible, when no new functions appear, you know you have found them all.

As with METHOD 1, compositions in this chart are computed by applying f or g to the existing functions, and not the other way around.  Only 6 unique functions are found in the chart.

METHOD 3:  Circles

A few years ago, one group produced the following argument.  It is equivalent to the chart approach in METHOD 2 with the $f(f(x))=g(g(x))=x$ recognition of METHOD 1.  This approach more elegantly captures the cycling nature of the functions.  Because the circle is closed, the only functions are the six shown.

The function listed between each arrow pairing is the function applied to the existing expression.

Technology, Algebra, and other Implications

A colleague at my school, LG, once said there are only two parts to every math problem:  1) Show that your answer is correct, and 2) Show that no other answers are correct.  Historically, my students have been 100% convinced that there are only six functions long before they think of a way to prove there are only six.   This project requires students to use some level of creativity to establish the second point–an organizational skill I fear we don’t target often enough in pre-collegiate mathematics.

Once the basics of function composition are understood, this project grants a tremendous amount of initial success to students.  Their errors tend to be overstatements of the number of unique functions (most typically 7 or 8), and almost always because they fail to identify different forms of functions h, k, and sometimes j from METHODS 2 and 3.  Sometimes I have permitted CAS for the project, but even there, students are required to recognize equivalent forms.  As noted below, a CAS can give different algebraic forms of an expression, depending on how it is derived.  Precious few understand their CAS functionality well enough to attempt the Boolean comparison I used in the last step to obtain $k(x)$.

So, permitting technology on this project typically has eased student concerns, but it still doesn’t do all of the work for them.

As an extension, I’ve sometimes asked students to state the domains of the functions they derive.  This is a bit of a thorny question as the domains of each function depend on the order of the compositions used to derive them, and as METHOD 3 suggests, there are an infinite number of ways to arrive at each of the six functions.  Most students end up stating the domains of the functions according to the composition order they used to find each function.  I keep waiting for a group to see and describe the composition order dependency, but that hasn’t happened yet.  Even so, I’ve found this to be a great project to inspire mathematical reasoning.  I hope some of you find something in it for your classes.

## Extending Multiplication to Algebra and Calculus

In my earlier post on a multiplication trick for young learners, I forgot to include a higher level connection, so I’ll do that here.

LEVEL 6:  Advanced Algebra or Calculus.
Part of what makes this problem work out so nicely is that the sums of the numbers involved in the lists are constant, an omnipresent property of position-symmetric terms from any arithmetic sequence.  That is, given any arithmetic sequence of sufficient length (e.g., {1, 2, 3, 4, 5, 6, 7, 8}), the first and last terms (1 & 8) will always have the same sum as the terms just inside those (2 & 7), the next terms inside (3 & 6), and so forth until you run out of terms.  This property can be proved for any arithmetic sequence with introductory algebra.

Here’s the advanced math connection.  Given all pairs of numbers which add to some constant sum, k, what is the relationship between the pair of these numbers whose product is maximum?

Let the two numbers be X and Y where $X+Y=k$.  We want to find the maximum of the product $X\cdot Y=X\cdot (k-X)$.  If you recognize this last expression as a quadratic function, $f(X)=X\cdot (k-X)$, then you can use the location of the vertex of a parabola (algebra) or some calculus (find the zero of $\displaystyle\frac{df}{dX}$) to see that the maximum of f occurs at $\displaystyle X=\frac{k}{2}=Y$.

Complicated math aside, this means that when you have a list of pairs of numbers that all add to the same constant, the pair with the biggest product is always the pair of numbers closest in proximity to each other.  In the context of this problem, this explains why the inner products of any arithmetic sequence are always larger than the products of the first and last terms.

## Multiplication Puzzle 2 for the Very Young

A former student of mine, Paul Sperduto, is currently teaching 5th grade math in Houston as part of Teach for America.  After reading yesterday’s post on inspiring multiplication in young learners, he responded with the following story.  I reprint it here (with Paul’s permission) for two reasons:  to give another fun math game for parents and teachers to use with eager young learners, AND to show what can happen when young people have the freedom to think and explore (whether explicitly designed or personally re-claimed as in Paul’s case).

Here’s Paul’s story in his own words with occasional commentary from me in brackets.

I use a similar multiplication “trick” with my students, and I think it is setting them up very well to learn and understand applications for the difference of squares down the road. It’s actually something I randomly happened into in about 3rd grade (I was one of those elementary school kids who knew his times tables before I even started 1st grade, so I had a lot of math class time to think about stuff like this…), but I didn’t really understand why until I was much, much older.

[As I’ve noted earlier, it is far more important for younger learners to play the game.  Finding a pattern you think others have overlooked is far more motivating for young people than knowing why the trick works.]

I told my students that I could mentally multiply any two numbers between 1 and 31 in under five seconds as long as the numbers have an even difference. For example, I can multiply $23\cdot 27$ in under five seconds since $27-23=4$, but I can’t do $23\cdot 26$ that quickly because $26-23=3$.

[This is a glorious hook!  From experience, many students will jump at a claim like this.  Part of the game becomes trying to find two numbers the teacher can’t handle.  Learning = game = fun.]

When they asked me how I do it, I told them that if they memorize their squares (I have mine memorized through 30), they can do it too. This was surprisingly motivational, and I quickly had many students with a lot of squares memorized, eager to learn how to use them.

[This is what happens when you make learning FUN.  Even seemingly dry topics like memorizing squares of numbers becomes a worthwhile endeavor when it has an entertaining purpose.  Students are willing to engage in what they perceive to be drudgery if there is a payoff.]

The trick lies in the difference of two squares formula, $A^2 - B^2 = (A+B)*(A-B)$. Given the example of multiplying 23 and 27, it is easy to see that 25 would be the mean of the two numbers–each is 2 away from 25. So if A is the mean of the numbers, and B is the distance to the mean from each, the difference of squares formula gives us the answer to the problem:

$27\cdot 23 = (25+2)\cdot (25-2) = 25^2 - 2^2 = 625 - 4 = 621$

That last step is easy once you’ve memorized the squares.  So as long as you do this and are good with generally simple subtraction, this trick is very easy.

It’s been fun trying to help them discover this one. We started by noticing patterns near the squares on a standard multiplication chart. They noticed that all squares have another multiplication that gives one less than the square. For example $6\cdot 8=7^2-1$ and $10\cdot 12=11^2-1$. Working our way along the diagonals of the chart, they also discovered that each square has a multiplication that gives 4 less than the square ($5\cdot 9 =7^2-4$), 9 less than the square ($4\cdot 10= 7^2-9$) and 16 less than the square ($3\cdot 11=7^2-16$). It took a little prodding, but they figured out that the differences are just the squares, and it was all downhill from there.

[Here’s another thought:  I suspect participants typically make these problems easier on the “performer” while thinking they’re doing just the opposite.  Many likely think giving two bigger numbers to multiply would be a harder task because the algorithms they typically are required to use in school become longer, if not more challenging, when longer numbers are employed.  But using two larger numbers under Paul’s approach probably makes the value of B smaller in most cases, simplifying the final subtraction.

Thank you, Paul, for sharing.]

## Funny math

Here’s some math humor if you like such things.

From Twitter:  A mathematician ate a big meal and afterwards said $\sqrt{\frac{-1}{64}}$.

What is $\int{3(ice)^2 d(ice)}$ ?

Good answer:  $(ice)^3$ = An ice cube
Better answer:  $(ice)^3+C$ = An iceberg

What is $\int{\frac{1}{cabin} d(cabin)}$ ?

Good answer:  A log cabin
Better answer:  A natural log cabin
Best answer:  A houseboat

Here’s my favorite coffee mug–a gift from a former student.

And in homage to a Humphrey Bogart line, this is a great t-shirt I received years ago from a former student.

I welcome any others you want to leave.

## Multiplication Puzzle for the Very Young

I just read a recent post on NRICH Mathematics that asked readers or students to list four consecutive whole numbers and compare the products of the outer pair of numbers in the list to the product of the inner pair.  For example, if you used the list {4, 5, 6, 7}, you would have $4\cdot 7=28$ and $5\cdot 6=30$.  Nothing particularly exciting seems to be here, but try another list of four consecutive whole numbers.  Grab a calculator if you want to be particularly daring or obnoxious with the members in your list.  Do you notice anything now?

I argue the beauty of mathematics as the “science of patterns” kicks in after you find these products for a few different lists.

LEVEL 1:  For the very young who are just learning to multiply, I think this is a GRAND problem.  No proof required.  It’s just crazy cool that those two products always have the same relationship.  Allowing calculators to permit young explorers to try lists beyond their ability to hand or mentally compute enhances the mystery, in my opinion.

I just played this with my eldest daughter.  She first wrote {19, 20, 21, 22} when I asked her for a list of consecutive numbers.  When I then asked her for the products, she asked if she could use a smaller list.  She opted for {3, 4, 5, 6} and {1, 2, 3, 4} without seeing the pattern.  When I offered a calculator for her original list, she got 418 & 420.  Surprised that they were so close, she said, “Wow, they’re only 2 apart!” I asked if that happened other times.  She looked at her simpler two lists and exclaimed, “Cool!”  I asked if that always happened.  She said, “No.  It couldn’t.”  When I asked for a list where it wouldn’t, she suggested {401, 402, 403, 404}.  The outer product was 162004.  You should have seen her face after she pressed enter on the inner product to get 162006.  “Maybe it does always work!”  Then she asked if she could move on to clean her desk.  Game over … for now.

Part of the power and beauty of mathematics lies in showing that patterns are universal and aren’t limited to numbers we can manipulate quickly in our heads.  I think calculators added to my daughter’s wonder.  I’d love to see my daughter going up to one of her teachers, posing the problem, and predicting the answer without ever knowing the numbers the teacher (or anyone else) had picked.  I think I’d smile even bigger if she had a calculator at hand to offer the adult some “help” if needed!  Math is magical.  Play it up!

LEVEL 2a:  Extend to all integers.  NRICH suggests that the lists need to be whole numbers.  That just isn’t true.  You can start with any integer.  My eldest has been playing with adding negative numbers lately, so I may see if she’s interested in multiplication of negatives.  I’ll think about how to make that idea make sense to her.  At some point in the future, I’ll bring this problem up again and she’ll get an even bigger kick out of seeing that it doesn’t just apply to ordinary and ridiculously large numbers, but negatives, too.

LEVEL 2b:  Proof for the very young.  The NRICH site offers two solutions from “students”.  Whether she’s real or fictional, the approach “Alison” uses is one that I think some sophisticated young learners could grasp long before they learn what a variable is.  Granted, the geometric understanding of multiplication technically works only for specific (not generic) products, but if you set up a few of these, your young one might start to see how the areas grow as the list numbers grow, but the differences in the areas remain constant.

NOTE:  LEVELS 2a and 2b, in my mind, are pretty interchangeable, depending on the readiness and interest of your young learners.  As with all things for young people, throw out the line.  If the interest isn’t there, save the idea for another day.  If you get a nibble, prepare to play!!!

LEVEL 3:  Extend to any arithmetic sequence.  The suggestions NRICH makes for extending the problem all dance around the idea that this property works for any list of four consecutive elements of any arithmetic sequence.  The difference between the two products depends solely on the common difference of the sequence and is completely independent of the initial term in the sequence.  Try {1.1, 1.2, 1.3, 1.4}.  The difference in the outer and inner pair products will be the same as for {98.8, 98.9, 99.0, 99.1} simply because both lists increase by 0.1.

LEVEL 4:  Algebra.  Those who remember their algebra classes may have jumped right to an algebraic justification.  That’s what I did, and that’s the solution “Charlie” gives on the original NRICH post.  In a way, I think I cheated myself out of seeking the pattern as my daughter discovered it.  Whenever your young ones are ready to deal with the magic and power of variables, try out proving this for integers.  When they’re ready for more, prove it for all arithmetic sequences with any initial term.  You’ll know they’re strong when they can argue on their own why the initial term is irrelevant.

LEVEL 5:  More Algebra.  This “trick” extends to to any arithmetic sequence of any length.  With algebra, one can determine a formula for the difference between the products of the last terms and the next-to-last terms.  I think a talented middle school student or young high school student who knows how to handle very generic cases could find that formula.

And it all starts with playing with some little numbers.

## Polar Graphing Surprise

Nurfatimah Merchant and I were playing around with polar graphs, trying to find something that would stretch students beyond simple circles and types of limacons while still being within the conceptual reach of those who had just been introduced to polar coordinates roughly two weeks earlier.

We remembered that Cartesian graphs of trigonometric functions are much more “interesting” with different center lines.  That is, the graph of $y=cos(x)+3$ is nothing more than a standard cosine graph oscillating around $y=3$.

Likewise, the graph of $y=cos(x)+0.5x$ is a standard cosine graph oscillating around $y=0.5x$.

We teach polar graphing the same way.  To graph $r=3+cos(2\theta )$, we encourage our students to “read” the function as a cosine curve of period $\pi$ oscillating around the polar function $r=3$.  Because of its period, this curve will complete a cycle in $0\le\theta\le\pi$.  The graph begins this interval at $\theta =0$ (the positive x-axis) with a cosine graph 1 unit “above” $r=3$, moving to 1 unit “below” the “center line” at $\theta =\frac{\pi}{2}$, and returning to 1 unit above the center line at $\theta =\pi$.  This process repeats for $\pi\le\theta\le 2\pi$.

Our students graph polar curves far more confidently since we began using this approach (and a couple extensions on it) than those we taught earlier in our careers.  It has become a matter of understanding what functions do and how they interact with each other and almost nothing to do with memorizing particular curve types.

So, now that our students are confidently able to graph polar curves like $r=3+cos(2\theta )$, we wondered how we could challenge them a bit more.  Remembering variable center lines like the Cartesian $y=cos(x)+0.5x$, we wondered what a polar curve with a variable center line would look like.  Not knowing where to start, I proposed $r=2+cos(\theta )+sin(\theta)$, thinking I could graph a period $2\pi$ sine curve around the limacon $r=2+cos(\theta )$.

There’s a lot going on here, but in its most simplified version, we thought we would get a curve on the center line at $\theta =0$, 1 unit above at $\theta =\frac{\pi}{2}$, on at $\theta =\pi$, 1 unit below at $\theta =\frac{3\pi}{2}$, and returning to its starting point at $\theta =2\pi$.  We had a very rough “by hand” sketch, and were quite surprised by the image we got when we turned to our grapher for confirmation.  The oscillation behavior we predicted was certainly there, but there was more!  What do you see in the graph of $r=2+cos(\theta )+sin(\theta)$ below?

This looked to us like some version of a cardioid.  Given the symmetry of the axis intercepts, we suspected it was rotated $\frac{\pi}{4}$ from the x-axis.  An initially x-axis symmetric polar curve rotated $\frac{\pi}{4}$ would contain the term $cos(\theta-\frac{\pi}{4})$ which expands using a trig identity.

$\begin{array}{ccc} cos(\theta-\frac{\pi}{4})&=&cos(\theta )cos(\frac{\pi}{4})+cos(\theta )cos(\frac{\pi}{4}) \\ &=&\frac{1}{\sqrt{2}}(cos(\theta )+sin(\theta )) \end{array}$

Eureka!  This identity let us rewrite the original polar equation.

$\begin{array}{ccc} r=2+cos(\theta )+sin(\theta )&=&2+\sqrt{2}\cdot\frac{1}{\sqrt{2}} (cos(\theta )+sin(\theta )) \\ &=&2+\sqrt{2}\cdot cos(\theta -\frac{\pi}{4}) \end{array}$

And this last form says our original polar function is equivalent to $r=2+\sqrt{2}\cdot cos(\theta -\frac{\pi}{4})$, or a $\frac{\pi}{4}$ rotated cosine curve of amplitude $\sqrt{2}$ and period $2\pi$ oscillating around center line $r=2$.

This last image shows a cosine curve starting at $\theta=\frac{\pi}{4}$ beginning $\sqrt{2}$ above the center circle $r=2$, crossing the center circle $\frac{\pi}{2}$ later at $\theta=\frac{3\pi}{4}$, dropping to $\sqrt{2}$ below the center circle at $\theta=\frac{5\pi}{4}$, back to the center circle at $\theta=\frac{7\pi}{4}$ before finally returning to the starting point at $\theta=\frac{9\pi}{4}$.  Because the radius is always positive, this also convinced us that this curve is actually a rotated limacon without a loop and not the cardioid that drove our initial investigation.

So, we thought we were departing into some new territory and found ourselves looking back at earlier work from a different angle.  What a nice surprise!

One more added observation:  We got a little lucky in guessing the angle of rotation, but even if it wasn’t known, it is always possible to compute an angle of rotation (or translation in Cartesian) for a sum of two sinusoids with identical periods.  This particular topic is covered in some texts, including Precalculus Transformed.

So here’s another musing I had on a beach visit. I don’t recall where I learned this trick, but I’ve had it for decades.  I suspect most of you already know how you can multiply by 9 using your fingers, but I’ll briefly explain just in case.  An extension follows.

Start by laying out both hands with all fingers outstretched.  Number your fingers from 1 to 10 from left to right.

To compute $latex 9*n$ for integer values of $latex n$ between 1 and 10, fold down the $latex n^{th}$ finger and count the number of still-extended fingers before and after the folded finger. Thinking of those two numbers as a two-digit number gives your answer. For example, to compute $latex 9*9$, fold down the $latex 9^{th}$ finger as shown below.

Because there are 8 fingers before the fold and 1 after, $latex 9*9=81$. Simple.

On the beach, I recalled…

View original post 370 more words

## Tangent Perspectives

I assigned AP Calculus BC 1975 problem #7 to my class a couple weeks ago.  I got a 100% legitimate answer I didn’t expect from a student, so I thought I’d share.  It’s what can happen when you encourage students to follow their instincts.

Paraphrasing, the students first had to find an equation of a line through the origin tangent to the graph of $y=ln(x)$.  Most had no problems concluding that this was $\displaystyle y=\frac{x}{e}$.

The next part asked if the tangent was above or below $y=ln(x)$.  In class, we had discussed why the position of tangent lines was dependent on the underlying function’s concavity, so I fully expected successful solutions to end up at $\displaystyle y''=\frac{-1}{x^2}$ which is negative for all $x\neq 0$ therefore making the original curve concave down and the tangent line above.  Most successful solutions did this, but one was different.

Paraphrasing M’s work, he concluded that if the tangent line was entirely on one side, then $\displaystyle g(x)=\frac{x}{e}-ln(x)$ must have an extremum.  From there, $\displaystyle g'(x)=\frac{1}{e}-\frac{1}{x}=0$ confirms the tangency point at $x=e$ from earlier, but this time as a critical point on g.  From here, he concluded that $\displaystyle g''(x)=\frac{1}{x^2}>0$ for all $x\neq 0$ making his critical point a global minimum.  From the construction of g, the tangent line then had to be above $y=ln(x)$.

Admittedly, M’s algebra work took a bit longer, but what impressed me was his completely different visualization of the problem.  I’m betting he didn’t remember the down-concavity-means-tangent-above factoid from class, so he had to invent his own approach.  And he did this by turning a concavity problem into an optimization problem.  Nice.

## CAS-ing a triangle

Check out this fun little problem from @daveinstpaul.

I’m sure there is a much more elegant solution, but given my technology interests, I thought this would be a cool way to incorporate CAS.  Based on Dave’s restrictions, the following angle measures apply.

There are many ways to write equations from this setup, several of which are identical forms of the same information.  One way to keep from writing dependent equations is to use combinations.  Using only the smallest triangles, you get

2A+Z=180
2X+Y=180
2W+V=180

From the top two triangles, one relationship is  A+Y=180. Because the large triangle is isosceles, the bottom two triangles give X+V=W.  There’s no convenient way to combine the top and bottom triangle.

Combining all three triangles, one relationship is X+W+Z=180.

That’s a system of 6 equations in 6 variables which Wolfram Alpha solves to give A=45 degrees.

I’d love to see a non-algebraic approach.

## Amazing Number Puzzle

Here’s an amazing puzzle I’ve used for over a decade.  I got it from a chemistry colleague (thanks, Penney!).  It has absolutely enthralled folks of all ages from 2nd & 3rd graders up through adults of all ages.

The basic idea of the puzzle is that you have the following two 4×4 grids of numbers containing every integer from 1 to 8 exactly four times.

The two grids are copied front-and-back on a single page, folded, and have three vertical cuts made in the center of the grid.

The goal of the puzzle is to fold it into a flat 2×2 grid so that every instance of a single number shows on one side. There are only two rules:

1. You are not ever permitted to tear the puzzle.
2. Once any fold is complete, the only creases on the puzzle will be the pre-existing vertical and horizontal folds between the initial rows and columns.

In short:  It is possible to create every 2×2 grid without altering the original 4×4 grid.

Detailed instructions for creating the puzzle are at the end of this post.  The next section shows how the puzzle works.

### playing the game

This short video shows how the puzzle works.

Remember:

• For each integer 1 to 8, the puzzle can be folded into a flat 2×2 grid with only that integer showing.
• Folds are permitted only along the given horizontal and vertical lines.
• Don’t tear or cut the puzzle beyond the setup shown below.
• Most people find numbers 1 to 6 the easiest to discover.  Number 7 is a bit more challenging for most, but it uses the same types of folds as the previous numbers.  Warning:  The folds for 8 are different, but no additional creases or tearing are required.

### Creating the puzzle Grid

This 2-page puzzle document is formatted to align the 4×4 grids perfectly if you print or copy two-sided.  I strongly suggest copying it onto cardstock or some heavier weight paper.  If creases on the puzzle start to tear from use, a strip of clear tape on the worn crease usually is sufficient to repair the damage without restricting the puzzle’s flexibility.

The next two links give the formatted puzzle document and a short video showing how to fold and cut the puzzle.

### extending the puzzle Grid

Any good math problem can be varied.  Here are two thoughts I’ve had.

1. After you play with the puzzle, you realize that the numbers are irrelevant.  You can change them to any images you like without affecting the puzzle play.
2. I don’t know how many different solvable arrangements there are, but there are certainly more.  Some much simpler arrangements can be created that don’t require any center cuts.  I don’t think I know enough topology to know how to answer this number of solutions question.  I welcome and obviously will credit any insights.