>

$\mathrm{with}\left(\mathrm{Finance}\right)\:$

Present value of an annuity paying 100 units per year for 15 years starting next year. The interest rate is 10% per year.
>

$\mathrm{annuity}\left(100\,0.10\,15\right)$

Monthly payments required for a mortgage of 10000 units, amortized over 25 years, not in advanced, with interest at 10% per year, compounded semiannually. There are 25*12 monthly payments.
>

$\mathrm{Npayments}\u225425\cdot 12$

${\mathrm{Npayments}}{:=}{300}$
 (2) 
The semiannual interest rate is 5% (10%/2). We need to find the monthly interest rate that when compounded give this 5% figure. This is calculated as follows. The range 0 .. 0.5, is to ensure we obtain the appropriate value.
>

$\mathrm{mrate}\u2254\frac{\mathrm{fsolve}\left(\mathrm{effectiverate}\left(r\,6\right)\=0.05\,r\,0..0.5\right)}{6}$

${\mathrm{mrate}}{:=}{0.008164846052}$
 (3) 
Verification: the future value of 1 units after 6 months should be 1.05
>

$\mathrm{futurevalue}\left(1.\,\mathrm{mrate}\,6\right)$

The value of an annuity of 1 units paid monthly for 25 years at the interest rate we calculated is then
>

$A\u2254\mathrm{annuity}\left(1\,\mathrm{mrate}\,\mathrm{Npayments}\right)$

${A}{:=}{111.7958950}$
 (5) 
The required monthly payments are thus:
>

$P\u2254\frac{10000}{A}$

${P}{:=}{89.44872260}$
 (6) 
The total payments amount to:
>

$\mathrm{Tot}\u2254P\mathrm{Npayments}$

${\mathrm{Tot}}{:=}{26834.61678}$
 (7) 
From which the cost of the loan is readily obtained. The mortgage rules above are typical of mortgages obtained from banks in Canada. As with all legal matters, rules can change, so check first about their applicability.
The payments if the mortgage is paid in advanced (so the first payment is already deducted from the loan) are given by
>

$\mathrm{solve}\left(\mathrm{P1}\+\mathrm{annuity}\left(\mathrm{P1}\,\mathrm{mrate}\,\mathrm{Npayments}1\right)\=10000\right)$
