Академический Документы
Профессиональный Документы
Культура Документы
2006
1
1.
2.
2.1. .
2.2.
2.3.
2.4.
3.
4.
5.
5.1.
: .
,
, .
:
;
;
, ;
;
, ;
.
:
1.
2.
;
3.
, ,
; .
1.
n- ( n
)
0 x n 1 1 ... 1 0 .
(1.1)
0 , 1 ,..., 1 ,
, 0
.
(1.1), ,
, x,
,
(1.1) .
(1.1)
0 x n 1 1 ... 1 ,
(1.2)
n-
(1.2),
x,
, x
.
f(x), g(x) .
2.
, .
, ,
, , ,
, .
2.1. .
f (x) g ( x) 0 ,
q (x) ,
f ( x) g ( x)q ( x).
,
(2.1)
3 1 ( 1)( 2 1)
3 1 1 2 1 .
q(x) (2.1) .
q1 ( x) , (2.1),
f ( x) g ( x)q ( x) g ( x)q1 ( x)
(2.2)
g ( x)q ( x) q1 ( x) 0.
g (x) ,
s ( x) g ( x) 0 s ( x) 0 g ( x) 0 q ( x) q1 ( x) ,
.. q1 ( x) q (x) .
q (x) (2.1) f (x)
g (x) , g (x) .
.
1.
f (x ) g (x ) , g (x ) h(x) , f (x )
h(x) .
5
, f ( x) g ( x) ( x) g ( x) h( x) ( x) ,
f ( x) h( x)[ ( x) ( x)] .
2. f (x) g (x ) (x) ,
(x) .
f ( x) ( x) ( x)
g ( x) ( x) ( x)
f ( x) g ( x) ( x)[ ( x) ( x)] .
3.
f (x )
(x) ,
f (x )
g (x ) (x) .
f ( x) ( x) ( x) , f ( x) g ( x) ( x)[ ( x) g ( x)] .
2. 3. :
4. f 1 ( x), f 2 ( x),..., f n ( x) (x) ,
(x)
f 1 ( x) g1 ( x) f 2 ( x) g 2 ( x) ... f n ( x) g n ( x) ,
g1 ( x), g 2 ( x),..., g n ( x) - .
5. f (x)
.
f ( x) a0 x n a1 x n 1 ... a n , - ,
,
f ( x) c(
a 0 n a1 n 1
a
x x ... n ) .
c
c
c
f ( x) ( x) ( x)
f ( x) c c 1 ( x) ( x) [c ( x)][c 1 ( x)] .
7. cf (x) , 0 ,
f (x ) , , f (x ) .
:
8. f (x) , g (x )
, g ( x) cf ( x) , 0 .
1. 8. :
9. f (x) , cf (x) , 0 ,
.
. , ,
n n 3 n 2 5n 2 .
, 1, ,
1 ; k
, k .
,
3 2 5 2 ( 2)( 2 3 1),
(2.3)
n 3 n 2 5n 2 n 2 n 2 3n 1.
, ,
1 1, ..
n 2 1, n 2 1, n 2 3n 1 1.
n: 3, 1, 0, -3, -1 2.
n 19, -5, 3, 4,
3,1,0,3,1.
: (2.3)?
, 3 2 5 2
?
7
,
, .
, ,
, ,
(
).
.
2.2.
, ,
.
. f(x) g(x)
q(x) r(x ,
f(x)=g(x)q(x)+r(x),
r(x) g(x) r(x)=0.
q(x) r(x), , .
f(x)-r(x) f ( x) r1 ( x) g(x),
s ( x) r1 ( x) r ( x)
g(x). s(x)
, , g(x),
g(x). , s(x)=0, r1 ( x) r ( x) .
, .
.
. f (x) g (x ) .
1. f ( x) 3x 5 2 x 2 x 1 g ( x) x 3 3x 2 1
3x 5 2 x 2 x 1 | x 3 3x 2 1
3x 5 9 x 4 3x 2
3x 2 9 x 27
9x4 x2 x 1
9 x 4 27 x 3 9 x
27 x 3 x 2 10 x 1
27 x 3 81x 2 27
80 x 2 10 x 26
f (x) g (x ) 3x 2 9 x 27 ,
80 x 2 10 x 26 .
2. f ( x) x 5 x 4 x 3 3x 2 3x 1 g ( x) x 4 2 x 3 x 2 2 x 1
x 5 x 4 x 3 3x 2 3x 1 x 4 2 x 3 x 2 2 x 1
x 5 2x 4 x 3 2x 2 x
x3
3x 4 x 2 4 x 1
3x 4 3x 3 3x 2 6 x 3
3x 3 2 x 2 2 x 4
f (x) g (x ) x 3 ,
3x 3 2 x 2 2 x 4 .
:
1) f(x) g(x)
;
2) g(x) 1)
f(x);
3) f(x) ;
4) 3) ,
g(x); ( ), ,
, ,
1), f(x).
.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
9
a,a2,b,b2,k:array[0..100] of integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
n:=StrToInt(Edit1.Text);
m:=StrToInt(Edit2.Text);
for i:=n+1 downto 1 do begin
a[i]:=StrToInt(SGd1.Cells[n-(i-1),0]);
end;
for i:=m+1 downto 1 do begin
b[i]:=StrToInt(SGd1.Cells[m-(i-1),1]);
end;
s:='f1(x)=';
for i:=n+1 downto 1 do begin
if a[i]<>0 then begin if(a[i-1]<0)or(i=1) then begin
str(a[i],l);
str(i-1,d);
s:=s+l+'x^'+d;
end
else begin
str(a[i],l);
str(i-1,d);
s:=s+l+'x^'+d+'+';
end;
end;
end;
Edit3.Text:=s;
s:='f2(x)=';
for i:=m+1 downto 1 do begin
11
b2[j]:=0;
end;
end;
s:='h(x)=';
for i:=f downto 1 do begin
if k[i]<>0 then begin if(k[i-1]<0)or(i=1) then begin
str(k[i],l);
str(i-1,d);
s:=s+l+'x^'+d;
end
else begin
str(k[i],l);
str(i-1,d);
s:=s+l+'x^'+d+'+';
end;
end;
end;
Edit5.Text:=s;
s:='r(x)=';
for i:=n downto 0 do begin
if a2[i]<>0 then begin if(a2[i-1]<0)or(i=1) then begin
str(a2[i],l);
str(i-1,d);
s:=s+l+'x^'+d;
end
else begin
str(a2[i],l);
str(i-1,d);
s:=s+l+'x^'+d+'+';
end;
13
end;
end;
Edit6.Text:=s;
end;
end.
2.3.
f (x) g (x ) .
f (x) g (x ) ,
. 5. ,
f (x) g (x )
. ,
.
14
f (x )
g (x )
, x ,
.
f (x)
g (x )
d (x ) ,
, ,
.
f (x ) g (x ) ( f ( x), g ( x )) .
f (x) g (x ) .
,
.
2.4.
,
.
.
,
,
.
f (x) g (x )
f (x ) g (x ) , g (x ) r1 ( x) ,
r1 ( x)
r2 ( x) . ,
,
.
15
rn (x) ,
rn 1 ( x) , f (x)
g (x ) .
:
f ( x) g ( x)q1 ( x) r1 ( x)
g ( x) r1 ( x)q 2 ( x) r2 ( x)
r1 ( x) r2 ( x)q3 ( x) r3 ( x)
(2.4)
rn 2 ( x) rn 1 ( x)q n ( x) rn ( x)
rn 1 ( x) rn ( x)q n 1 ( x) 0
, rn (x)
rn1 ( x) . ,
rn (x) , rn (x) rn 2 ( x) .
, , , , rn (x)
rn 3 ( x) , , r2 ( x) , r1 ( x) . ,
, rn (x) g (x ) , ,
, - f (x) .
( x) f (x)
g (x ) .
( x) , r1 ( x) ( x) .
, , (x)
r2 ( x) , r3 ( x) , , ,
rn 2 ( x) rn 1 ( x) (x) , ,
rn (x) (x) . , rn (x)
f (x) g (x ) .
,
, . ,
f (x) g (x )
16
,
, , ,
,
().
d (x ) f (x) g (x ) ,
, 8. 9.,
cd (x) , c , . ,
. ,
. ,
,
. ,
, , , ,
.
,
- ,
. ,
,
.
. f (x) g (x ) .
1. f ( x) x5 x 4 x3 2 x 1 g ( x) 3x 4 2 x3 x 2 2 x 2
:
x5 x 4 x3 2 x 1 | 3x 4 2 x3 x 2 2 x 2
17
3x 5 3x 4 3x 3 6 x 3
|| x || 1
3x 5 2 x 4 x 3 2 x 2 2 x
x 4 4x 3 2x 2 4x 3
3x 4 12 x 3 6 x 2 12 x 9
3x 4 2 x 3 x 2 2 x 2
14 x 3 7 x 2 14 x 7
2x3 x 2 2x 1
3x 4 2 x 3 x 2 2 x 2 | 2 x 3 x 2 2 x 1
6x 4 4x 3 2x 2 4x 4
|| 3x || 1
6 x 4 3x 3 6 x 2 3x
x 3 4x 2 x 4
2 x 3 8x 2 2 x 8
2x3 x 2 2x 1
9x 2 9
x2 1
2x3 x 2 2x 1 | x 2 1
2x3 2x
2x 1
x2 1
x2 1
0
.
x 2 1 .
2. f ( x) x 6 7 x 4 8 x 3 7 x 7 g ( x) 3x 5 7 x 3 3x 2 7
:
x 6 7 x 4 8x 3 7 x 7
3x 5 7 x 3 3x 2 7
3x 6 21x 4 24 x 3 21x 21 || x
18
3x 6 7 x 4 3x 3 7 x
14 x 4 21x 3 14 x 21
2 x 4 3x 3 2 x 3
3x 5 7 x 3 3x 2 7 2 x 4 3x 3 2 x 3
6 x 5 14 x 3 6 x 2 14
|| 3 x || 9
6x 5 9x 4 6x 2 9x
9 x 4 14 x 3 9 x 14
18 x 4 28 x 3 18 x 28
18 x 4 27 x 3 18 x 27
x3 1
x3 1
2 x 4 3x 3 2 x 3 x 3 1
2x 4 2x
2x 3
3x 3 3
3x 3 3
0
.
x 3 1 .
:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls, Grids;
19
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
SGd1: TStringGrid;
Label3: TLabel;
Button1: TButton;
Label4: TLabel;
Edit4: TEdit;
Label5: TLabel;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
st1,st2:integer;
kof1,kof2,k1,k2:array[0..10] of integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var i,j,k_1,st3,l:integer;
sokr:boolean;
k2_2,k1_1:array[0..10] of integer;
begin
20
st1:=StrToInt(Edit1.Text);
st2:=StrToInt(Edit2.Text);
for i:=0 to st1 do begin
kof1[i]:=StrToInt(SGd1.Cells[i,0]);
k1[i]:=StrToInt(SGd1.Cells[i,0]);
end;
for i:=0 to st2 do begin
kof2[i]:=StrToInt(SGd1.Cells[i,1]);
k2[i]:=StrToInt(SGd1.Cells[i,1]);
end;
while kof2[0]<>0 do begin
repeat
Edit4.Text:='';
k_1:=k1[0];
if k1[0]<>kof2[0] then begin
if (k1[0] mod kof2[0])=0 then begin
for j:=0 to st2 do
k2[j]:=(k1[0] div kof2[0])*kof2[j];
end
else begin
if k2[0]<>1 then
for j:=0 to st1 do
k1[j]:=kof2[0]*k1[j];
if k_1<>1 then begin
for j:=0 to st2 do
k2[j]:=k_1*kof2[j];
end;
end;
end;
for i:=1 to st1 do begin
21
k1[i-1]:=k1[i]-k2[i];
end;
st1:=st1-1;
until st1<st2;
if k1[0]<>0 then begin
//
sokr:=true;
for i:=1 to st1 do
if k1[i]<>0 then begin
if (k1[i] mod k1[0])<>0 then sokr:=false;
end;
k_1:=k1[0];
if sokr=true then
for i:=0 to st1 do
k1[i]:=k1[i] div k_1;
end;
for i:=0 to st2 do
//
k2_2[i]:=kof2[i];
for i:=0 to st1 do
k1_1[i]:=k1[i];
for i:=0 to 10 do begin
kof1[i]:=0;
k1[i]:=0;
kof2[i]:=0;
k2[i]:=0;
end;
for i:=0 to st2 do begin
k1[i]:=k2_2[i];
if k1[i]<>0 then
Edit4.Text:=Edit4.Text+IntToStr(k1[i])+'x^'+IntToStr(st2-i);
if (k2_2[i+1]>0)and(i<st2) then Edit4.Text:=Edit4.Text+'+';
22
end;
for i:=0 to st1 do begin
k2[i]:=k1_1[i];
kof2[i]:=k1_1[i];
end;
st3:=st1;
st1:=st2;
st2:=st3;
end;
end;
end.
. d (x )
f (x ) g (x ) , u (x) v(x) ,
f ( x)u ( x) g ( x)v( x) d ( x) .
(2.5)
f (x ) g (x )
, u (x) g (x ) , v(x)
f (x) .
23
(2.4). ,
rn ( x) d ( x) , u1 ( x) 1 , v1 ( x) qn ( x) ,
(2.4) :
u1 ( x) rn 2 ( x) rn 1 ( x) v1 ( x) d ( x)
d ( x) rn 2 ( x)u1 ( x) rn 1 ( x)v1 ( x) .
rn 1 ( x)
rn 3 ( x)
rn 2 ( x)
(2.4), :
d ( x) rn 3 ( x)u2 ( x) rn 2 ( x)v2 ( x) ,
u 2 ( x) v1 ( x) , v2 ( x) u1 ( x) v1 ( x)q n 1 ( x) .
(2.4), (2.5).
,
u (x) v(x) , (2.5), , ,
, u (x) g (x ) . u (x) g (x ) :
u ( x) g ( x)q ( x) r ( x) ,
r (x) g (x ) ,
(2). :
f ( x)g ( x)q ( x) r ( x) g ( x)v( x) d ( x)
, f (x) , g (x ) .
, ,
f (x ) ,
g ( x) f ( x) ,
,
, g ( x) f ( x) ,
d (x ) , ,
.
.
24
, f (x) g (x )
, u (x)
v(x) , (2.5), ,
, .
,
:
f (x) g (x ) ,
u (x) v(x) ,
f ( x)u ( x) g ( x)v( x) 1 .
(2.6)
, ,
:
1.
f (x)
(x) (x) , .
.
(2.6),
, f (x) ( x) ( x)
(x) ; ( f ( x), ( x)) 1 .
2. f (x) g (x )
(x) , f (x) (x) , g (x ) (x) .
f ( x)u ( x) ( x)v( x) 1
g (x ) ,
3. f (x)
(x) (x) , , f (x )
.
25
. , f ( x) ( x) ( x) , ,
, (x) . , 2, (x)
(x) , ( x) ( x) ( x) , f ( x) [ ( x) ( x)] ( x) .
:
f1 ( x), f 2 ( x),..., f s ( x)
,
.
,
.
. f1 ( x), f 2 ( x),..., f s ( x)
f s (x)
f1 ( x), f 2 ( x),..., f s 1 ( x) .
. , s 2 .
, s 1 , , ,
d (x)
f1 ( x), f 2 ( x),..., f s 1 ( x) .
d (x)
d (x) f s (x) .
. ,
d (x) , d (x) .
,
f1 ( x), f 2 ( x),..., f s ( x)
,
,
1. s 2 ,
.
26
3.
. f(x) x-c ,
c .
f(x)
x-c. 1,
0, 0. , r
. , f(x) :
f(x)= (x-c) q(x)+ r.
x= c, f(c)=r.
, x- c
x=c.
.
1. x3 2 x 2 3x 22 0 .
f(x)= x3 2 x 2 3x 22 2. f(x)
x-2,
f ( x) ( x 2)( x 2 4 x 11) .
x 3 2 x 2 3x 22 | x 2
x 3 2x 2
x 2 4 x 11
4 x 2 3 x 22
4 x2 8x
11x 22
11x 22
0
x 2 4 x 11 0 .
, x=2
.
2. x3 3x 2 0 .
f(x)= x 3 3x 2 -2. f(x)
x+2, f ( x) ( x 2)( x 2 2 x 1) .
27
x3 3x 2 | x 2
x 3 2x 2
x2 2x 1
2 x 2 3x 2
2x2 4x
x2
x2
0
x 2 2 x 1 0 .
1. x=-2 x=1
.
c f(x), f(c)=0, f(x) x-c.
, f(x)
x-c, .
, k, f(x)
( x c) k , ( x c) k 1 .
f ( x) ( x c) k ( x) ,
() x-c ,
. k c f(x),
c k- . k=1, ,
.
28
4.
.
, . ,
,
.
n
f(x)= 0 x n 1 1 ... 1
. (
) (n- 1)-
f ' ' ( x) na0 x n 1 (n 1)a1 x n 2 ... 2an 2 x an 1
.
f(x) f(x) . ,
f ( n ) ( x) n!a0
f ( n 1) ( x) 0 , (n+1)- n
.
,
:
1. ( f ( x) g ( x))' f ' ( x) g ' ( x)
(4.1)
(4.2)
, , ,
.
(4.2)
:
29
3. ( f k ( x))' kf k 1 ( x) f ' ( x)
(4.3)
. .
k 2
( f 2 ( x)) ( f ( x) f ( x)) f ( x) f ( x) f ( x) f ( x) 2 f ( x) f ( x)
k n 1 ( f
n 1
( x)) (n 1) f
k n
n 1
( x) f ( x)) (n 1) f
(f
n2
( x) f ( x)
n2
( x) f ( x) f ( x) f
n 1
( x) f ( x)
(n 1) f n 1 ( x) f ( x) f n 1 ( x) f ( x) nf n 1 ( x) f ( x) .
k f(x), k>1
(k-1) ;
k=1 , f ' ( x) .
,
f ( x) ( x c) k ( x) , k 1 ,
(4.4)
(x) -. (4.4),
:
f ' ( x) ( x c) k ' ( x) k ( x c) k 1 ( x) ( x c) k 1 (( x c) ' ( x) k ( x)) .
-, - ;
- . ,
f(x) ( x c) k 1 , , ( x c) k 1
-,
f ' ( x) .
, , k-
f(x)
(k-s)- s-
(k s ) k-
f(x).
. f ' ( x) f (x) .
f ( x) 12 x 6 3 x 5 4 x 3 x 2 16 x 20
f ( x) 72 x 5 15 x 4 12 x 2 2 x 16 .
.
30
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls, Grids;
type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
SGd1: TStringGrid;
Label2: TLabel;
Button1: TButton;
Edit2: TEdit;
Edit3: TEdit;
Label3: TLabel;
Label4: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
c,i,st:integer;
k,l,s:string;
kof:array[0..100] of integer;
31
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
st:=StrToInt(Edit1.Text);
for i:=0 to st do begin
if SGd1.Cells[i,0]<>'' then
kof[st-i]:=StrToInt(SGd1.Cells[i,0])
else
MessageDlg
('!
!',mtWarning,[mbOK],0);
end;
s:='f(x)=';
for i:=st downto 0 do begin
if kof[i]<>0 then begin
if(kof[i-1]<0)or(i=0) then begin
str(kof[i],l);
str(i,k);
s:=s+l+'x^'+k;
end
else begin
str(kof[i],l);
str(i,k);
s:=s+l+'x^'+k+'+';
end;
end;
kof[i]:=kof[i]*i;
end;
Edit2.Text:=s;
s:='f1(x)=';
for i:=st downto 0 do begin
32
33
5.
, ,
,
, .
. p(x) k -
f (x) , k 1 , (k 1) -
. , .
.
,
f ( x) p k ( x) g ( x) ,
(5.1)
, ,
p(x) .
, g (x) p (x ) , p(x)
, .. p (x ) . ,
, , p (x ) , .. p (x ) ,
f (x) (k 1) .
,
f (x) :
f ( x) a0 p1k1 ( x) p2k 2 ( x) plk l ( x) ,
(5.2)
f (x)
:
( f ( x), f ( x)) p1k 11 ( x) p 2k 2 1 ( x) pl
k l 1
( x) ,
(5.3)
34
pl k 1 ( x) k i 1 .
l
, f (x)
, .
5.1.
f (x) (5.2) D1 ( x)
f (x) f (x) (5.3)
D1 ( x) . (5.2) (5.3), :
E1 ( x)
f ( x)
a 0 p1 ( x) p 2 ( x) pl ( x)
D1 ( x)
.. , ,
E1 ( x) , ,
, ,
. E1 ( x ) ,
f (x ) ,
.
,
, ,
,
f (x) , .
(5.2) f (x) ,
s , s 0 .
F1 ( x )
f (x) ,
F2 ( x ) - ,
, ..,
Fs (x )
s -
, ;
f (x )
j - ,
35
F j ( x ) 1 .
Fk ( x ) 1,2, , s
f (x )
k -
(5.2)
(5.3)
D1 ( x) ( f ( x), f ( x))
D1 ( x) F2 ( x) F32 ( x) Fss 1 ( x)
D2 ( x) D1 ( x)
Dk (x)
Dk 1 ( x) Dk 1 ( x) , :
D2 ( x) F3 ( x) F42 ( x) Fss 2 ( x)
D3 ( x) F4 ( x) F52 ( x) Fss 3 ( x)
Ds 1 ( x) Fs ( x)
Ds ( x) 1 .
E1 ( x )
f ( x)
a 0 F1 ( x ) F2 ( x ) F3 ( x ) Fs ( x ) ,
D1 ( x )
E 2 ( x)
D1 ( x )
F2 ( x ) F3 ( x) Fs ( x)
D2 ( x )
E3 ( x)
D2 ( x )
F3 ( x) Fs ( x )
D3 ( x)
E s ( x)
Ds 1 ( x)
Fs ( x) ,
Ds ( x)
, ,
F1 ( x)
E1 ( x)
E ( x)
, F2 ( x) 2 , , Fs ( x) E s ( x)
a 0 E 2 ( x)
E3 ( x)
, ,
f (x) , ,
,
F1 ( x), F2 ( x), F3 ( x), , Fs ( x)
36
Fk (x) k 1,2,3,, s , k -
f (x) .
. f (x) .
f ( x) x 6 15 x 4 8 x 3 51x 2 72 x 27
f ( x) 6 x 5 60 x 3 24 x 2 102 x 72 x 5 10 x 3 4 x 2 17 x 12
D1 f , f
x 6 15 x 4 8 x 3 51x 2 72 x 27 x 5 10 x 3 4 x 2 17 x 12
x 6 10 x 4 4 x 3 17 x 2 12 x
5 x 4 4 x 3 34 x 2 60 x 27
5 x 4 4 x 3 34 x 2 60 x 27
x 5 10 x 3 4 x 2 17 x 12
5 x 4 4 x 3 34 x 2 60 x 27
5 x 5 50 x 3 20 x 2 85 x 60
x 1
5 x 5 4 x 4 34 x 3 60 x 2 17 x 72 x
4 x 4 16 x 3 40 x 2 112 x 60
5 x 4 20 x 3 50 x 2 140 x 75
5 x 4 4 x 3 34 x 2 60 x 27
16 x 3 16 x 2 80 x 48
x 3 x 2 5x 3
5 x 4 4 x 3 34 x 2 60 x 27 x 3 x 2 5 x 3
5 x 4 5 x 3 25 x 2 15 x
5x 1
9 x 3 9 x 2 45 x 27
x 3 x 2 5x 3
x 3 x 2 5x 3
0
D1 x 3 x 2 5 x 3
37
D1 3 x 2 2 x 5
D2 D1 , D1
x 3 x 2 5x 3
3x 2 2 x 5
3x 3 3x 2 15 x 9
x 1
3x 3 2 x 2 5 x
x 2 10 x 9
3x 2 30 x 27
3x 2 2 x 5
32 x 32
x 1
3x 2 2 x 5 x 1
3x 2 3x
3x 1
5x 5
x 1
x 1
0
D2 x 1
D2 1
D3 D2 , D2 1
E1
f
D1
x 6 15 x 4 8 x 3 51x 2 72 x 27 x 3 x 2 5 x 3
x 6 x 5 5 x 4 3x 3
x3 x 2 9x 9
x 5 10 x 4 5 x 3 51x 2 72 x 27
x 5 x 4 5 x 3 3x 2
9 x 4 54 x 2 72 x 27
38
9 x 4 9 x 3 45 x 2 27 x
9 x 3 9 x 2 45 x 27
9 x 3 9 x 2 45 x 27
E1 x 3 x 2 9 x 9
E2
D1
D2
x 3 x 2 5x 3 x 1
x 2 2x 3
x3 x2
2 x 2 5x 3
2x 2 2x
3x 3
3x 3
0
E2 x 2 2 x 3
E3
D2
D3
E3 x 1
F1
E1
E2
x3 x 2 9x 9 x 2 2x 3
x 3 2 x 2 3x
x3
3x 2 6 x 9
3x 2 6 x 9
0
F1 x 3
F2
E2
E3
x 2 2x 3 x 1
x2 x
x3
3x 3
39
3x 3
0
F2 x 3
F3 E3
F3 x 1
2
f ( x) F1 F2 F3 ( x 3) ( x 3) 2 ( x 1) 3
f ( x) x 6 15 x 4 8 x 3 51x 2 72 x 27
( x 3) ( x 3) 2 ( x 1)3 .
.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, StdCtrls, Grids;
type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
SGd1: TStringGrid;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
SGd2: TStringGrid;
SGd3: TStringGrid;
SGd4: TStringGrid;
Edit6: TEdit;
procedure Button1Click(Sender: TObject);
40
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
c,i,st1,st2,stiz,n_iz,n_nod,n,m,d_st,step,f:integer;
k,d,s:string;
kof1,kof2,k1,k2,izubst,a,b,a2,b2,buf,est,fxst:array[0..15] of integer;
izub,e,fx:array[0..50,0..50] of integer;
first:boolean;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var i,j,k_1,st3,l:integer;
sokr:boolean;
k2_2,k1_1:array[0..10] of integer;
begin
st1:=StrToInt(Edit1.Text);
for i:=0 to st1 do begin
SGd4.Cells[i,0]:=SGd1.Cells[i,0];
end;
repeat
n_iz:=n_iz+1;
st2:=st1-1;
for i:=0 to st1 do begin
if SGd1.Cells[i,0]<>'' then
kof1[st1-i]:=StrToInt(SGd1.Cells[i,0])
41
else
MessageDlg('!
!',mtWarning,[mbOK],0);
end;
s:='f(x)=';
for i:=st1 downto 0 do begin
if kof1[i]<>0 then begin
if(kof1[i-1]<0)or(i=0) then begin
str(kof1[i],d);
str(i,k);
s:=s+d+'x^'+k;
end
else begin
str(kof1[i],d);
str(i,k);
s:=s+d+'x^'+k+'+';
end;
end;
kof2[i-1]:=kof1[i]*i;
end;
//Edit2.Text:=s;
s:='f1(x)=';
for i:=st2 downto 0 do begin
SGd2.Cells[st2-i,0]:=inttostr(kof2[i]);
if kof2[i]<>0 then begin
if(kof2[i-1]<0)or(i=1) then begin
str(kof2[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
42
str(kof2[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
//Edit3.Text:=s;
end;
for i:=0 to st1 do begin
kof1[i]:=StrToInt(SGd1.Cells[i,0]);
k1[i]:=StrToInt(SGd1.Cells[i,0]);
end;
for i:=0 to st2 do begin
kof2[i]:=StrToInt(SGd2.Cells[i,0]);
k2[i]:=StrToInt(SGd2.Cells[i,0]);
end;
while kof2[0]<>0 do begin
repeat
//Edit4.Text:='';
stiz:=0;
k_1:=k1[0];
if k1[0]<>kof2[0] then begin
if (k1[0] mod kof2[0])=0 then begin
for j:=0 to st2 do
k2[j]:=(k1[0] div kof2[0])*kof2[j];
end
else begin
if k2[0]<>1 then
for j:=0 to st1 do
k1[j]:=kof2[0]*k1[j];
if k_1<>1 then begin
43
//
sokr:=true;
for i:=1 to st1 do
if k1[i]<>0 then begin
if (k1[i] mod k1[0])<>0 then sokr:=false;
end;
k_1:=k1[0];
if sokr=true then
for i:=0 to st1 do
k1[i]:=k1[i] div k_1;
end;
for i:=0 to st2 do
//
k2_2[i]:=kof2[i];
for i:=0 to st1 do
k1_1[i]:=k1[i];
for i:=0 to 10 do begin
SGd3.Cells[i,0]:='';
SGd1.Cells[i,0]:='';
kof1[i]:=0;
k1[i]:=0;
44
kof2[i]:=0;
k2[i]:=0;
izub[n_iz,i]:=0;
end;
izubst[n_iz]:=st2;
for i:=0 to st2 do begin
k1[i]:=k2_2[i];
SGd1.Cells[i,0]:=inttostr(k1[i]);
izub[n_iz,i]:=k1[i];
if k1[i]<>0 then begin
//Edit4.Text:=Edit4.Text+IntToStr(k1[i])+'x^'+IntToStr(st2-i);
end;
if (k2_2[i+1]>0)and(i<st2) then //Edit4.Text:=Edit4.Text+'+';
end;
for i:=0 to st1 do begin
k2[i]:=k1_1[i];
kof2[i]:=k1_1[i];
end;
st3:=st1;
st1:=st2;
st2:=st3;
end;
until (st1=0);
d_st:=StrToInt(Edit1.Text);
for i:=d_st+1 downto 1 do begin
kof1[i]:=StrToInt(SGd4.Cells[d_st-(i-1),0]);
end;
//
first:=true;
for n_nod:=1 to n_iz do begin
45
n:=d_st;
m:=izubst[n_nod];
d_st:=m;
for i:=n+1 downto 1 do begin
a[i]:=kof1[i];
end;
for i:=m+1 downto 1 do begin
b[i]:=izub[n_nod,m-(i-1)];
kof1[i]:=b[i];
end;
s:='f1(x)=';
for i:=n+1 downto 1 do begin
if a[i]<>0 then begin
if(a[i-1]<0)or(i=1) then begin
str(a[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
str(a[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
end;
//Edit3.Text:=s;
s:='f2(x)=';
for i:=m+1 downto 1 do begin
if b[i]<>0 then begin
if(b[i-1]<0)or(i=1) then begin
46
str(b[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
str(b[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
end;
//Edit4.Text:=s;
for j:=n+1 downto 1 do begin
a2[j]:=a[j];
b2[j]:=0;
end;
step:=n-m;
f:=n+2;
for i:=step+1 downto 1 do begin
f:=f-1;
buf[i]:=a2[f];
for j:=m+1 downto 1 do begin
b2[j]:=buf[i]*b[j];
end;
for j:=f downto 1 do begin
a2[j]:=a2[j]*b[m+1];
end;
for j:=f downto 1 do begin
a2[j]:=a2[j]-b2[j+1-i];
b2[j]:=0;
47
end;
end;
s:='h(x)=';
for i:=f+1 downto 1 do begin
e[n_nod,i]:=buf[i];
if buf[i]<>0 then begin
if(buf[i-1]<0)or(i=1) then begin
str(buf[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
str(buf[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
buf[i]:=0;
end;
end;
est[n_nod]:=f;
//Edit5.Text:=s;
s:='r(x)=';
for i:=n downto 0 do begin
if a2[i]<>0 then begin
if(a2[i-1]<0)or(i=1) then begin
str(a2[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
48
str(a2[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
end;
Edit6.Text:=s;
first:=false;
end;
for n_nod:=1 to n_iz-1 do begin
n:=est[n_nod];
m:=est[n_nod+1];
d_st:=m;
for i:=n+1 downto 1 do begin
a[i]:=e[n_nod,i];
end;
for i:=m+1 downto 1 do begin
b[i]:=e[n_nod+1,i];
kof1[i]:=b[i];
if n_nod=n_iz-1 then fx[n_iz,i]:=b[i];
end;
s:='f1(x)=';
for i:=n+1 downto 1 do begin
if a[i]<>0 then begin if(a[i-1]<0)or(i=1) then begin
str(a[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
str(a[i],d);
49
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
end;
//Edit3.Text:=s;
s:='f2(x)=';
for i:=m+1 downto 1 do begin
if b[i]<>0 then begin if(b[i-1]<0)or(i=1) then begin
str(b[i],d);
str(i-1,k);
s:=s+d+'x^'+k;
end
else begin
str(b[i],d);
str(i-1,k);
s:=s+d+'x^'+k+'+';
end;
end;
end;
//Edit4.Text:=s;
for j:=n+1 downto 1 do begin
a2[j]:=a[j];
b2[j]:=0;
end;
step:=n-m;
f:=n+2;
for i:=step+1 downto 1 do begin
f:=f-1;
buf[i]:=a2[f];
50
s:=s+d+'x^'+k+'+';
end;
end;
end;
s:=s+')^'+IntToStr(i)+' ';
Edit6.Text:=Edit6.Text+s;
s:='';
end;
for i:=0 to 10 do begin
SGd1.Cells[i,0]:=SGd4.Cells[i,0];
end;
end;
end.
53
:
;
;
, ;
;
, ;
.
; ;
.
54
1.
. . . . . :
, 1984.
2.
. . Delphi 6. :
, 2003.
3.
. . Delphi 7. . :
-, 2004.
4.
. . . : , 1971.
5.
. ., . . . II.
. : , 1978.
6.
. . . ,
. 2. : , 1982.
7.
8.
. ., . ., . .
. : , 1980.
9.
. . ,
. I. : , 1978.
10.
. . . . . :
, 1987.
11.
. . . :1996.
12.
. ., . . -
. IV. : , 1985.
13.
. . . : , 1984.
14.
. ., . .
. : , 1968.
15.
. . . :
, 1980.
55