5. Recursion and Iteration
Sign In
Let's find a formula for a_n for n> 1. The balance at the start of the n^(th) month is a_(n-1). First, the interest is calculated. Since we add 1 %=0.01 of interest, we should multiply the actual amount by 1+0.01=1.01. Then we subtract 100 dollars and get the following equation. a_n=1.01 a_(n-1)- 100 Finally, we can write a recursive rule for a_n. Recursive Rule: a_1=1500, a_n=1.01 a_(n-1)- 100forn>1
| n | a_n=1.01a_(n-1)-100 | 1.01a_(n-1)-100 | a_n |
|---|---|---|---|
| 1 | a_1=1500 | - | a_1= 1500 |
| 2 | 1.01a_1-100 | 1.01( 1500)-100 | a_2= 1415 |
| 3 | 1.01a_2-100 | 1.01( 1415)-100 | a_3= 1329.15 |
| 4 | 1.01a_3-100 | 1.01( 1329.15)-100 | a_4=1242.44 |
| 5 | 1.01a_4-100 | 1.01(1242.44)-100 | a_5=1154.86 |
This tells us that the balances are $ 1415, $ 1329.15, $1242.44, and $1154.86.
=Round((1.01)*(A1)-100,2)in cell A2. When we hit enter, we will get the following.
| n | a_n=1.01a_(n-1)-100 | 1.01a_(n-1)-100 | a_n | 0.01a_n |
|---|---|---|---|---|
| 1 | a_1=1500 | - | a_1= 1500 | 0.01( 1500)=15 |
| 2 | 1.01a_1-100 | 1.01( 1500)-100 | a_2= 1415 | 0.01( 1415)=14.15 |
| 3 | 1.01a_2-100 | 1.01( 1415)-100 | a_3= 1329.15 | 0.01( 1329.15)≈ 13.29 |
| 4 | 1.01a_3-100 | 1.01( 1329.15)-100 | a_4=1242.44 | 0.01(1242.44)≈ 12.42 |
| 5 | 1.01a_4-100 | 1.01(1242.44)-100 | a_5=1154.86 | 0.01(1154.86)≈ 11.55 |
| 6 | 1.01a_5-100 | 1.01(1154.86)-100 | a_6= 1066.41 | 0.01( 1066.41)≈10.66 |
Now, to find the total interest during the first six months we will add the interest after each month. 15+14.15+13.29+12.42+11.55+10.66 = 77.07 Therefore, the total interest is about $77.07.
=Round((1.01)*(A1)-100,2)in cell A2. When we hit enter we will get the following.
=Round((0.01)*(A1),2)in cell B1. When we hit enter we will get the following.
Sumin cell A8 and write
=Sum(B1:B6)in cell B8 to get the sum of all cells from cell B1 to B6 . When we hit enter, we will get the following.