Calculation of mortgage interest from the amount of the mortgage, annuity monthly installments and number of years
2 views (last 30 days)
Show older comments
I am having troubles to find a equation for interst (x) from the mortgage equation:
a=M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
x=? (Online equation solvers can't calculate it)
For Mortage 100,000 (M), interest x=10 and 1 year (r) monthly annuity a = 8,791.59
0 Comments
Answers (1)
Walter Roberson
on 9 Dec 2023
M = 100000;
a = 8791.59;
r = 1;
syms x
eqn = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
sol = solve(eqn, x);
vsol = vpa(sol, 16)
vsol = vsol(imag(vsol)==0)
5 Comments
Walter Roberson
on 9 Dec 2023
As you can see from the below, if you do not know r, there just isn't much you can do to get a useful expression of a solution.
You can also see that the value of r can substantially influence the number of solutions -- and that for some values of r, you can get fully explicit solutions.
%M = 100000;
%a = 8791.59;
%r = 1;
syms x
syms M a r positive
eqn = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
X = solve(eqn, x);
r = 1;
eqn2 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
X2 = solve(eqn2, x)
r = 2;
eqn3 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
X3 = solve(eqn3, x)
r = sym(1)/3
eqn4 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
X4 = solve(eqn4, x, 'maxdegree', 4)
M = 100000;
a = sym(879159)/sym(100);
%r = 1;
syms x
syms r positive
eqn5 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
X5 = solve(eqn5, x)
See Also
Categories
Find more on Financial Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!