Calculation of mortgage interest from the amount of the mortgage, annuity monthly installments and number of years
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Walter Roberson
2023-12-9
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 个评论
Walter Roberson
2023-12-9
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Financial Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!