フィルターのクリア

Please help me to solve this newton-raphson method

8 ビュー (過去 30 日間)
Inggrid Audia
Inggrid Audia 2016 年 9 月 29 日
回答済み: Luis Varela 2016 年 10 月 4 日
How can I use Newton-Raphson method to determine a root of
f (x) = x5−16.05x4+88.75x3−192.0375x2+116.35x +31.6875
using an initial guess of x = 0.5825 and εs = 0.01%.
  2 件のコメント
James Tursa
James Tursa 2016 年 9 月 29 日
What have you done so far? Have you written any code yet?
Luis Varela
Luis Varela 2016 年 10 月 4 日
On Newton Raphson method, you need calculate the function f(x) and the derivate f'(x), to get the next value of x, and continue while the error is greater than desired, for example:
x = 0.5825;
e=1;
while e>0.01
fx= x^5 - 16.05*x^4 + 88.75*x^3 - 192.0375*x^2 + 116.35*x + 31.6875;
dfx= 5*x^4 - 4*16.05*x^3 + 3*88.75*x^2 - 2*192.0375*x + 116.35;
x2=x-(fx/dfx);
e=100*abs((x2-x)/x2);
x=x2;
end
At the end x will have the value of the calculated root, aprox. x=6.5

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

回答 (2 件)

Jakub Rysanek
Jakub Rysanek 2016 年 10 月 3 日
In this case I would go with
roots([1,-16.05,88.75,192.0375,116.35,31.6875])

Luis Varela
Luis Varela 2016 年 10 月 4 日
On Newton Raphson method, you need calculate the function f(x) and the derivate f'(x), to get the next value of x, and continue while the error is greater than desired, for example:
x = 0.5825;
e=1;
while e>0.01
fx= x^5 - 16.05*x^4 + 88.75*x^3 - 192.0375*x^2 + 116.35*x + 31.6875;
dfx= 5*x^4 - 4*16.05*x^3 + 3*88.75*x^2 - 2*192.0375*x + 116.35;
x2=x-(fx/dfx);
e=100*abs((x2-x)/x2);
x=x2;
end
At the end x will have the value of the calculated root, aprox. x=6.5

カテゴリ

Help Center および File ExchangeNewton-Raphson Method についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by