Showing posts with label recursive functions. Show all posts
Showing posts with label recursive functions. Show all posts

Sunday, March 16, 2008

At r% interest compounded annually, 400ドル earns 63ドル.05 interest in 3 years. r = ?? Developing Greater "Interest" in Algebra...

SILLY RIDDLE OF THE WEEK
Why were the Romans so good at algebra?

You have to think outside the box and be in the mood for this groaner! Of course you've probably seen this elsewhere on the web...

It's been awhile since we've worked on financial math applications. Anyone recall those 3 mortgage investigations from last year? [Note: To see other mortgage/finance posts, click on the mortgage label/tag in the sidebar].
Considering the current economic situation, perhaps we should devote more attention in our math classes to the subtle trap of running up credit card debt. I'm working on that. There are strong mathematical similarities between loans, mortgages and investments and in this investigation students will focus on the investment problem in the title of this post.


The Problem in the Title of this Post:
At r% compounded annually, 400ドル earns 63ドル.05 interest over 3 years. What is the value of r?
Let's agree, that r% has already been converted to a decimal so that we do not have to work with r/100 in the formulas below. That is, if r = 10% for example, we will work with r = 0.1.


OVERVIEW OF ACTIVITY
We will first consider a quick estimate of the interest rate by using simple interest to approximate compound interest. This develops sense about the formulas and could be helpful if a question like this appears as a multiple choice question on the SATs or other standardized tests. We will then apply standard compound interest formulas to validate our estimate. Students will be asked to use more than one method for this. Finally, there will be an extension for your students to try.
----------------------------------------------------------------------------------------------------
KEY for this activity (not necessarily standard notation)
[Assume one interest period per year; no additional money deposited or withdrawn]

P = original amount invested (principal)
r = annual rate of interest (decimal form)
n = number of years
An = Amount original money is worth after n years
In = Interest earned during the nth year
Tn = Total Interest earned over n years
-----------------------------------------------------------------------------------------------------
Background for Simple vs. Compound Interest

Simple: Interest each year is constantly Pr so total interest for n years is Tn = Prn.
Example: If 400ドル is invested at 10% annually simple interest, then over 3 years one would earn (400)(0.1)(3) = 120ドル in interest.

Compound Interest
Example: Suppose 400ドル is compounded annually at 10%.
1st year: Interest earned = I1 = (400)(0.1) = 40ドル; money is now worth A1 = 440ドル.
2nd year: Interest earned = I2 = (440)(0.1) = 44ドル; A2 = 484ドル
In general:
A1 = P + Pr = P(1+r)
A2 = P(1+r) + rP(1+r) = P(1+r) (1+r) = P(1+r)2
(*) An = P(1+r)n

Beginning of Activity
I. Approximating the Rate using Simple Interest:
If the total interest over 3 years is about 63,ドル show that r = 0.05 is a reasonable estimate for our problem using the simple interest formula above.

II. Using Compound Interest Formula
There are several approaches to solving the title problem:

Method I: Use the above compound interest formula (*) directly to solve for r.
Remember: The formula expresses An but it's the total interest, Tn that's given.

Method II: Derivation of Related Formulas

(a) Show that or explain why the total interest earned after n years can be expressed as
Tn = P[(1+r)n - 1].
(b) Use the formula in (a) to solve for r in our problem. Here you will be substituting the values for n, P and In first, then solve for r.
(c) Alternate Approach: Use the formula in (a) to derive a general formula for r in terms of n, P and In. Then use this formula to find the value for r in our problem. When do you think it makes more sense to use (b)? (c)?

Extension
In the above problem, we knew what the total interest was after 3 years and we needed to manipulate a formula to determine the rate. In other applications, we might want to determine the interest earned each year. This is usually done for us by our bank -- we certainly need this amount for federal and state income taxes. We will now derive the formula for In by two different methods:

(a) Derive a formula for In using the fact that In = An - An-1, for n = 1,2,3,...

(b) Derive a formula for In using the following pattern:
I1 = rA0 = rP = rP(1+r)0
I2 = rA1 = rP(1+r)1
....
In general: In = ____________.
Note: This formula makes sense. Why? Can you show that the results in (a) and (b) are equivalent?

(c) For the original problem in the title of this post, complete the following table:

n................An....................In
0...............400ドル...............

1...............400ドル...............40ドル

2

3
.
.
.
10


Comments:

  • The instructor may choose to use this activity to develop recursive functions. For example, An = (1+r)⋅An-1
  • The chart above can be generated using the graphing calculator of course. More importantly, ask students to discover relationships among the columns.
  • Much of the above is standard 'stuff' and not very challenging. However, the goal here is to help our students develop a feel for these formulas, rather than mechanically 'plugging in.' Considering that this topic is related to exponential functions, recursive thinking, and geometric sequences, there is unlimited potential for bringing more financial math into the algebra or precalculus classroom. And, yes, it's all standards-based...

Wednesday, June 20, 2007

Take any number, Add Three, Divide the Result by -1. Now Repeat this! Recursive Sequences and Functions Part I: Grades 7-12

Here is the link to the Carnival of Math Edition X.

The following is the first in a series of investigations in recursive sequences and functions for middle school and secondary students. This apparently advanced topic is accessible to prealgebra students at an introductory level. The first few parts of the investigation below are appropriate for the younger students. The remaining parts require more algebraic facility and reasoning. The problem in the title of this post doesn't begin until more than halfway down the page (after some background is developed). Do not skip the background below since it's referred to frequently in the activity. My personal experience is that this topic is highly engaging to students. Considering the connection between recursion and fractals, this topic is certainly part of most standards-based curricula. The terminology of recursion (recursively-defined sequences, recursive description, recursive function, recurrence relations, etc.) is quite confusing at first. Many confuse these ideas with iteration, a general term for describing repetitive algorithms.
Finally, from a pedagogical point of view, please note how the Rule of Four is implemented in the activity below: We start with a verbal description of the rule of formation of a sequence (in natural language), followed by a concrete numerical representation of the terms, followed by symbolic representation. One could also depict the terms graphically on a number line or in the coordinate plane if the function model is used for the sequence.
----------------------------------------------------------
I should probably save this for the new school year but it's hard for me to suppress ideas when they begin to crystallize. I've been thinking for some time about how we can introduce recursive functions in prealgebra through advanced algebra and beyond. I enjoy taking sophisticated ideas and reducing them to basic principles, then developing lessons that explore the topic in some depth. Moreover, this particular topic reveals the interconnectedness of mathematics in a particularly elegant and beautiful way.

Background (Needed for the Investigation Below!)
Consider the sequence 1,2,4,8,...
Elementary students can generally guess the most likely value for the next term, 16. They also are expected to identify the 'rule' of forming the 'next' term, namely doubling or multiplying by 2. This is an important stage in their development of algebraic reasoning - abstraction or generalization. In addition, they should begin to recognize that the terms of the sequence can be described generally as powers of 2, even though a formal introduction to exponents normally begins in 7th grade.
Middle school students should progress to the function table format of a sequence:
n.....an
1.....1
2....2
3....4
4....8
5....16
...

Elementary and middle school students should be able to verbalize in natural language that 'you double the terms'. As educators, we need to lead them to a more formal relationship by a line of Socratic questioning like: "Double what? To get what?" Students should then be able to express the idea that each term is twice the previous term. We can ask, "Which term doesn't follow that rule?"
To symbolically describe this sequence, we can write:
a1 = 1
an+1 = 2 ⋅ an, n = 1,2,3,...
This is known as a recursive description of the sequence. Try it - replace n by 1,2, and 3 and see if it produces the terms above.
[Note: Later on, in more advanced algebra, students should be able to express this as a recursive function: f(1) = 1; f(n+1) = 2f(n), n = 1,2,3,...]

The closed or general form requires a knowledge of exponents but is accessible to 7th graders
an = 2n-1, n = 1,2,3,... Try it!
(If you're questioning my sanity (you wouldn't be the first!) about introducing such sophisticated mathematics to general 7th graders, well, I do have a legitimate basis for this curricular decision - more later...).

Powers lend themselves naturally to a recursive description and this is why I begin with the above example. Recursive thinking develops when we ask questions like:
If we know what 25 is, how would we obtain 26?
To deepen this understanding further:
If we know what 298 is, how would we obtain 2100?
Does the exponent key on a calculator help students see these relationships? Not really! The calculator is useful to demonstrate powers and exponents but not for this discussion. Later on, the graphing calculator can be used to enter recursively-defined functions (after they've learned the ideas!).

If you're very familiar with recursively defined sequences and functions, you've probably left this page already! However, the idea of an operation or function being defined in terms of itself is a beautiful and very important notion in mathematics. This type of thinking was necessary for Mandelbrot to develop the notion of fractals, which defines a process in which each stage is defined in terms of the preceding stage or stages - that is recursive thinking!

Ok, by now you're wondering what happened to the title of this blog!
THE PROBLEM:
TAKE ANY NUMBER, ADD THREE, DIVIDE (OR MULTIPLY) THE RESULT BY -1. NOW REPEAT THIS SEQUENCE OF OPERATIONS ON THE RESULT YOU OBTAINED.

Student Activity:
1. Start with the number 6 and follow the instructions above. Repeat this 2 more times. List the first 4 terms of the sequence obtained. Write a brief description of what you observe about this sequence.
2. This time start with a different integer. Again, list the first 4 terms of the sequence obtained and your observations.
3. By now you've concluded that the sequence obtained will alternate in the form a,b,a,b,...
Which one of the original operations (add 3, multiply result by -1, etc.) do you believe is causing the sequence to repeat like this?

The remaining parts require algebra background.

4. If the first term is x, verify algebraically that the sequence will alternate.
5. You've now determined that the sequence appears to be repeating but not constant like a,a,a,a,... For what value of x, the first term, will the sequence be constant, i.e., all terms will have the same value?
6. Write a recursive definition (refer to how we did this for powers) for our sequence whose first term is x. We'll start you off:
a1 = ____
an = __________, n = _______
7. BACKGROUND
The algebraic formulation of the recursive description in #6 was fairly straightforward, since it is just a symbolic representation of the verbal "Take any number, add three, then divide the result by -1." As useful as this may be, we often a need a general formula for the nth term as a function of n, rather than in terms of preceding terms of the sequence. That last sentence was fairly complex, so here's an illustration:
Let's assume the first term is 6. Then the nth term can be described as:
an = 6 if n = 1,3,5,7,... (i.e., n is odd)
an = -9 if n = 2,4,6,... (i.e., n is even).
This would allow us to find any particular term, say the 100th term, without knowing the values of preceding terms. Such a description is known as a general description or the closed form of the sequence. Such a formula is often very hard to determine, whereas the recursive form is easier to formulate. In our problem, the general formula for the nth term had to be given in two cases or piecewise as mathematicians term it.
It is possible to give a single formula for all of the terms of our sequence as a function of n:
an = -7.5(-1)n - 1.5, n = 1,2,3,...
Verify this formula
for our sequence above: 6,-9,6,-9,6,-9,...
8. Change the original problem to:
Take any number, add 2 to it and multiply the result by -1. Repeat.
(a) Starting with an original value of 6 (as the first term), list the first 5 terms of the sequence.
(b) Write a recursive description for this sequence.
(c) Write a piecewise formula for the nth term as in the background example above.
(d) Write a single formula (closed form) for the nth term in terms of n for this sequence.

9. (More Challenging)
A sequence is defined verbally by:
Take any number, add k to it and multiply the result by -1.
(a) If the first term is x, write a recursive description for this sequence.
(b) Write a piecewise formula for the nth term.
(c) (Super Challenge) Write a single formula (closed form) for the nth term in terms of n for this sequence.




Monday, February 12, 2007

A Number Theory Problem for 2-12-07: Mission Impossible?

PLS READ THE COMMENTS TO SEE HOW THE LESSON FARED OVER TWO DAYS. DO YOU THINK I HAD TO MODIFY IT A LITTLE OR A LOT TO MAINTAIN THEIR INTEREST?

Thanks to jd2718 for motivating me to include the following famous number-theory conundrum. You can find many references to it on the web but I remember it from the classic text by Hardy and Wright. Give this as a challenge bonus problem or as an activity for your middle or high schoolers. Revise and modify it to make it appropriate for your students. I've tried to turn this into something students can at least attempt, but you could probably make it much more user-friendly...
Remember: My goal is to provide meaningful activities for ALL of your students, not only for honors or accelerated classes. The challenge is to modify them for students who struggle in math. The real test comes when I implement today's problem in my 'skills' class to which I frequently refer. That is my plan -- I'll let you know if it worked or was a disaster! Pls note that these activities also provide practice for those open-ended types of questions that now frequently appear on standardized and state assessments.
Finally, I hope you enjoy these challenges, but my primary target audience is students. I am really interested in reading students' reactions to these.

MISSION IMPOSSIBLE?
Now, boys and girls, we know that, despite all attempts by the most famous mathematicians, no one has yet devised a formula for primes. At one time, it was thought that 2^p-1 would always be prime if p is prime:
2^2-1 = 3; 2^3-1 = 7; 2^5-1 = 31; 2^7-1 = 127 -- all primes. But alas, 2^11-1 - 2047 = (23)(89). Imagine the disappointment!
But I think I found a method that will produce primes EVERY time! If you can do all parts below and prove I'm wrong, you get 5 bonus points. You'll get at least one point for doing part (a).

Ok, I decided to start with my favorite prime 41, since that's the age I once was!
41 + 2 = 43
43 + 4 = 47
47 + 6 = 53
53 + 8 = 61
61 + 10 = 71
71 + 12 = 83
...
Here's your mission:
(a) I listed the first 6 and they're all prime. You can see the pattern, right? Keep the sequence going until you reach 40 numbers. Check that they are all prime by researching a list of primes on the web. So, am I right? Am I famous now?
(b) My method is easy to see but harder to describe algebraically. Here's one way:
To get each number in the list after the first, you can see that I added the next even number to the preceding term. SHOW that the following recursive description produces the first 6 terms:
a(1) = 41; a(n+1) = a(n) + 2n, n = 1,2,3,... where the notation a(n) refers to the nth term. Then explain why this will generate all the terms.
(c) This one is harder but I'll give you a hint: Devise a polynomial that will generate this sequence of numbers when n = 1,2,3,....
Hint: Think of a quadratic like n^2 +.... Just remember, when n is replaced by 1 it has to yield a value of 41!
(d) Show that my amazing sequence 'blows up' when you reach the 41st term. Why? There goes my million dollars from the Clay Institute!
Extension: Is there any other sequence like this? What's special about 41? Happy web-questing...

Subscribe to: Comments (Atom)

AltStyle によって変換されたページ (->オリジナル) /