Question

The following cubic polynomial has three real roots p(x) = 32x3 − 110x2 + 123x −...

The following cubic polynomial has three real roots p(x) = 32x3 − 110x2 + 123x − 45

(a) Plot p(x) for .9 ≤ x ≤ 1.6 and indicate the locations of the three roots. What are the exact roots of p(x)?

(b) Write a MATLAB code to run Newton’s method with x0 = 1.2 and discuss the convergence.

(c) Write a MATLAB code to run the secant method starting with x0 = 1.31 and x1 = 1.2 and discuss the convergence.

(d) Write a MATLAB code to run the bisection method with the initial bracket [.9, 1.6] and discuss the convergence.

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

`Hey,

Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

a)

clc%clears screen
clear all%clears history
close all%closes all files
format long;
C=[32,-110,123,-45];
f=@(x) polyval(C,x);
hold on;
fplot(f,[0,2]);
disp('Exact roots');
R=roots(C)
plot(R,f(R),'*');

b)

clc%clears screen
clear all%clears history
close all%closes all files
format long;
C=[32,-110,123,-45];
f=@(x) polyval(C,x);
g=@(x) polyval(polyder(C),x);
x0=1.2;
for i=1:100
x0=x0-f(x0)/g(x0);
end
disp('Root is');
disp(x0);

Note: Brother According to Chegg's policy we are only allowed to answer first 2 part if there are many. So, I request you to post other part as separate posts

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
The following cubic polynomial has three real roots p(x) = 32x3 − 110x2 + 123x −...
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