Question: False-position method is a bracketing with bracket xl and xu where the new root is approximated as xr = xu - f(xu)(xu - xl)/(f(xu) -

False-position method is a bracketing with bracket xl and xu where the new root is approximated as xr = xu - f(xu)(xu - xl)/(f(xu) - f(xl)) (a) Matlab script with a bug to compute the root for f(x) = x^3 - 27; after the 7th iterations using xL=0; xU=10; is given by

xL = 0; xU = 10; fU = xU^3 - 27; fL=xL^3 - 27; xR = xU - (fU) * (xL-xU)/(fL-fU); n=7; for i=1:n fR = xR^3 - 27; fL = xL^3 -27; fU = xU^3 - 27; if(fR*fL < 0 ) xL = xR; else xU = xR; end xR = xU - (fU) * (xL-xU)*(fL-fU); disp([i xL xU xR]) end 

Fix the bug and write the correct code. (b) What is the value (or closest value ) of the root at the 3rd iteration?

Choices

1.0355
1.2733
0.7881
0.5327

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!