Sohelnum 1
Sohelnum 1
a=-10;
b=10;
tol=1e-10;
fa=a*a-4;
fb=b*b-4;
if fa*fb<0
while b-a>tol
c=(a+b)/2;
fc=c*c-4;
if fa*fc<0
b=c;
fb=fc;
elseif fb*fc<0
a=c;
fa=fc;
else
break
end
end
x=c
else
end
disp('wrong assumption');
problem2:
clc;
clf;
clear all;
close all;
x=-10:.10:10;
y=5*x.^4+2*x-3;
plot(x,y)
grid on;