Question

MATLAB code needed: Use the newton's method to find the 37th root of 66453634 and show...

MATLAB code needed:

Use the newton's method to find the 37th root of 66453634 and show the number of iterations, ends of the interval and which will converge fastest falsi, secant or newtons method.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;

clear;

f = @(x) x^37-66453634;

g = @(x) 37*x^36;

xl=input('Enter the guess value:');

tol=input('Enter the allowed error:');

if g(xl)==0

    fprintf('The guess is incorrect! Enter new guesse\n');

    xl=input('Enter the guess value:');

end

for i=1:10000

xr=xl- f(xl)/g(xl);

if abs( xl-xr)<tol, break,end

if abs(f(xr))<abs(f(xl))

    xl=xr;

end

fprintf('Root after %i interation is: %d \n',i,xr);

end

fprintf('The required root  is:%d found after %d iterations',xr,i);

Among these, secant and newtons method will converge equally fast and faster than falsi.

Add a comment
Know the answer?
Add Answer to:
MATLAB code needed: Use the newton's method to find the 37th root of 66453634 and show...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT