Answer to Question #278337 in MatLAB for mani

Question #278337

Find the root of the following equation using the Newton-Raphson method. Choose the initial guess as x(0) = 10. Choose the error tolerance as tol=1e-6. In other words, the iterations should be stopped when the error


|x(1) − x(i-¹)| ≤ tol.


x^2.5 23x^1.5 - 50x + 1150 = 0


1
Expert's answer
2021-12-11T01:58:13-0500

scr01.m:

% function f(x)
f = @(x) x^2.5 + 23*x^1.5 -50*x + 1150;
% function f'(x)
fp = @(x) 2.5*x^1.5 + 23*1.5*x^0.5 - 50;
% function g(x) = x - f(x)/f'(x)
g = @(x) x - f(x) / fp(x);
tol = 1e-6;
xi1 = 10;   % x(i-1)
xi = g(xi1);
while abs(xi - xi1) > tol
    xi1 = xi;
    xi = g(xi1);
end
display(xi)


Command window:

>> scr01
xi =
   1.7444 +12.4284i
>> f(xi)
ans =
   0.0000e+00 + 1.1369e-13i

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS