Question

3. (30 pts) (Problem 6.2) Determine the highest real root of f(x) 2x3- 11.7x2 + 17.7x -5 a) Graphically. b) Write a MATLAB pr

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

====================================

Save file as fixpt.m

=====================================

function [k,p,err,P]=fixpt(g,p0,tol,max1)
P(1)=p0;
for k=2:max1
P(k)=feval(g,P(k-1));
err=abs(P(k)-P(k-1));
relerr=err/(abs(P(k))+eps);
p=P(k);
if(err<tol|(relerr<tol))
break;
end
end
if(k==max1)
disp('Maximum iterations exceeded');
end
P=transpose(P);
  
end

========================================

Executable file

======================================

clc
clear all
close all
f=@(x) (2*x^3-5+17.7*x)/(x*11.7);
[k,p,err,P]=fixpt(f,3,1e-6,100);
disp('Root using fixed point');
P(length(P))

2)

clc
clear all
close all
f=@(x) (2*x^3-5+17.7*x-11.7*x^2);
g=@(x) (3*2*x^2+17.7-11.7*2*x);
x0=3;
e=0.0001;
maxit=100;
x1=x0;
x0=0;
N=0;
err=[];
while 1

if abs((x1-x0))>e
x0=x1;
x1=x0-(f(x0)/g(x0));
N=N+1;


else

break;

end
if(N==maxit)
break;
end

end
root=x1;
iter=N;

disp('So, final approximation is')
disp(root)

Add a comment
Know the answer?
Add Answer to:
3. (30 pts) (Problem 6.2) Determine the highest real root of f(x) 2x3- 11.7x2 + 17.7x...
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
  • 2. A comparative problem: Determine the highest real root of flx)-2x3-11.7x'+17.7x-5 You will achieve this by...

    2. A comparative problem: Determine the highest real root of flx)-2x3-11.7x'+17.7x-5 You will achieve this by performing 3 iterations of the following methods. In each case, calculate the approximate relative error at each iteration (a) The bisection method with starting guesses x 3 and u-4 (b) New Raphson method using Xo 3 as a starting guess. (c) Fixed point iteration usingx 3 as a starting guess but make sure that the method will work (see question 1.b above). (d) Which...

  • L. Determine the real root(s) off(x)--5xs + 14x3 + 20x2 + 10x a. Graphically on a graph paper. b....

    l. Determine the real root(s) off(x)--5xs + 14x3 + 20x2 + 10x a. Graphically on a graph paper. b. Using Bisection method c. Using False Position method to determine the root, employing initial guesses of x-2 d. Using the Newton Raphson methods to determine the root, employing initial guess to determine the root, employing initial guesses ofxn-2 and Xu-4 and Es= 18%. and r 5.0 andas answer. 1%. was this method the best for these initial guesses? Explain your xo--l...

  • 2) (15 points) a) Determine the roots of f(x)=-12 – 21x +18r? - 2,75x' graphically. In...

    2) (15 points) a) Determine the roots of f(x)=-12 – 21x +18r? - 2,75x' graphically. In addition, determine the first root of the function with b) bisection and c) false-position. For (b) and (c), use initial guesses of x, =-land x, = 0, and a stopping criterion of 1%. 3) (25 points) Determine the highest real root of f(x) = 2x – 11,7x² +17,7x-5 a) Graphically, b) Fixed-point iteration method (three iterations, x, = 3) c) Newton-Raphson method (three iterations,...

  • 6.5 Employ the Newton-Raphson method to determine a real root for 4x20.5 using initial guesses of...

    6.5 Employ the Newton-Raphson method to determine a real root for 4x20.5 using initial guesses of (a) 4.52 f(x) 15.5x Pick the best numerical technique, justify your choice and then use that technique to determine the root. Note that it is known that for positive initial guesses, all techniques except fixed-point iteration will eventually converge. Perform iterations until the approximate relative error falls below 2 %. If you use a bracket- ing method, use initial guesses of x 0 and...

  • 45-3. Modify the code used in Example 4 to find the root only at f(x)<0.01 using...

    45-3. Modify the code used in Example 4 to find the root only at f(x)<0.01 using Newton-Rephson Method without showing any iteration. Also find the root of equation, f(x) = x 9-3x -10, take initial guess, Xo=2 العقدة College of 9:05 mybb.qu.edu.ca Numerical Methods (Lab.) GENG 300 Summer 2020 5.1.2 Open Methods - Newton-Raphson Method f(x) *1+1 = x; - Matlab Code Example:4 function mynewtraph.t1.x0,-) XXO for ilin x - x - x)/1 x) disp 1 x) <0.01 break end...

  • (la) Determine the root of the x – ez* + 5 = 0 using the Newton-Raphson...

    (la) Determine the root of the x – ez* + 5 = 0 using the Newton-Raphson method with equation initial guess of xo = 1. Perform the computation until the percentage error is less than 0.03%. (1b) Employ bisection method to determine the root of the f(x)=x* – 3x + 7 =0) using equation two initial guesses of x; =-2.1 and x;, =-1.8 . Perform three iterations and calculate the approximate relative error for the third iteration. What is the...

  • MATLAB QUESTION please include function codes inputed Problem 3 Determine the root (highest positive) of: F(x)=...

    MATLAB QUESTION please include function codes inputed Problem 3 Determine the root (highest positive) of: F(x)= 0.95x.^3-5.9x.^2+10.9x-6; Note: Remember to compute the error Epsilon-a after each iteration. Use epsilon_$=0.01%. Part A Perform (hand calculation) 3 iterations of Newton's Raphson method to solve the equation. Use an initial guess of x0=3.5. Part B Write your own Matlab function to validate your results. Part C Compare the results of question 1 to the results of question 2, what is your conclusion ?

  • lowest positive root of f(x)= 8sin(e-x)-1

    Determine the lowest positive root of f (x) = 8sin(x)e–x – 1:(a) Graphically.(b) Using the Newton-Raphson method (three iterations, xi = 0.3).(c) Using the secant method (three iterations, xi–1 = 0.5 and xi = 0.4.(d) Using the modified secant method (five iterations, xi = 0.3, δ = 0.01).

  • 4) (16 points) The function f(x)= x? – 2x² - 4x+8 has a double root at...

    4) (16 points) The function f(x)= x? – 2x² - 4x+8 has a double root at x = 2. Use a) the standard Newton-Raphson, b) the modified Newton-Raphson to solve for the root at x = 2. Compare the rate of convergence using an initial guess of Xo = 1,2. 5) (14 points) Determine the roots of the following simultaneous nonlinear equations using a) fixed-point iteration and b) the Newton-Raphson method: y=-x? +x+0,75 y + 5xy = r? Employ initial...

  • 3 Newton and Secant Method [30 pts]. We want to solve the equation f(x) 0, where f(x) = (x-1 )4. ...

    Can you help me with parts A to D please? Thanks 3 Newton and Secant Method [30 pts]. We want to solve the equation f(x) 0, where f(x) = (x-1 )4. a) Write down Newton's iteration for solving f(x) 0. b) For the starting value xo 2, compute x c) What is the root ξ of f, i.e., f(5) = 0? Do you expect linear or quadratic order of convergence to 5 and why? d) Name one advantage of Newton's...

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