Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

a) X3-0,2x2+0,2x-2,1=0

Program P1;
Var Msup, minf, eps, a, b, e, x, xnou, xvechi:real;
function f(x:real):real;
Begin
f:=x*x*x-0.2*sqr(x)+0.2*x-2.1;
end;
begin
a:=1; b:=2; eps:=0.0001;
Msup:=10; minf:=5;
x:=a-(f(a))/(f(b)-f(a))*(b-a);
if f(x)*f(a)>0 then begin e:=b; xnou:=a; end
else begin e:=a; xnou:=b; end;
repeat
xvechi:=xnou;
xnou:=xvechi-(f(xvechi))/f-f(xvechi))*(e-xvechi);
writeln( x=, xnou:10:8, f(x)=, f(xnou):12:8);
until abs((Msup-minf)/minf*(xnou-xvechi))<eps;
end.

b)5x3-20x+3=0

c)ex-x2=0;

2sinx-ex=0

x4+x-2,1=0

You might also like