term of the mortgage is 30 years, i.e., M(30) should be 0. Suppose we pay $P per year. We can model the change in what we owe the bank with the differential equation M (t) = r.M(t) - P dollars per year and initial values M(0) =$200000. This model assumes the interest is charged continuously (banks usually charge interest daily which is approximately continuous) and if we assume we make the payments continuously (banks usually require us to pay monthly or weekly which is approximately continuous over 30 years). So the values we obtain with it will be approximations.
Fig: 1