ΠΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠ°Ρ ΡΠ°ΡΡΡ.
ΠΠ½Π°Π»ΠΈΠ· ΠΈ ΡΡΠ°Π²Π½Π΅Π½ΠΈΠ΅ ΡΠΈΡΠ»Π΅Π½Π½ΡΡ
ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ² ΡΠ΅ΡΠ΅Π½ΠΈΡ Π½Π΅Π»ΠΈΠ½Π΅ΠΉΠ½ΡΡ
ΡΡΠ°Π²Π½Π΅Π½ΠΈΠΉ
Panel2. Visible:=false; Panel1. Visible:=false; Panel1. Visible:=false; Panel3. Visible:=true; Panel2. Visible:=true; Panel1. Visible:=true; ΠΠ΅ΡΠΎΠ΄ Ρ ΠΎΡΠ΄. X:=x0-f (x0)/f1(x0); X, e, Fx, Fx1: real; Form1. Series1.Clear; X:=x-(F (x)/F1(x)); For i:=1 to n do. Until abs (f (x)). Π’ΠΎΡΠ½ΠΎΡΡΡ. Π’ΠΎΡΠ½ΠΎΡΡΡ. Π’ΠΎΡΠ½ΠΎΡΡΡ. ΠΠ½ΡΠ΅ΡΠ²Π°Π». ΠΠ½ΡΠ΅ΡΠ²Π°Π». ΠΠ½ΡΠ΅ΡΠ²Π°Π». Button9: TButton; Button8: TButton; Button7: TButton; Button6: TButton… Π§ΠΈΡΠ°ΡΡ Π΅ΡΡ >
ΠΡΠ°ΠΊΡΠΈΡΠ΅ΡΠΊΠ°Ρ ΡΠ°ΡΡΡ. ΠΠ½Π°Π»ΠΈΠ· ΠΈ ΡΡΠ°Π²Π½Π΅Π½ΠΈΠ΅ ΡΠΈΡΠ»Π΅Π½Π½ΡΡ ΠΌΠ΅ΡΠΎΠ΄ΠΎΠ² ΡΠ΅ΡΠ΅Π½ΠΈΡ Π½Π΅Π»ΠΈΠ½Π΅ΠΉΠ½ΡΡ ΡΡΠ°Π²Π½Π΅Π½ΠΈΠΉ (ΡΠ΅ΡΠ΅ΡΠ°Ρ, ΠΊΡΡΡΠΎΠ²Π°Ρ, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½ΡΡΠΎΠ»ΡΠ½Π°Ρ)
unit Unit1;
interface.
uses.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,.
Dialogs, ExtCtrls, TeeProcs, TeEngine, Chart, StdCtrls, Series;
type.
TForm1 = class (TForm).
Label3: TLabel;
Button1: TButton;
Edit3: TEdit;
Edit4: TEdit;
Chart1: TChart;
Series1: TFastLineSeries;
Edit2: TEdit;
Edit5: TEdit;
Button3: TButton;
Label2: TLabel;
Button2: TButton;
Label4: TLabel;
Button4: TButton;
Button5: TButton;
Panel1: TPanel;
Panel2: TPanel;
Edit6: TEdit;
Label5: TLabel;
Panel3: TPanel;
Edit9: TEdit;
Label8: TLabel;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Label6: TLabel;
Label7: TLabel;
Label1: TLabel;
procedure Button1Click (Sender: TObject);
procedure Button3Click (Sender: TObject);
procedure Button2Click (Sender: TObject);
procedure Button4Click (Sender: TObject);
procedure Button5Click (Sender: TObject);
procedure Button6Click (Sender: TObject);
procedure Button7Click (Sender: TObject);
procedure Button8Click (Sender: TObject);
procedure Button9Click (Sender: TObject);
// procedure Label3Click (Sender: TObject);
private.
{ Private declarations }.
public.
{ Public declarations }.
end;
var.
Form1: TForm1;
implementation.
uses Unit2;
{$R *.dfm}.
function F (x:real): real;
begin.
result:=2*cos ((x+pi/6))+x*x-4*x+3;
end;
function F1(x:real): real;
begin.
result:=2*(x-1/6*(6*x+pi)*sin (x)+cos (x)-2);
end;
procedure TForm1. Button1Click (Sender: TObject);
Var a, y, x0,y1,b, x1, xn, xn1: real;
x, e, Fx, Fx1: real;
begin.
e:=strtofloat (edit3.Text);
a:=StrToFloat (Edit2.Text);
b:=StrToFloat (Edit5.Text);
x0:=a;
x:=x0-f (x0)/f1(x0);
repeat.
begin.
x1:=x;
y:=f (x);
y1:=f1(x);
x:=x-y/y1;
end;
until (x-x1)>e;
Repeat.
x:=x-(F (x)/F1(x));
Until abs (f (x)).
edit4.Text:=FloatToStr (x);
end;
procedure TForm1. Button3Click (Sender: TObject);
var.
a, b, h: real;
i, n: integer;
begin.
a:=StrToFloat (Form1.Edit2.Text);
b:=StrToFloat (Form1.Edit5.Text);
n:=100;
h:=(b-a)/n;
Form1.Series1.AddXY (a, f (a));
for i:=1 to n do.
Form1.Series1.AddXY (a+h*i, f (a+h*i));
end;
procedure TForm1. Button2Click (Sender: TObject);
begin.
Form1.Series1.Clear;
end;
procedure TForm1. Button4Click (Sender: TObject);
var x, c, a, b, e:real;
begin.
e:=strtofloat (Edit6.Text);
a:=strtofloat (edit2.Text);
b:=strtofloat (edit5.Text);
repeat.
c:=(a+b)/2;
if f (a)*f (c)<0 then b:=c else a:=c;
until b-a.
x:=(a+b)/2;
begin.
edit4.Text:=FloatToStr (x);
end;
end;
procedure TForm1. Button5Click (Sender: TObject);
Var a, b, c, g, e, x, x0,x1,y:real;
Fx: real;
begin.
e:=strtofloat (edit9.text);
a:=strtofloat (edit2.Text);
b:=strtofloat (edit5.Text);
c:=a;
repeat.
g:=c;
c:=(a*f (b)-b*f (a))/(f (b)-f (a));
if f (a)*f (c)<0 then b:=c else a:=c;
until abs (c-g).
Form1.Edit4.Text:=(floattostr (c));
end;
procedure TForm1. Button6Click (Sender: TObject);
begin.
panel1.Visible:=true;
panel2.Visible:=false;
panel3.Visible:=false;
end;
procedure TForm1. Button7Click (Sender: TObject);
begin.
panel2.Visible:=true;
panel1.Visible:=false;
panel3.Visible:=false;
end;
procedure TForm1. Button8Click (Sender: TObject);
begin.
panel3.Visible:=true;
panel1.Visible:=false;
panel2.Visible:=false;
end;
procedure TForm1. Button9Click (Sender: TObject);
begin.
form2.showmodal;
end;
end.
ΠΠ΅ΡΠΎΠ΄ ΠΊΠ°ΡΠ°ΡΠ΅Π»ΡΠ½ΡΡ . | |
Π’ΠΎΡΠ½ΠΎΡΡΡ. | 0,001. |
ΠΠ½ΡΠ΅ΡΠ²Π°Π». | (-1,2). |
ΠΡΠ²Π΅Ρ. | 1,2 390. |
ΠΠ΅ΡΠΎΠ΄ ΠΏΠΎΠ»ΠΎΠ²ΠΈΠ½Π½ΠΎΠ³ΠΎ Π΄Π΅Π»Π΅Π½ΠΈΡ. | |
Π’ΠΎΡΠ½ΠΎΡΡΡ. | 0,001. |
ΠΠ½ΡΠ΅ΡΠ²Π°Π». | (-1,2). |
ΠΡΠ²Π΅Ρ. | 1,2 404. |
ΠΠ΅ΡΠΎΠ΄ Ρ ΠΎΡΠ΄. | |
Π’ΠΎΡΠ½ΠΎΡΡΡ. | 0,001. |
ΠΠ½ΡΠ΅ΡΠ²Π°Π». | (-1,2). |
ΠΡΠ²Π΅Ρ. | 1,2 383. |