The monthly payment that amortizes a loan of $A$ dollars in $t$ years when the interest rate is $r /$ year, compounded monthly, is given by $$P=f(A, r, t)=\frac{A r}{12\left[1-\left(1+\frac{r}{12}\right)^{-12 t}\right]}$$
a. What is the monthly payment for a home mortgage of $\ 300,000$ that will be amortized over 30 years with an interest rate of $4 \% /$ year? An interest rate of $6 \% /$ year?
b. Find the monthly payment for a home mortgage of $\ 300,000$ that will be amortized over 20 years with an interest rate of $6 \% /$ year.