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

function[]=bisectionexam1(xlower,xupper) xl=xlower; xu=xupper; if xl >0 && xl<5

ID: 3530031 • Letter: F

Question

function[]=bisectionexam1(xlower,xupper) xl=xlower; xu=xupper; if xl >0 && xl<5 M=@(x)-10*(x-0)^2+57*x; elseif xr >0 && xr<5 M=@(x)-10*(x-0)^2+57*x; elseif xl>5 && xl<7 M=@(x)-10*(x-0)^2+10*(x-5)^2+57*x; elseif xr>5 && xr<7 M=@(x)-10*(x-0)^2+10*(x-5)^2+57*x; elseif xl>7 && xl<8 M=@(x)-10*(x-0)^2+10*(x-5)+150*(x-7)^0+57*x; elseif xr>7 && xr<8 M=@(x)-10*(x-0)^2+10*(x-5)+150*(x-7)^0+57*x; elseif xl>8 && xl<= 10 M=@(x)-10*(x-0)^2+10*(x-5)+150*(x-7)^0+15*(x-8)^1+57*x; elseif xr>8 && xr<= 10 M=@(x)-10*(x-0)^2+10*(x-5)+150*(x-7)^0+15*(x-8)^1+57*x; end for i = 1:1000 % xr catches the i's and stores them xr(i) = (xl + xu)/2; % if the product is less than zero, that xr of a certain iteration % becomes the new upper bound if (M(xl)*M(xr(i))) < 0 xu = xr(i); elseif ((M(xl)*M(xr(i))) > 0) xl = xr(i); % the next two statements are not needed but did it anyway elseif ((M(xl)*M(xr(i))) == 0) break; end % this is the breaking criteria, based on 1 relative percent error if i>1 && (abs((xr(i)-xr(i-1))/xr(i)) * 100) < 1 break; end end Xrfinal=xr(end); fprintf('The moment is zero at is %g', Xrfinal) end

Explanation / Answer

its very confusng can you please rearrage and repost it