Hey everyone, I've got this problem from my calc course and I've been getting some numbers that don't look realistic to me.

A $100,000 loan is to be paid off after 30 years. The annual interest rate is 0.09 (9 percent).

A) The total amount in the loan after n months is given by P(1+i)n, where P is the starting amount for the loan, i is the monthly interest rate, and n is the total months the loan is being paid off. How much in total will have to be paid off for the loan mentioned above?

B) Assume you pay a fixed monthly amount D to pay off the loan (the payment is done at the end of the month). After the first month, $D dollars will be paid off of the loan. With the annual interest rate of 0.09 stated above, what is the total paid off after 2 months? What about 3? Determine a general formula for the total paid off after 30 years, which will be in terms of D.

For part A I used the given formula and got $1,473,057.61 (which seems kinda reasonable given that it's compounded monthly for 30 years.

For part B, I calculated using the formula D=Pi/[1-(1/(1+i))^n] and got $804.62 per month. This value seems way too low to me because at a fixed $804.62 per month for 360 months (30 years) is only $289,664.14 and not the $1mil+ number calculated in part A. What am I doing wrong here? Thanks!