You deposit $1000 for 5 years at 4% annual interest. In 5 years, you add $10000 to your account, but the rate on your account changes to 8% annual interest (for existing balance and new deposit). You leave the account untouched for an additional 15 years. How much do you accumulate?

To calculate how much you accumulate, we can break down the problem into three separate parts:

1. Calculate the amount accumulated in the first 5 years.
2. Calculate the amount accumulated after adding $10,000 to the account and remaining untouched for 15 years.
3. Add the results from steps 1 and 2 to get the final accumulation.

Step 1: Calculate the amount accumulated in the first 5 years.
To calculate the amount accumulated in the initial 5 years, we need to use the formula for compound interest:

A = P(1 + r/n)^(nt)

Where:
A = Accumulated amount
P = Principal amount (initial deposit)
r = Annual interest rate (in decimal form)
n = Number of times interest is compounded per year
t = Number of years

Using the given information:
Principal amount (P) = $1000
Annual interest rate (r) = 4% = 0.04
Number of times interest is compounded per year (n) = 1
Number of years (t) = 5

Plugging in the values into the formula, we have:

A1 = $1000(1 + 0.04/1)^(1*5)

Simplifying the equation, we get:

A1 = $1000(1.04)^5

Calculating it further:

A1 = $1000(1.2166529024)

A1 = $1216.65

So, after 5 years, the amount accumulated is $1216.65.

Step 2: Calculate the amount accumulated after adding $10,000 to the account and remaining untouched for 15 years.
To calculate the amount accumulated after adding $10,000 to the account and letting it accumulate for another 15 years, we can use the same compound interest formula.

Principal amount (P) = $1216.65 (previous amount accumulated after 5 years)
Additional deposit = $10,000 (new deposit after 5 years)
Total principal amount (P) = $1216.65 + $10,000 = $11,216.65
Annual interest rate (r) = 8% = 0.08 (interest rate after 5 years)
Number of times interest is compounded per year (n) = 1
Number of years (t) = 15

Using the same formula as before, we have:

A2 = $11,216.65(1 + 0.08/1)^(1*15)

Simplifying the equation, we get:

A2 = $11,216.65(1.08)^15

Calculating it further, we have:

A2 = $11,216.65(2.713646102)

A2 = $30,404.90

So, the amount accumulated after the additional $10,000 deposit and untouched for 15 more years is $30,404.90.

Step 3: Add the results from steps 1 and 2 to get the final accumulation.
Final accumulation = A1 + A2

Final accumulation = $1216.65 + $30,404.90

Final accumulation = $31,621.55

Therefore, the total amount accumulated after 20 years is $31,621.55.