Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For past a use standard Newton-Raphson method to solve. For part b write code in

ID: 1766009 • Letter: F

Question

For past a use standard Newton-Raphson method to solve. For part b write code in written form I will put in matlab myself. Code must be without errors. Thanks

Bisection and Newton-Raphson Methods Use bisection method to solve this equation: x,5x2+3x=1 a. Solve it on paper (or excel) using a table similar to the example we solved in class (please I. see the notes). The initial x limits are -1 and 6. Only do 4 iterations. b. Write a MATLAB code to solve this equation. Use the code example we wrote in class (uploaded on blackboard), but instead of for loop use while loop. The initial limits should be -1 and 6. The while loop should stop when the absolute relative approximation error (see the notes) is 0.01% or smaller. Your code should report the number of iteration and the value of x

Explanation / Answer

MATLAB CODE:

a=-1;
b=6;
c=(a+b)/2;
val=0.001;
it=0;
n=1;

while abs(a-c)>val
if f(a)*f(c)>0
a=c;
else
b=c;
end
c=(a+b)/2;

Editor Wo
it=it+1;
end
fprintf('the solution is :%.10f ',c);
fprintf('number of iterations made is: %.d ',it);