Originally Answered: Can anyone give me a REAL LIFE problem about " quadratic functions, cubic functions, and square root functions?
Let's say that you give me one penny today, two pennies tomorrow, three pennies the next day, and so on. I want to know, first off, how much money I will have at the end of one year (365 days -- no leap day), and I want to know how long it will take for me to have $1,000,000 at this rate.
The answer to this is to count S(n) = 1 + 2 + ... + n. I notice that there are n terms and that they are bounded from above by n, so I notice that S(n) ≤ n² for all n. This means that I can probably work out a quadratic function A n² + Bn + C for S(n). So, I try to determine A, B, and C:
S(n) = A n² + Bn + C.
I first notice that C is very easy: the sum of the first 0 counting numbers is, well, zero. So:
S(0) = C = 0.
But what I really need is this information: "to get from the n-1'th number to the n'th number, you add n:"
S(n) = S(n-1) + n.
Between the two statements I've just made, this gives us everything we need: to get to S(1), you take S(0) = 0 and add 1. To get to S(2), you take S(1) = 1, and add 2. To get to S(3), you take S(2) = 3, and add 3. And so on. So we must force that C = 0, and we must force that this last equation holds well. To force it with our polynomial expression, we write:
A n² + Bn = A (n − 1)² + B (n − 1) + n
A n² + Bn = A (n² − 2 n + 1) + B (n − 1) + n
A n² + Bn = A n² − 2 A n + A + B n − B + n
The A n² + Bn can now be cancelled from both sides:
0 = − 2 A n + A − B + n.
0 = n (1 − 2 A) + A − B.
To force that this is equal to 0 for all n, we must have that (1 − 2 A) = 0, and A = B. The first really says that A = ½, so:
S(n) = ½ n² + ½ n.
Okay! now what about S(365), the number of pennies you'll have given me after one year? You will be giving me $3.65 on the last day, of course, but how much is the sum total you have given me? It will be:
S(365) = (365 * 365 + 365)/2 = 66795
... which is $667.95 . This should not surprise you -- you have been giving me over $1 for the last 260 days, so the number *should* be several hundreds of dollars.
Now we want to know when I will have 100 million pennies total. This requires that we solve this equation:
S(n) = M
M = ½ n² + ½ n
2M = n² + n.
To figure out what n is, I observe that:
(n + ½)² = n² + n + ¼
And thus that n² + n = (n + ½)² − ¼. This may not look important, but it is:
2 M = (n + ½)² − ¼
(n + ½)² = 2 M + ¼
We can now use the square root function:
n + ½ = √( 2 M + ¼ ).
Okay, so to get 100 million pennies, I will want to calculate on my calculator:
n = sqrt(200 000 000.25) - 0.5 = 14 141.635...
This is a lot of days! But it is not *too* many. You would give me my hundred-millionth penny on day 14,142, thus completing one million dollars. It would take you a little under thirty-nine years of daily payments in order to pay it all.
It might surprise you that such quadratic (n²) payments can rise so large as a million dollars over 40 years, from just a single penny. But actually, in the real world, debts grow by an asymptotically faster function, which grows like kⁿ. They choose a very small k -- perhaps k = 1.001, so that if you owe $10 right now you should be paying one penny per day, or $3.65 per year -- a 36.5% "interest rate". But if you don't pay those little daily pennies for ten years or so, that $10 will have accumulated $384 debt. Leave it another ten years, and it will cost you nearly $15,000. It grows /exponentially/ -- if you owe twice as much, then your debt grows twice as fast.