This paper considers a mortgage contract where the borrower pays a fixed
mortgage rate and has the choice of making prepayment. Assume the market
interest follows the CIR model, a free boundary problem is formulated. Here we
focus on the infinite horizon problem. Using variational method, we obtain an
analytical solution to the problem, where the free boundary is implicitly given
by a transcendental algebraic equation.