フィルターのクリア

Calculation of mortgage interest from the amount of the mortgage, annuity monthly installments and number of years

6 ビュー (過去 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

回答 (1 件)

Walter Roberson
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)
eqn = 
sol = solve(eqn, x);
vsol = vpa(sol, 16)
vsol = 
vsol = vsol(imag(vsol)==0)
vsol = 
  5 件のコメント
Dan Richter
Dan Richter 2023 年 12 月 9 日
編集済み: Dan Richter 2023 年 12 月 9 日
OK, Thank you for detail explanation :-). Actually, I am interested to express "x" i.e. interest rate per year.
Walter Roberson
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)
eqn = 
X = solve(eqn, x);
Warning: Unable to find explicit solution. For options, see help.
r = 1;
eqn2 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
eqn2 = 
X2 = solve(eqn2, x)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
X2 = 
r = 2;
eqn3 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
eqn3 = 
X3 = solve(eqn3, x)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
X3 = 
r = sym(1)/3
r = 
eqn4 = a == M*(x/1200*(1+x/1200)^(r*12))/((x/1200+1)^(r*12)-1)
eqn4 = 
X4 = solve(eqn4, x, 'maxdegree', 4)
Warning: Solutions are only valid under certain conditions. To include parameters and conditions in the solution, specify the 'ReturnConditions' value as 'true'.
X4 = 
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)
eqn5 = 
X5 = solve(eqn5, x)
Warning: Unable to find explicit solution. For options, see help.
X5 = Empty sym: 0-by-1

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by