0% found this document useful (0 votes)
4 views2 pages

Metode Newton Raphson

2

Uploaded by

gugum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Metode Newton Raphson

2

Uploaded by

gugum
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

procedure TForm1.

Button1Click(Sender: TObject);
var xo, tol, xd, fx, fd, fxx, xi:real;
begin
xo:=strtofloat([Link]);
tol:=strtofloat([Link]);
xd:= xo+tol;
fx:= (exp(xo))-(xo*xo*xo*xo*xo*xo)-1;
fd:= (exp(xd))-(xd*xd*xd*xd*xd*xd)-1;
fxx:= (fd-fx)/tol;
xi:=xo-(fx/fxx);
[Link]:=floattostr(xd);
[Link]:=floattostr(fx);
[Link]:=floattostr(fd);
[Link]:=floattostr(fxx);
[Link]:=floattostr(xi);

end;

procedure TForm1.Button2Click(Sender: TObject);


var
fx:real;
cekfx:boolean;
ket:string;
begin
fx:=strtofloat([Link]);
cekfx:=(abs(fx))<0.0001;
if cekfx then
begin
ket:='ok';
end else
begin
ket:='tidak ok';
end;
[Link]:=ket;

end;

procedure TForm1.Button3Click(Sender: TObject);


begin
close
end;

end.

You might also like