Download as pdf or txt
Download as pdf or txt
You are on page 1of 159

-

. -.
-.

, 2007


..................................................................................................................................................................... 1
1 ................................................................................ 3
1.1 ................................................................................................................................ 3
1.2 ................................................................................................. 5
1.3 ....................................................................................................... 7
2 ........................................................10
2.1 .......................................................................................................................10
2.2 ................................................................................................................13
2.3 - ...............................................................................................................17
2.3.1 - .........................................................20
2.3.2 ..........................................................................................................................................21
2.4 ............................................................................................................................22
3 ............................................................................................................................................26
3.1 ..........................................................................................................27
3.2 .......................................................................29
3.3 .........................................................................................................32
3.4 ...............................................................................34
3.5 .......................................................................................38
3.5.1 - ............................................................39
3.5.2 - ...............................................................45
3.6 ...............................................48
3.7 .......................................................................................50
4 ................................................................................54
4.1 ..........................................................................................................54
4.1.1 ................................................55
4.1.2
- .................................................................................................................................56
4.2 ................................................................................................................58
4.2.1 ................59
4.2.2 ...............................................................................................................68
5 ...............................................................73
5.1 ..........................................................................................76
5.2 ..............................................................................................................................82
5.3 - ..................................................................................................................84
5.4 ..........................................................................................................89
6 ...................................................93
6.1 ..........................................................................................................94
6.1.1 ...........................................................................................................................95
6.1.2 ...........................................................................................................97
6.2 - ............................................................................................................................98
7 ...........................................................................................................................106
7.1 ...................................................................................................107
8 .......................................................................................................116
8.1 , , .........................................................................................................116
8.2 ......................................................................118
8.3 ..............................................................................................................120
8.4 ......................................................................................................121
8.5 .....123
8.6 PERT...................................................................................126
8.7 (CPM)..............................................134
9 .............................138
9.1 ...................................................................................................................................138
9.2 .......................................................................................................143
9.3 ....................................................................................................................148
9.4 .........................................................................................................................151


, .
,
.

,
.
. , 2000
. ,
.
,
. ,
, ,
.
,
, , , , .
.
,
, , .
.

.
,
.

.
, ,
,
. ,
.
QR
,
. ()
.

1

.
,

. ,
.
,
-
, .

;
;

;
;
, -,
;
; .

, .

.
,
m-
MatLab.

. .
,
.
.

.



.
,
,
.
1.1

. ;
, ,
.
,
.

.
:
a.
,
.
.
, ,
,
.

.
b.



.
3

,
, . :
1. ,
, c ,
c- ( 2c 2c-1
), ;
2. ,
b a,
b
a + b.

.
c.

. ,
,
.
d.

, .
. ,
,

.
e.
,
, ,
. ,
. ,
,
, .

.
,
.
.
, ,

.
.
, Intel Pentium
1994 ,
4

,
.


. a d
, c
. ,

, .
,
, ,
.

.


20%. ,
, .
.
1.2

.
,
.
.
1.1 ~
x ,
x :
x. ~
(1)
x = ~
xx
x 0 :

rx =

x ( ~
x x)
=
x
x

(2)

~
x x
, .

.
.

x = ~
x
~
x x . x ,
, :
~
xx
~
xx
x

(3)

,
xi 0 i:
max
i

~
xi xi
xi

(4)

.

.
.
,

. ,
:
.

,
.
x ~
x x y = ~
~
y , x = ~
y y.

~
x+~
y = ( x + x) + ( y + y ) = ( x + y ) + (x + y )
( x + y ) = x + y
( x + y )
x
y
x
y
rx + y =
=
+
=
rx +
ry
x+ y
x+ y x+ y x+ y
x+ y

~
x~
y = ( x + x) ( y + y ) = ( x y ) + (x y )
( x y ) = x y
( x y )
x
y
x
y
rx y =
=

=
rx
ry
x y
x y x y x y
x y

~
x~
y = ( x + x)( y + y ) = xy + yx + xy + xy

x y ,
, :
( xy ) = yx + xy
( xy ) yx xy x y
rxy =
=
+
=
+
= rx + ry
xy
xy
xy
x
y

~
x x + x x + x
1

=
=
~
y
y y + y
y
1+
y

y
<< 1 ,
y

1
, :
y
1+
y

2
~
x 1
x x + x y y
= + x x y

1
...

~y

y y
y
y y
y2

x 1
x
= x 2 y
y
y y

x 1
x

y
x
y y
x y
y2

rx =
=

= rx ry
x
x
x
x
y
y
y
y
y
,
,
,
.
1.3

a~
1

10 t , a~ t .
2
a~
10 t , .
, ,
.
,
.
7

1
0.002157 6 , 4
0.003245 0.000003 5 , 3
0.003245 0.000007 4 , 2

x t
. ,
t-. , ,
,
10 t .
,
, s , x. , p
s- , p s-
p < 0.5 10 s . , s 1. x
s , s- 1
, , .
, s
1
1

10 s , 10 s
2

2
.
2
.

0.3498
-0.3498
0.49750
0.49650
0.49654

0.349
-0.349
0.497
0.496
0.496



0.350
-0.350
0.498
0.496
0.497

,
. ,
a=0.32360.0003, 3
0.324, , ,
a 0.3233, 0.3239.

1.
.
2. , :
a.
b.
c.
d.

0.00034
-23.45001
-1.00001
0.00001

3. ,
:
a. 0.004556 0.000002
b. 234.03 0.01
c. -1.00023 0.006
4.
.
a.
b.
c.
d.
e.

3.4565
3.4255
3.4250
-0.0152
23.0003

5. 3
,
.

f ( x) = 0

(1)

k f(x) [a,b].
(1) [a,b] , .. f(x0)=0 x0[a,b],
x0 .

: , , .
2.1

(
).
,
. .
2.1 f(x) [a,b]
y f(a) f(b), c[a,b] f(c)=y.

.
2.2 f(x) [a,b]
f(a)f(b)<0, c[a,b] f(c)=0.


, ,
.
10

1
0. 0[a,b],
x
2.1 , c[a,b] f(c)=0.

1. f ( x) =

. f(x)
[a,b] f(a)f(b)<0. 2.2
a+b
f(c)=0,
c[a,b] f(c)=0. c =
2
a+b
. f(c)0,
c =
2
:
1. f(a), f(c) , [a, c]
[a1,b1];
2. f(c), f(b) , [c, b]
[a1,b1].
[a1, b1].
[a2, b2], , [an, bn], ,
f(a)f(b)<0
ba
bn a n = n
2
= lim a n = lim bn f ( ) = 0 .
n

2.3.
2.3 f(x) [a,b]
f(a)f(b)<0 (xn) ,
ba
xn+ 2 n .
2

2.1

11

,
.
.
( 2.1).
2
x 3 + x 2 5 = 0
[1,2] 0.1.
f ( x) = x 3 + x 2 5
[1,2] f(1)f(2)<0. 1.1,
( 2.1).
2.1

f(a)

f(b)

f(c)

1
1
1.25
1.375

2
1.5
1.5
1.5

1.5
1.25
1.375
1.4375

-3
-3
-1.4844
-0.5098

7
0.6250
0.6250
0.6250

0.6250
-1.4844
-0.5098
0.0369

ba
2
0.5
0.25
0.125
0.0625


0.1, . 1.4375
0.1.

.
,

,
, ,

.
.
,
,
. , f(a)f(b)<0,
sign(f(a))*sign(f(b))<0, |f(a)| |f(b)|
, f(a)f(b)
.

2.2.
12

function [c] = Bisekcija(f,a,b,xt,yt)


% Funkcijata Bisekcija(a,b,xt,yt) naoga koren c na dadena funkcija f
% so edna promenliva. Funkcijata f treba da e neprekinata na intervalot
% [a, b], xt e najmalata dolzina za ispituvaniot interval, a yt e
% tocnosta so koja treba da se opredeli korenot c
ff=str2func(f);
fa=ff(a);
fb=ff(b);
if sign(fa)*sign(fb)>0
disp('Ne e ispolnet uslovot za primena na ovaa metoda')
else if sign(fa)*sign(fb)==0
if fa==0
c=a;
else
c=b;
end
else
c=(a+b)/2;
while ((b-a>2*xt) & (abs(ff(c))>=yt))
fc=ff(c);
if sign(fa)*sign(fc)<0
b=c;
fb=fc;
c=(a+c)/2;
else
a=c;
fa=fc;
c=(c+b)/2;
end
end
end
end
2.2

2.2


f ( x) = 0 ,
( f ( x) = x F ( x) ):
x = F (x)
(2)
, (2)
y=F(x) y=x ( 2.3).
,
x0, :
x n +1 = F ( x n )

(3)
13

y=x

x0

x1

y=F(x)

2.3


:
2.4 F:[a,b] [a,b].
L, 0<L<1, :
(x, y [a, b]) F ( x) F ( y ) L x y

(4)

x = F (x) [a,b]
(xn): x n +1 = F ( x n ) .
2.5 F: [a,b] [a,b]
[a,b] F ' ( x) L < 1, (x [a, b]) , x = F (x)

[a,b]
(xn): x n +1 = F ( x n ) .
(4) Lipshitz- .
x n +1 x n Ln x1 x0 . n m>n.
2.4 2.5, :
x m x n = ( x m x m 1 ) + ( x m 1 x m 2 ) + ... + ( x n +1 x n )
:
x m x n x m x m 1 + x m 1 x m 2 + ... + x n +1 x n
( Lm 1 + ... + Ln ) x1 x0

14

Ln (1 + L + L2 + ...+ ) x1 x 0 =

Ln x1 x0

1 L

m x m , (2). :
Ln
x1 x0
1 L

(5)

L
x n x n 1
1 L

(6)

xn
:

xn

2 x x 2 + 1 = 0 10-3.

1 2
1 2
x=
x + 1 , F ( x) =
x + 1 . :
2
2
x
x2 +1 1
<
=
F ' ( x) =
2 x2 +1 2 x2 +1 2

F(x) 2.5
R,
1
, x0=0. L = , a
2
2.2. 5- ,
0.5571.
2.2

xn

0
1
2
3
4
5

0
0.5
0.5590
0.5728
0.5762
0.5771

L
x n x n 1
1 L

0.5000
0.0590
0.0138
0.0034
0.0008

F ' ( x) > 1 , (xn): x n +1 = F ( x n )


(2) ( 2.4). 0 F ' ( x) < 1
(xn) , 1 < F ' ( x) 0 (xn)
15

. , (6),
:

x n x n x n 1
(7)
(7) ,
1
0<L .
2

2.4

" ",
, ,
.
.
2.5.
function [n, x] = Povtori(f,x0,L,N,tol)
% Funkcijata Povtori(f,x0,N,tol) naoga koren x na dadena funkcija f
% so edna promenliva, a go vraka i redniot broj n na iteracijata.
% x0 e pocetnata tocka, L e vrednosta od Lipsicoviot uslov
% N e maksimalniot broj na iteracii, a tol tocnosta so koja treba da se opredeli korenot x
F=str2func(f);
x=x0; n=0;
najdi=0;
while ((n<=N) & (najdi==0))
fx=F(x);
e=abs(fx-x)*L/(1-L);
n=n+1;
x=fx;
if e<tol
najdi=1;
end
end
2.5

16

2.3 -
- (Newton-Raphson)
. f(x)
[a,b], f(x)0 x[a,b] f ( x) = 0
[a,b]. -
x0 :
x n +1 = x n

f ( xn )
, n = 0,1,2,...
f ' ( xn )

(8)

,
(8), . x0=a,
y=f(x) (x0, f(x0)) :
Y f ( x0 ) = f ' ( x 0 )( X x0 )

(9)

Y=0 (9) x-:


X = x0

f ( x0 )
f ' ( x0 )

X=x1 .
y=f(x) (x1, f(x1))
x2 x-
. (n+1) (8).
2.6.

2.6 -

17

- ..
,
.
2
ek = x k , ek +1 C ek .
x n x n x n 1 .
- .
2.6 f(x)
[a,b] :
(i) f(a)f(b)<0;
(ii) f'(x)0 x[a,b];
(iii) f''(x) [a,b];
(iv) f (a ) (b a ) f ' (a ) f (b) (b a ) f ' (b) .
-
f ( x) = 0 x0 [a,b].
2.7 f(x)

[a,b]:
(i) f(a)f(b)<0;
(ii) f(x) [a,b];
(iii) f'(x) f''(x) [a,b].
-
f ( x) = 0
[a,b], f ( x0 ) f " ( x0 ) > 0 .
3. -
x 3 2 x 2 + x 3 = 0
[2, 4] 10-5.

f ( x) = x 3 2 x 2 + x 3
[2,4], f ' ( x) = 3x 2 4 x + 1 f " ( x) = 6 x 4 .
(i) f(2)f(4) = (-1)33=-33<0
(ii) f'(x)0 x[2, 4];
(iii) f " ( x) > 0 x[2, 4];
(iv) f (a ) (b a ) f ' (a ) 1 25
f (b) (b a ) f ' (b) 33 266

2.6, -
f ( x) = 0 x0 [2, 4].
(8) :
18

x n +1 =

2 x n3 2 x n2 + 3
3x n2 4 x n + 1

2 2.3
4- 10-5,
2.17455941029299
10-5.
2.3

xn

x n x n 1

0
1
2
3
4

2
2.2
2.175
2.17455954558583
2.17455941029299

0.2
0.025
0.00044045441417
0.00000013529284

-
2.7. f(x) ,
, ,
.
function [n, x] = NR(f,fprv,x0,N,tol)
% Funkcijata NR(f,fprv,x0,N,tol) naoga koren x na dadena funkcija f
% so edna promenliva, a go vraka i redniot broj n na iteracijata.
% fprv e prviot izvod na funkcijata f, x0 e pocetnata tocka,
% N e maksimalniot broj na iteracii, a tol tocnosta so koja treba da se
% opredeli korenot x
F=str2func(f);
Fprv=str2func(fprv);
xs=x0;
n=0;
najdi=0;
while ((n<=N) & (najdi==0))
fx=F(xs);
fpx=Fprv(xs);
x=xs-fx/fpx;
n=n+1;
if abs(x-xs)<tol
najdi=1;
end
xs=x;
end
2.7 -

19

2.3.1 -
- , ,
- ,
.
. c
c . f ( x) = x 2 c = 0 .
2.6 f(x)
[a,b], 0 < a < c < b , (8) :
x n +1 = x n

(xn)

x n2 c 1
c
= x n +
2 xn
2
xn

(10)

c.

- . c ,
1, k c .
f ( x) = x k c = 0 . 2.6

f(x) [a,b], 0 < a < k c < b ,


(8) :
x n +1 = x n

x nk c 1
1
= 1 x n + cx1n k
k 1
k
kx n
k

(11)

(xn) k c .
. c
, 1/c.
1
1
2
f ( x) = c = 0 . x>0 f ' ( x) = 2 < 0 f " ( x) = 3 > 0 ,
x
x
x
1
[a,b], 0 < a < < b f(a)>0 f(b)<0.
c
2.6 (8) :
1
c
xn
x n +1 = x n
= x n (2 cx n )
(12)
1
2
xn
1
x0=a, (xn) .
c
, .

20

4. - x0=0.1,
1/9 .

(12) xn+1=xn(2-9xn).
2-9xn 1.
2.4
.
2.4

n
0
1
2
3

xn
0.1
0.11
0.1111
0.11111111

2-9xn
1.1
1.01
1.0001
1.00000001

2.3.2
-
f(x) x0.
2.6 2.7,
.

5. -
x j = 0 j>0 x0 0.

f ( x) = x j 0.
2.6 ((ii) (iii)),
- :
x n +1 = x n +

x nj
1
= 1 x k
j 1
j
jx n

0,
, .
1
1 , j .
j

6. -
ln x

= 0 x0 = 3.
x
21

f (x) 1
R . .
:
1
x ln x
1 ln x
x
f ' ( x) =
=
2
x
x2
+

x > e1 , 1 ln x < 0 , f ' ( x) < 0 .


x>1, f ( x) > 0 . , :
x n +1 = x x

f ( xn )
> xn
f ' ( xn )

1.
7. -
sin( x) = 0 x0 0, x0 2 x0 = tan x0 .

. x1 :
x1 = x0

f ( x0 )
sin( x0 )
= x0
= x0 tan( x 0 ) = x 0 2 x0 = x 0
cos( x0 )
f ' ( x0 )

x2 :
x 2 = x1

sin( x0 )
sin( x0 )
f ( x1 )
= x0
= x0 +
= x 0 + tan( x 0 ) = x0 + 2 x 0 = x0
f ' ( x1 )
cos( x0 )
cos( x 0 )

-
x0 - x0.
2.4
regula falsi
(1)
[a,b].
- a, ,

22

. (xn, f(xn))
(xn-1, f(xn-1)) (xn, f(xn)),
f'(xn) :
f ( x n ) f ( x n 1 )
x n x n 1

xn+1 :
f ( x n ) f ( x n 1 )
( x xn ) = y f ( xn )
x n x n 1

y=0 (13):
f ( x n ) f ( x n 1 )
( x n +1 x n ) = f ( x n )
x n x n 1

x n x n 1
f ( x n )
x n +1 = x n
f ( x n ) f ( x n 1 )

(13)


, x-
( 2.8).

2.8

23

x n x n x n 1 .
2.9.
[a, b],
f(a)f(b)<0.

function [n, x] = Sekanti(f,a,b,N,tol)


% Funkcijata Sekanti(f,a,b,N,tol) naoga koren x na dadena funkcija f
% so edna promenliva, a go vraka i redniot broj n na iteracijata.
% [a, b] e dadeniot interval,
% N e maksimalniot broj na iteracii, a tol tocnosta so koja treba da se
% opredeli korenot x
F=str2func(f);
n=0;
xs=a; fxs=F(xs);
x=b; fx=F(x);
najdi=0;
if sign(fx)*sign(fxs)>=0
disp('Ne e ispolnet uslovot za primena na ovaa metoda')
else
while ((n<=N) & (najdi==0))
if abs(x-xs)<tol
najdi=1;
else
fpx=(fx-fxs)/(x-xs);
xs=x; fxs=fx;
x=x-fx/fpx;
fx=F(x);
n=n+1;
end
end
end
2.9

8.
x 3 2 x 2 + x 3 = 0
[2,4] 10-5.
2.5

24

xn

xn+1

x n +1 x n

0
1
2
3
4
5
6

2
4
2.05882352941176
2.09868421052632
2.18129365365462
2.17419113372366
2.17455768629924

4
2.05882352941176
2.09868421052632
2.18129365365462
2.17419113372366
2.17455768629924
2.17455941073575

2
1.94117647058824
0.03986068111455
0.08260944312831
0.00710251993096
0.00036655257558
0.00000172443651

3
6- ( 2.5), 4 - .
10-5 2.17455941073575.
f(x)
[a,b]. ,
f(a)f(b)<0, 9.
9.
1

1 = 0 [-1,1]
0.5 + x 2
10-5.
f(a)=f(b),
x2 .

1.
2.
3.
4.
5.
6.

7.
8.
9.

x 2 x 2 4 = 0 [2,3] 0.01.

e x 2 x = 0 [0, 1], 10-3.
- x0=0.3, 1/3
.
- x0=3, 10
10-3.
- x0=2, 3 9
10-4.
-
0.1x 2 x ln x = 0 [1,2]
10-3.

x x + 2 x = 6 [1,2] 0.001.
m KvadratenKoren
- .
m Reciprocen
- , .

25

, ,
f(x) ""
"" g(x)
f(x) g(x)
:
f(x),
,
g(x). , sin(x), cos(x), ln(x)
.
f(x) ,
xi (i = 0,
1, 2,..., n)
i
- xi
- f(xi)

0
x0
f(x0)

1
x1
f(x1)

2
x2
f(x2)

.
.
.

.
.
.

.
.
.

n
xn
f(xn)

xi (i = 0, 1, 2, ..., n) .
, (x xi),
f(x) ()
g(x).
f(x)
xi (i = 0, 1, 2,..., n). ,
( ) f(x),
a x b, f(x) , ..
(f(x0), f(x1), ..., f(xn))
, .
g(x),
(, ) f(x)
:
26

f(x);
f(x) ;
g(x);
.


f(x) . ,
g(x) , f(xi), (i = 0, 1,
2, ..., n), .
"" - , , ..,
,
. g(x)
"" , ,
:
b

f ( x)dx g ( x)dx
g(x) .
,
. f(x) ,
g(x).

f(x):

f(x)
.
3.1

g(x)
.
n

g(x) = a0 g0(x) + a1 g1(x) + a2 g2(x) + ... + an gn(x) =

a
i =0

g i (x )

(1)

27


gi(x):

, gi(x) = xi, (i = 0, 1, 2, ..., n);


, gi(x) = sin kx (cos kx), (k = 0, 1, 2,...,n);
, gi(x) = e bi x , (i = 0, 1, 2,..., n).

gi(x)
(), , ..
n

f ( x ) g ( x ) = ai x i
i =0

k =1

k =1

f ( x ) g ( x ) = a 0 + a k cos(kx ) + bk sin (kx )

(2)

f ( x ) g ( x ) = ai e bi x
i =0

,
.
,
. :
1.
;
2. ;
3. , ;
4.
;
5. ,
;
6. x "" ,
;
7.
.
, ,
.
, f(x)

pn(x),
28

.
Weierstrass :
3.1 f(x) [a,b] (a x b),
> 0, pn(x) n = n(),
:

f(x) pn(x) < (a x b)


(Fourier)
.
.
3.2

f (x ) p n (x ) = ai x i

(3)

i =0

ai, (i = 0, 1, 2,..., n)
.
xi f(xi), (i = 0, 1, 2, ..., n)
.
1 :
- xi , f(xi) (i = 0, 1, 2, ..., n)
ai :
pn(xi) = f(xi), (i = 0, 1, 2, ..., n)
n- pn(x)
f(x) (n+1) xi (i = 0, 1, 2, ..., n).

x xi.
( 3.1).

29

3.1


:
3.2 P ( x) = x n + a n 1 x n 1 + ... + a1 x + a 0 n-
. P ( x) = 0 n
1 , 2 ,..., n ( ) P ( x) = ( x 1 )( x 2 )...( x n ) .

2 :

3.2


f(xi), (i = 0, 1, 2, ..., n) ( ).
30

m< n.
1 ,
(n+1) .
: pm(x)
"" () (xi, f(xi)) .
" - "
: (n + 1) f(x)
"" pm(x) (m < n)
- f(xi) pm(xi)
( 3.2).
n

E = = [ p m ( xi ) f ( xi )]
2
i

i =0

i =0

= a j xij f ( xi )
i =0 j =0

(4)

min
m = n E = 0 2
1.
f(xi) ,
w(xi)
:
n

E = w( xi ) i2

(5)

i =0

3 : Minmax
()
(). ,
, :
maxi f(xi) pm(xi) min , (i = 0, 1, 2, ..., n), (m < n)
,
.
4 :
f(x)
. f(x) (n + 1)
[x0, x].
31

f (x ) = f (x0 ) + (x x0 ) f (x0 ) +

(x x0 )2 f '' (x0 ) (x x0 )3 f ''' (x0 )

( x x 0 )n f ( n ) ( x 0 )

2!

3!

+ ... (6)

+ R(x )
n!
R(x) :
+

R(x ) =

(x x0 )( n+1) f ( n+1) ( )
x0 < < x x < < x0 x < x0
(n + 1)!

(7)

x (
), R(x) .

,
.
,
1.
.
3.3

"
n f(x0), f(x1), ... , f(xn) (n+1)
x0, x1, ..., xn". ,
,
a0, a1, ..., an,
.
(ai, i = 0, 1, 2,..., n)
1 :
a 0 + a1 x 0 + a 2 x 02 + a 3 x 03 + .......... ..... + a n x 0n = f ( x 0 )
a 0 + a1 x1 + a 2 x12 + a 3 x13 + .......... ..... + a n x1n = f ( x1 )
.
.
a 0 + a1 x i + a 2 x i2 + a 3 x i3 + .......... ..... + a n x in = f ( x i )
.
.
a 0 + a1 x n + a 2 x n2 + a 3 x n3 + .......... ..... + a n x nn = f ( x n )

32

(8)

(n+1)
ai, i = 0,1,2,...,n. .
.. :
1 x0
1 x1
= .

x02
x12

. .
1 xn

.
x n2

. . x0n
. . x1n
. .

(9)

. . .
. . x nn

= ( x n x 0 )( x n 1 x 0 )...( x1 x 0 )( x n x1 )...( x 2 x1 )...( x n x n 1 )


= ( xi x j ) 0
i> j

,
xi, f(xi)
.
pn(x)
f(x) .
3.3
x.
pn(x)
:
1.
,
( ).
2.
. x
pn(x).
function[A]=vandermond(x)
%funkcija vandermond presmetuva Vandermnd-vata matrica
%Vlez: x vektor-kolona na nezavisnata promenliva
% vo koja se dadeni podatocite
%Izlez: Vandermonde-ova matrica A
n=length(x);
for i=n:-1:1
A(:,i)=x.^(i-1);
end
3.3

33


.
,
n,
.
.
:
1.
2. - . "h"
,
x0 h :
x0
x1 = x0 + h
x2 = x0 + 2h
.
h
h
h
.
x0
x1 x2
xn-1
xn = x0 + nh

.
.


, .
3.4

:
n

Pn ( x) = Li ( x) f ( xi )
i =0
n

Li ( x) =
j =0
j i

(x x j )
( xi x j )

i = 0,1,2,..., n

(10)

x0, f(x0); x1, f(x1); ...; xn,


f(xn), ,
34

f(x) (xi) Li(x)


n- ( n (x-xj)).
, ..:
x = xi
n

Li ( x) =
j =0
j i

( xi x j )
( xi x j )

=1

i = 0,1,2,..., n

k = 0, 1, 2, ...,n k i

x = xk
n

Li ( x) =
j =0
j i

( xk x j )
( xi x j )

=0

i = 0,1,2,..., n


:

( ai, i = 0, 1, 2, ..., n ):
Pn(x) = a0 (x-x1)(x-x2) . . . . . . . . . . (x-xn) +
+ a1 (x-x0)(x-x2) . . . . . . . . . . (x-xn) +
+ a2 (x-x0)(x-x1)(x-x3). . . . . . (x-xn) +
+ . . . . . . . . . . . . . . . . . . . . . . . . . . . .+
+ ai (x-x0) . . . (x-xi-1)(x-xi+1) . . . (x-xn) +
+...........................+
+ an-1 (x-x0)(x-x1) . . . . (x-xn-2)(x-xn) +
+ an (x-x0)(x-x1) . . . . . . . . . .(x-xn-1)

(11)

ai, i = 0, 1, 2, ..., n :
Pn(xi) = f(xi), i = 0, 1, 2, ..., n
f(x0) = a0 (x0-x1) (x0-x2) ... (x0-xn)
f ( x0 )
a0 =
( x 0 x1 )( x0 x 2 )...( x0 x n )

(12)

--f(xi) = ai (xi-x1) (xi-x2) ... (xi-xi-1) (xi-xi+1) ... (xi-xn)


ai =

f ( xi )
(xi -x1 ) (xi -x 2 ) ...(xi -xi-1 ) (xi -xi+1 ) ... (xi -x n )

(13)
35

ai
.
(10).
Rn(x) = f(x) Pn(x), |Rn(x)|

.
f(x) n + 1 [x0, xn],
:
( n +1)
n
f ( )
Rn ( x) = ( x xi )
i =0
(n + 1)!

(x0, x1, ..., xn)

(14)

1 :
a. ( 3.1)
b. f(x) x = 0.5 x = 1.5
3.1

i
0
1
2

xi
0
1
3

f(xi)
-5
1
25

)
L0 ( x) =

( x x1 )( x x 2 )
( x 1)( x 3) x 2 4 x + 3
=
=
( x0 x1 )( x0 x 2 ) (0 1)(0 3)
3

L1 ( x) =

( x x0 )( x x 2 )
( x 0)( x 3) x 2 + 3 x
=
=
( x1 x0 )( x1 x 2 ) (1 0)(1 3)
2

L2 ( x ) =

( x x0 )( x x1 )
( x 0)( x 1) x 2 x
=
=
( x 2 x0 )( x 2 x1 ) (3 0)(3 1)
6

P2(x) = L0(x) f(x0) + L1(x) f(x1) + L2(x) f(x2) = 5 L0(x) + 1 L1(x) +25 L2(x)
P2(x) = 2x2 + 4x 5
x = 0.5

(0.5 1)(0.5 3) 1.25


=
= 0.417
(0 1)(0 3)
3
(0.5 0)(0.5 3) 0.5(2.5)
L1 (0.5) =
=
= 0.625
(1 0)(1 3)
2

L0 (0.5) =

36

L2 (0.5) =

(0.5 0)(0.5 1) 0.5(0.5)


=
= 0.0416
(3 0)(3 1)
6

P2(0.5) = 5 0.417 + 1 0.625 25 0.0416 = 2.5


):
P2(0.5) = 2 (0.5)2 + 4 0.5 5 = 0.5 + 2 5 = 2.5
x = 1.5
(1.5 1)(1.5 3) 0.5( 1.5)
=
= 0.25
(0 1)(0 3)
3
(1.5 0)(1.5 3) 1.5(1.5)
=
= 1.125
L1 (1.5) =
(1 0)(1 3)
2
(1.5 0)(1.5 1) 1.5 0.5
=
= 0.125
L2 (1.5) =
(3 0)(3 1)
6
P2(1.5) = 5 (0.25) + 1 1.125 + 25 0.125 = 5.5
L0 (1.5) =

):
P2(1.5) = 2 1.52 + 4 1.5 5 = 5.5
),
..
.

ai, i = 0, 1, 2, ..., n.

3.4.

:
1.
(
) .
.
2. (
),
f(x)

37


( n +1)
n
f ( )
Rn ( x) = ( x xi )
i =0
(n + 1)!

(x0, x1, ..., xn)


( ), Li(x).
a priori
.
function [P, L] = lagrange(X, Y)
% Funkcijata lagrange(X,Y) sluzi za opredeluvanje na
% lagranzoviot polinom P i pomosnite lagranzovi polinomi,
% cii koeficienti se prestaveni kako redici vo matricata L.
% Za vlez gi ima jazlite na interpolacija X i Y
% prestaveni kako vektor redici
n=length(X);
L=zeros(n,n);
for k=1:n
V=1;
for j=1:n
if k~=j
V=conv(V, poly(X(j)))/(X(k)-X(j));
end
end
L(k,:)=V;
end
P=Y*L;
3.4

3.5

,
:
x1 - x0 = x2 - x1 = x3 - x2 = ... = xn - xn-1 = h

( ) .

:

38

()
()
()

( f(x) + g(x)) = f(x) + g(x)


( f(x) + g(x)) = f(x) + g(x)
( f(x) + g(x)) = f(x) + g(x)
.

,
.
: () ().
3.5.1 -

:
f(x) = f(x+h) f(x)
2f(x) = (f(x)) = (f(x+h) f(x)) = f(x+h) f(x)
3f(x) = (2f(x)) = ((f(x+h) f(x))) = 2f(x+h) 2f(x)
.
nf(x) = n-1f(x+h) n-1f(x)

(15)

f(x) , 2f(x)
.. , xi,
i=0,1,2,3,4,5 f(xi), i=0,1,2,3,4,5
:
-

f(x0) = f(x1) f(x0)


f(x1) = f(x2) f(x1)
f(x2) = f(x3) f(x2)
f(x3) = f(x4) f(x3)
f(x4) = f(x5) f(x4)
-

2f(x0) = f(x1) f(x0) = (f(x2) f(x1)) (f(x1) f(x0)) = f(x2) 2f(x1) + f(x0)
2f(x1) = f(x2) f(x1) = f(x3) 2f(x2) + f(x1)
2f(x2) = f(x3) f(x2) = f(x4) 2f(x3) + f(x2)
2f(x3) = f(x4) f(x3) = f(x5) 2f(x4) + f(x3)
-

3f(x0) = 2f(x1) 2f(x0) = (f(x3) 2f(x2) + f(x1)) (f(x2) 2f(x1) + f(x0)) =


39

= f(x3) 3f(x2) + 3f(x1) f(x0)


f(x1) = 2f(x2) 2f(x1) = f(x4) 3f(x3) + 3f(x2) f(x1)
3f(x2) = 2f(x3) 2f(x2) = f(x5) 3f(x4) + 3f(x3) f(x2)
3

4f(x0)=3f(x1)3f(x0) = (f(x4)3f(x3) + 3f(x2) f(x1)) (f(x3) 3f(x2) +


3f(x1) f(x0)
= f(x4) 4f(x3) + 6f(x2) 4f(x1) + f(x0)
4
f(x1)=3f(x2)3f(x1) = f(x5) 4f(x4) + 6f(x3) 4f(x2) + f(x1)
-

5f(x0)=4f(x1)4f(x0)=(f(x5)4f(x4)+6f(x3)4f(x2)+f(x1))(f(x4)4f(x3)+6f(x2)
4f(x1) +f(x0)) = f(x5) 5f(x4) + 10f(x3) 10f(x2) + 5f(x1) f(x0)
3.2
Pascal- .

f(xi)
i=0,1,2,3,4,5.
3.2

f(x0)
f(x1)
f(x2)
f(x3)
f(x4)
f(x5)

f(x)
1
1

2f(x)
1
2
1

3f(x)
1
3
3
1

4f(x)
1
4
6
4
1

5f(x)
1
5
10
10
5
1

2
i
0
1
2
3
4

xi
0
1
2
3
4

f(xi)
-5
1
9
25
55

f(x)

2f(x)

3f(x)

4f(x)

6
8
16
30

2
8
14

6
6

6 f(x)
, 3 (3 = const.).
f(x) [x0, x4].
40

,

Pn(x) :
Pn(x) = a0 + a1 (x x0) + a2 (x x0) (x x1) +
+a3 (x x0) (x x1) (x x2) ++ an (x x0) (x x1) ... (x xn-1)
Pn(xi) = f(xi)
x = x0
x = x1
x = x2

(15)

i = 0, 1, 2, ..., n :

f(x0) = a0
f(x1) = a0 + a1 (x1 x0) = a0 + a1 h
f(x2) = a0 + a1 (x2 x0) + a2 (x2 x0) (x2 x1) =
= a0 + a1 2h + a2 2h h = a0 + 2a1h + 2a2h2

ai (i = 0, 1, 2, ..., n)
:
0 = f(x0)
1
1
1
a1 = ( f ( x1 ) a 0 ) = ( f ( x1 ) f ( x0 ) ) = f ( x0 )
h
h
h
, ,
ak (k = 0, 1, 2, ..., n) :
ak =

1 k
f ( x0 )
k! h k

k = 0, 1, 2, ..., n

(16)

0f(x0) = f(x0)
:
Pn ( x) = f ( x0 ) +

f ( x0 )
2 f ( x0 )
( x x0 ) +
( x x 0 )( x x1 ) + . . . +
1!h
2!h 2

(17)
n f ( x0 )
+
( x x0 )( x x1 )...( x x n 1 )
n!h n
.
, .
x
"" , .
41

x = x0 + h, :
x x0
=
, 0 n x0 x xn
h
:
x x0 = h
x x1 = x0 + h (x0 +h) = h ( 1)
x x2 = x0 + h (x0 +2h) = h ( 2)
.
.
x xi = h ( i)
.
.
x xn = h ( n)
:
2 f ( x0 )
3 f ( x0 )
+ ( 1)( 2)
+ ... +
2!
3!
n f ( x0 )
(18)
+ ( 1)( 2) . . . ( n + 1)
n!

Pn ( x0 + h) = f ( x0 ) + f ( x 0 ) + ( 1)

3
- ( 3.3) 0.5
1.5.
3.3

i
0
1
2
h = 1, x0 = 0
x = 0.5

xi
0
1
2

f(xi)
-5
1
11

f(x)

2f(x)

6
10

x x 0 0.5 0
=
= 0.5
1
1

P2(0.5) = P2(0+0.5h) = 5 + 0.5 6 + 0.5 (0.5 1)


x = 1.5

x x 0 15
. 0
.
=
= 15
1
1

P2(1.5) = P2(0+1.5h) = 5 + 1.5 6 + 1.5 (1.5 1)


42

4
= 5 + 3 0.5 = 2.5
2!

4
= 5 + 9 + 1.5 = 5.5
2!

[xn+1, f(xn+1)],
. ,
( n+1 )
n- .
n- n+1-
. ,
, f(x).
Rn(x0+h) :
Rn(x0+h) = ( 1)( 2) . . . . . . ( n)

n +1f ( x 0 )
( n + 1)!

(19)

-
3.5.
function [P, vy, KR] = newtnint(X, Y, vx)
% Funkcijata newtnint(X, Y, vx)sluzi za opredeluvanje na
% Njutnoviot interpolacionen polinom - napred P so pomos na
% jazlite na interpolacija X i Y prestaveni kako vektor redici,
% kako i vrednosta na P vo tockata vx. KR e matrica
% na konecni razliki
n=length(X);
KR=zeros(n,n);
KR(:,1)=Y';
for j=2:n
for i=j:n
KR(i,j)=KR(i,j-1)-KR(i-1, j-1);
end
end
P=KR(1,1);
h=X(2)-X(1);
pom=1;
del=1;
for i=2:n
del=1/(h*(i-1));
pom=conv(del*pom, poly(X(i-1)));
P=[0 P];
P=P+KR(i,i)*pom;
nd
vy=polyval(P,vx);
3.5 -

4 ( 3.4)
f(x) x=1.5 .
f(x) xi (i = 0, 1, 2, 3, 4):
43

3.4

i
0
1
2
3
4

xi
0
1
2
3
4

f(xi)
-5
1
9
25
55

f(x)

2f(x)

3f(x)

4f(x)

6
8
16
30

2
8
14

6
6

h = 1,
.

,
:
x0, x1, x2
x1, x2, x3
:

x x 0 1.5 0
=
= 1.5
1
1

f(1.5) P2(1.5) = 5 + 1.5 6 + 1.5 (1.5 1)

2
= 5 + 9 + 0.75 = 4.75
2!

x x0 1.5 1
=
= 0.5
1
1

f(1.5) P2(1.5) = 1 + 0.5 8 + 0.5 (0.5 1)

8
= 1 + 4 + (1) = 4
2!

:
2 f ( x 0 )
3 f ( x 0 )
f (1.5) P3 (1.5) = f ( x 0 ) + f ( x 0 ) + ( 1)
+ ( 1)( 2)
2!
3!
x0, x1, x2, x3
.

44

x x 0 1.5 0
=
= 1.5
1
1

2
6
+ 1.5 0.5 (0.5) =
2!
3!
= 5 + 9 + 0.75 0.375 = 4.375

f(1.5) P3(1.5) = 5 + 1.5 6 + 1.5 (1.5 1)

x1,x2,x3,x4:

x x1 1.5 1
=
= 0.5
1
1

f(1.5) P3(1.5) = 1 + 0.5 8 + 0.5 (0.5 1)


= 1 + 4 1 +0.375 = 4.375

8
6
+ 0.5 (0.5 1) (0.52) =
2!
3!

,
, f(x)
,
.
.
,
.
.
3.5.2 -

:
f(x) = f(x) f(xh); -
2f(x) = f(x) f(xh); -
3f(x) = 2f(x) 2f(xh); -
.
.
nf(x) = n-1f(x) n-1f(xh); - n-
,
. xn x0.

( )
xn.
x xn
; n 0 x0 x xn
x = xn + h; =
h

3.5:
45

3.5

f(x)
f(x0)
f(x1)
f(x2)
f(x3)
f(x4)
f(x5)

1
1

2f(x)

3f(x)

4f(x)

1
2
1

1
3
3
1

1
4
6
4
1

5f(x)
1
5
10
10
5
1


:
f ( x n )
2 f ( xn )
Pn ( x ) = f ( x n ) +
( x xn ) +
( x x n )( x x n 1 ) + ... +
(20)
1!h
2!h 2
n f ( xn )
+
( x x n )( x x n 1 )...( x x1 )
n!h n
:
2 f ( xn )
3 f ( xn )
+ ( + 1)( + 2)
+ ... +
2!
3!
(21)
n
f ( xn )
+ ( + 1)( + 2) ... ( + n 1)
n!

Pn ( x n + h) = f ( x n ) + f ( x n ) + ( + 1)

Rn :
Rn ( x n + h) = h n +1 ( + 1) ... ( + n)

f n +1 ( )
(n + 1)!

x0 xn

(22)

5 4
- .
3.6

i
0
1
2
3
4

46

xi
0
1
2
3
4

f(xi)
-5
1
9
25
55

f(x)
6
8
16
30

2f(x)
2
8
14

3f(x)
6
6

4f(x)
0

, ,
f(x), .
,
Rn.
:
n +1f ( x n )
Rn(xn+h) = ( + 1)( + 2) ... ( + n)
( n + 1)!

(23)


x xn.
x x0
.
-
3.6.
function [P, vy, KR] = newtnnazad(X, Y, vx)
% Funkcijata newtnint(X, Y, vx) sluzi za opredeluvanje na
% Njutnoviot interpolacionen polinom - nazad P so pomos na
% jazlite na interpolacija X i Y prestaveni kako vektor redici,
% kako i vrednosta na P vo tockata vx. KR e matrica
% na konecni razliki
n=length(X);
KR=zeros(n,n);
KR(:,1)=Y';
for j=2:n
for i=1:(n-j+1)
KR(i,j)=KR(i+1,j-1)-KR(i, j-1);
end
end
P=KR(n,1);
h=X(2)-X(1);
pom=1;
del=1;
for i=2:n
del=1/(h*(i-1));
pom=conv(del*pom, poly(X(n-i+2)));
P=[0 P];
P=P+KR(n-i+1,i)*pom;
end
vy=polyval(P,vx);
3.6 -

6 f(x) x = 3.5
6.
f(3.5) P(3.5) h = 1
47

x xn 3.5 4
=
= 0.5
1
1

P3 (3.5) = 55 + (0.5) 30 +

(0.5) 0.5
(0.5) 0.5 1.5
14 +
6 = 37.875
2!
3!

3.6

"m"
"n" (.. )
.

.
()
""
.
.
,
(x0 xn)
.
[x0, xn]
.
.
.
,
.
[x0, xn]
,
. "n"
.
"n" , .
n = 2 3,
.
10,
x-.
, 10 10 x-
10 .
Runge- 3.7.
48

1
[-5, 5],
1+ x2
5,
10.

f ( x) =

1,5

0,5

0
-5

-4

-3

-2

-1

-0,5

3.7 Runge-

, . f(xi)
.
( ),

.
.

, ..

.

.
.
. ,
, .

( )
f(x) x.
,
. f(x)
.
49

a x
i =0

, ( )

Vandermonde :
1 x0 x02 . . x0n
1 x1

x12

. . x1n

= .

. .

. .

1 xn

x n2

. . x nn


( ),
.
3.7

f(x,y)
. m n
f(xi,yj), "m" xi (i=0, 1, 2,
..., m) "n" yj (j=0, 1, 2, ..., n).
fi,j = f(xi,yj) (
3.8) "i" x = xi, "j" y = yj.
() x y
f(x,y).

3.8

50

.
xixxi+1 yjyyj+1, .
.
(
) fi,j fi+1,j fi,j+1 fi+1,j+1
A B (fA fB). fA fB
f(x,y).
:
y yj
x xi
=
=
xi +1 xi
y j +1 y j
:
(24)

f(x,y) = (1 ) (1 ) fi,j + (1 ) fi,j+1 + (1 ) fi+1,j + fi+1,j+1

3.9


.
, 4 4 = 16
. ,
( 3.9). x

fA, fB, fC fD. A, B, C D
f(x,y).

51

1.
:
a. 3-
b. P3(2).
i
0
1
2
3
4

xi
-5
-2
0
1
3

f(xi)
-78
-3
-3
0
18

2.
P4(3).
i
0
1
2
3
4

xi
-2
-1
0
1
2

f(xi)
-31
-4
1
2
5

3. :
a. 3-
b. P3(0.2).
i
0
1
2
3
4

xi
-1
0
1
2
3

f(xi)
2
-1
2
35
170

4. P3(-1.1)

52

i
0
1
2
3

xi
-1.5
-1
-0.5
0

f(xi)
-5.25
0
2.25
3

5.
3- .

i
0
1
2
3

xi
-1
0
1
2

f(xi)
2
-1
6
35

6.
, 12 .
3.7
f(x,y) .
x=130 y=450.
3.7

y
x
100
150
200

200

300

400

500

0.38
0.42
0.39

0.43
0.45
0.37

0.41
0.39
0.34

0.28
0.33
0.29

53

,
f(x),
. ,
, ,
,
.
,
,
.
,
.
4.1
4.1 f x

f ( x + h) f ( x )
f ' ( x) = lim
(1)
h 0
h
.
f(x+h)-f(x) , h
.

4.1

54

4.2 f f'(x) x,
f x.
x ,
(
4.1).

. 4.1,
x .
(x1, f(x1)) (x2, f(x2)) ( 4.2).
x,
:
f ( x2 ) f ( x1 ) f 2 f1
=
f ' ( x) =
x2 x1
x2 x1

4.2



.
4.1.1


(1), ,
:
f ( x + h) f ( x )
f ' ( x)
h
f ( x ) f ( x h)
(2)
f ' ( x)
h
f ( x + h ) f ( x h)
f ' ( x)
2h
55

4.3

4.3.

AC.
AB.

.
BC.
.
4.1.2
-

x0

x1

xn

4.4 f(x) P(x)

56


f(x0), f(x1) ... f(xn) xi (i = 0, 1, ..., n)
P(x).
f'(x)
f(x) .
P(x) f(x) ,
( 4.4).

:
x x0
=
; x = x0 + h;
h
2 f ( x0 )
3 f ( x0 )
f ( x) = P( x) = f ( x0 ) + f ( x0 ) + ( 1)
+ ( 1)( 2)
+
2!
3!
(3)
4 f ( x0 )
...
+ ( 1)( 2)( 3)
4!
,
2 f ( x0 )
3 f ( x0 )
+ ( 3 3 2 + 2 )
+
2!
3!
4 f ( x0 )
...
+ ( 4 6 3 + 11 2 6 )
(4)
4!

f ( x) = P( x) = f ( x0 ) + f ( x0 ) + ( 2 )

x x0
;
h

df
df d 1 df
=

=
dx d dx h d

:
1
1
3 2 6 + 2

f ' ( x) = f ( x 0 ) + 2 f ( x 0 ) + 3 f ( x0 )
+
h
2
6

2 3 9 2 + 11 3
+ ...
12

1
6 2 18 + 11
+ ...
f ' ' ( x) = 2 2 f ( x0 ) + 3 f ( x0 )( 1) + 4 f ( x0 )
+ 4 f ( x0 )

h
1
2 3

f ' ' ' ( x) = 3 3 f ( x0 ) + 4 f ( x0 )


+ ...
h
2

1 4
IV
f ( x) = 4 f ( x0 ) + ...
h

12

(5)

57

1 4.1 f(x) =
h = 0.05.

4.1

k
0
1
2
3
4
5
6

x
1.00
1.05
1.10
1.15
1.20
1.25
1.30

f(x)= x
1.00000
1.02470
1.04881
1.07238
1.09544
1.11803
1.14017

f(x0)

2f(x0)

3f(x0)

0.02470
0.02411
0.02357
0.02307
0.02259
0.02214

0.00059
0.00054
0.00050
0.00048
0.00045

0.00005
0.00004
0.00002
0.00003

x0 = 1.00
.
f ' (1) =

1
(0.02470 + 0.000295 + 0.000017) = 0.50024
0.05

f ' ' (1) =

1
( 0.00059 0.00005) = 0.256
0.05 2

f ' ' ' (1) =

1
(0.00005) = 0.4
0.053

:
f'(1) = 0.5

f''(1) = 0.25

f''' (1) = 0.375


, , . ,
.
4.2


f(x).
b

f ( x)df
a

58

4.1 f(x)
[a,b]. F(x) f ( x) = F ' ( x) x
[a,b]. :
b

f ( x)df

= F (b) F (a )

,
F
.
.

,
.

.
( 4.5).
.
. , ,

.
.

4.5

4.2.1


. ,
f(x) [a, b]
P(x) :
59

(6)

f ( x)dx P( x)dx
4.2.1.1


(3.(18)) x0 xn,
, ,
.

x1

P( x)dx

x0 x1

x0

(3.(18)) : P(x) = f(x0) + f(x0)


x = x0 + h dx = h d
x = x0
=0
x = x1
=1
x1
1
1
f ( x0 )

x P( x)dx = h 0 P( )d = h0 ( f ( x0 ) + f ( x0 ))d = h f ( x0 ) + 2
0

(7)

f(x0) = f(x1) f(x0)


x1

P( x)dx = h f ( x

)+

x0

x1

2 f ( x0 ) + f ( x1 ) f ( x0 )
f ( x1 ) f ( x0 )
=h
2
2

P( x)dx = 2 ( f ( x

) + f ( x1 ) )

(8)

x0

x2

x0 x2

P( x)dx

x0

(3.(18)) : P(x) = f(x0) + f(x0) + ( 1)

2 f ( x0 )
2

x2

2
2

2 f ( x0 )

d =
P
x
dx
h
P
d
h
f
x
f
x

=
=
+

(
)
(
)
(
)
(
)
(
1
)
0

0
0 0
2

x0

3 2 2 f ( x 0 )
2

= h f ( x 0 ) +
f ( x 0 ) +

2
2
2
3

60

2 f ( x 0 )

= h 2 f ( x0 ) + 2f ( x0 ) +
3

f(x0) = f(x1) f(x0) 2f(x0) = f(x0) 2f(x1) + f(x2) :


x2

P( x)dx = h 2 f ( x

) + 2 f ( x1 ) 2 f ( x0 ) +

x0

f ( x0 ) 2 f ( x1 ) f ( x 2 )

+
=
3
3
3

f ( x0 ) + 4 f ( x1 ) + f ( x2 )
= h

x2
h
P( x)dx = ( f ( x0 ) + 4 f ( x1 ) + f ( x 2 ) )
3
x0

(9)
x3

x0 x3

P( x)dx

x0

(3.(18)) :
2 f ( x0 )
3 f ( x0 )
+ ( 1)( 2)
P(x) = f(x0) + f(x0) + ( 1)
2
3!
x3

3
3

2 f ( x0 )
3 f ( x0 )

d =
=
=
+

P
x
dx
h
P

h
f
x

f
x

(
)
(
)
(
)
(
)
(
1
)
(
1
)(
2
)
0
0

0
0
2
3!
x0

3 2 2 f ( x0 ) 4
2
3
2 3 f ( x0 )

= h f ( x0 ) +
f ( x0 ) +

+
3 + 2

2
2
2
3
2
6
3
4

9
9
3

= h 3 f ( x0 ) + f ( x0 ) + 2 f ( x0 ) + 3 f ( x0 )
4
8
2

: f(x0) = f(x1) f(x0)


2f(x0) = f(x0) 2f(x1) + f(x2)
3f(x0) = f(x3) 3f(x2) + 3f(x1) f(x0) :

=
0

x3

P( x)dx =

x0

9
9
3

h 3 f ( x0 ) + ( f ( x1 ) f ( x0 ) ) + ( f ( x0 ) 2 f ( x1 ) + f ( x2 ) ) + ( f ( x3 ) 3 f ( x2 ) + 3 f ( x1 ) f ( x0 ) )
2
4
8

x3

P( x)dx = 8 h( f ( x

) + 3 f ( x1 ) + 3 f ( x 2 ) + f ( x3 ) )

(10)

x0

8, 9 10 4.6.

61

x0

x1

x0

x1

x2

x0

x1

x2

x3

4.6

a) x0 x1
b) x0 x2
c) x0 x3

:
xn

P( x)dx = C h(C

f ( x0 ) + C1 f ( x1 ) + ... + C n f ( x n ) )

(11)

x0

C Ci, i = 0, 1, ... n n = 8
( 4.2):
4.2

n5
1
2
3
4
5
6
7
8

C0
1
1
1
7

C1
1
4
3
32

C2

C3

C4

1
3
12

1
32

1
140

41

216

27

272

4
14175

989

5888

-928

10496

2
45

C5

C6

27

216

41

-4540

10496

-928

C7

C8

5888

989

4.2.1.2

(8) (
4.7) :
62


xn

P( x)dx 2 h[ f ( x

x0

1
1
1
) + f ( x1 )] + h[ f ( x1 ) + f ( x 2 )] + h[ f ( x 2 ) + f ( x 3 )] + ... + h[ f ( x n 1 ) + f ( x n )]
2
2
2

xn

P( x)dx 2 h[ f ( x

) + 2 f ( x1 ) + 2 f ( x 2 ) + ... + 2 f ( x n 1 ) + f ( x n )]

(12)

x0

f(x0)

f(x1)

f(x2)

f(x3)

f(xn-1)

f(xn)

x0

x1

x2

x3

xn-1

xn

4.7
1

ex
x dx
0.4

h=0.1 x, ex, f(x) =

ex
,
x

0.4 1 0.1.
k

xk

0
1
2
3
4
5
6

0.4
0.5
0.6
0.7
0.8
0.9
1.0

f(x) =

xk

1.4918
1.6487
1.8221
2.0138
2.2255
2.4596
2.7183

e xk
xk

3.7295
3.2954
3.0368
2.8734
2.7819
2.7288
2.7183
5

f (x) = 14.7164
1

e
1
dx = h( f ( x0 ) + 2 f ( x1 ) + 2 f ( x 2 ) + 2 f ( x3 ) + 2 f ( x 4 ) + 2 f ( x5 ) + f ( x6 ) ) =
x
2
0.4

63

1
0.1(3.7295 + 2 14.7163 + 2.7183) =1.79402
2

4.2 ( ) f''(x)
b

[a, b]. I = f ( x)dx T


a

[a, b]
h. [a, b] :
(b a )h 2
I T =
f ' ' ( )
12
3
2

1dx 10-8?

f ( x) = x 3 1 , f ' ( x) = 3x 2 f ' ' ( x) = 6 x . f''()


12 [0, 2].
n , 4.2 :
2

2020
2 f ' ' ( )
f ' ' ( ) =

12 n
3n 2
10-6 :
2 12
10 8
3n 2
n 8 10 4 .

4.8.
function vr = trapez(a,b,n,fun)
% Funkcijata trapez(a,b,n,fun) presmetuva numericka aproksimacija na
% opredelen integral so Trapezno pravilo vo intervalot [a,b] so
% n podintervali
f=str2func(fun);
h=(b-a)/n;
x=a:h:b;
y=f(x);
vr = y(1)+y(n+1);
for k = 2:n
vr = vr + 2 * y(k);
end
vr = vr * h / 2;
4.8

64

4.2.1.3

( Thomas Simpson)
.
(9) x0 x2, x2
x4 , 4.9.
xn

P( x)dx 3 [ f ( x

) + 4 f ( x1 ) + f ( x 2 )] +

x0

h
[ f ( x 2 ) + 4 f ( x3 ) + f ( x 4 )] + ...
3

h
[ f ( xn2 ) + 4 f ( xn1 ) + f ( xn )]
3

xn

P( x)dx 3 [ f ( x

) + 4 f ( x1 ) + 2 f ( x 2 ) + 4 f ( x3 ) + . . . + 2 f ( x n 2 ) + 4 f ( x n 1 ) + f ( x n )] (13)

x0

f(x0)

f(x1)

x0

x1

f(x2)

f(x3)

f(x4)

f(x5)

f(xn-2) f(xn-1) f(xn)

x2
x3
x4
x5
xn-2
4.9

xn-1

xn


.
4 2
.
1

ex
h
0.4 x dx = 3 ( f ( x0 ) + 4 f ( x1 ) + 2 f ( x2 ) + 4 f ( x3 ) + 2 f ( x4 ) + 4 f ( x5 ) + f ( x6 )) =

0.1
[3.7295 + 2.7183 + 4(3.2954 + 2.8734 + 2.7288) + 2(3.0368 + 2.7819)] =
3
0.1
(6.4478 + 4 8.8976 + 2 5.8178) = 0.1 53.6756 =1.78919
=
3
3
65


/2

sin xdx ,

:
a)
b)
c)
x
sin x

/12
0.25882

0
0.00000

2/12
0.50000

3/12
0.70711

4/12
0.86603

5/12
0.96593

/2
1.0000

1.
a. n=6
/2

sin xdx = 140


0

/2
6

(41 0 + 216 0.25882 + 27 0.5 + 272 0.70711 + 27 0.86603 +

+ 216 0.96593 + 41 1) =

1
0.261799 534.76273 = 1.000004
140

b.
/2

sin xdx = 2 0.261799(0 + 2 0.25882 + 2 0.5000 + 2 0.70711 + 2 0.86603 +


0

+ 2 0.96593 + 1.0000) = 0.130900 7.595780 =0.994285


c.
/2

sin xdx = 3 0.261799(0 + 4 0.25882 + 2 0.5 + 4 0.70711 + 2 0.86603 +


0

+ 4 0.96593 + 1.00000) = 0.087266 11.459500 =1.00003



.

.
4.3 ( ) fIV(x)
b

[a, b]. I = f ( x)dx S


a

66

[a, b]
ba
h =
. [a, b] :
2m
(b a)h 4 IV
I S =
f ( )
180
6
2

1dx 10-8?

f ( x) = x 4 1 , f ' ( x) = 4 x 3 , f ' ' ( x) = 12 x 2 , f ' ' ' ( x) = 24 x


f IV ( x) = 24 . fIV() 24 [0, 2].
n , 4.3
:
4

2 0 2 0 IV
8 f IV ( )

f ) =

180 n
45n 4
10-8 :
8 24
10 8
4
45n
n 4

64
10 2 .
15

4.10.
function vr = simpson(a,b,n,fun)
% Funkcijata simpson(a,b,n,fun) presmetuva numericka aproksimacija na
% opredelen integral so Simpsonovo pravilo vo intervalot [a,b] so
% 2n podintervali
f=str2func(fun);
h=(b-a)/(2*n);
x=a:h:b;
y=f(x);
vr = y(1)+4*y(2*n)+y(2*n+1);
for k = 2:2:(2*n-2)
vr = vr + 4 * y(k)+2*y(k+1);
end
vr = vr * h / 3;
4.10

67

4.2.2


,
,
.
, , :
b

f ( x)dx Wk f ( x k )

(14)

k =1

Wk , xk
.. Legendre
.
. ,
(12) :
b

f ( x)dx 2 f ( x
a

) + h f ( x1 ) + h f ( x 2 ) + ... +

h
f ( xn )
2

h/2, h, h, ..., h/2 x0, x1, x2, ... , xn.


(13) :
b

f ( x)dx 3 f ( x
a

)+

4h
2h
2h
4h
h
f ( x1 ) +
f ( x 2 ) + ... +
f ( xn2 ) +
f ( x n 1 ) + f ( x n )
3
3
3
3
3

h/3, 4h/3, 2h/3, ..., 2h/3, 4h/3, h/3 x0, x1,


x2, ..., xn-2, xn-1, xn.
n
Wk xk .
f(x), a x
b 1 z +1
z (b a ) + b + a
x=
(15)
2

ba
dx =
dz

2
2 x (b + a)
(16)
z=
ba
68

:
x = a
x = b

z = 1
z = +1

(14) :
+1

f ( x)dx =

b a z (b a ) + b + a
f
dz
2 1
2

4.3

xk

1
= 0.57735027
3

1.00000000

1
= +0.57735027
3

1.00000000

3
= 0.77459667
5

2
3

Wk

1
2
3
4
1
2
3
4
5

0.0
-+

3
= +0.77459667
5
0.86113631
0.33998104
+0.33998104
+0.86113631
0.90617985
0.53846931
0.0
+0.53846931
+0.90617985

5
= 0.55555556
9
8
= 0.88888889
9
5
= 0.55555556
9
0.34785485
0.65214515
0.65214515
0.34785485
0.23692689
0.47862867
0.56888889
0.47862867
0.23692689

:
+1

f ( z )dz = Wk f ( z k )

(17)

k =1

(14) :
69

f ( x)dx

(b a) n
z (b a) + b + a
Wk f k

2 k =1
2

(18)

4.3 .
7
:
1

f ( z )dz = ( z

+ z 2 + z + 1)dz

4.3 :
1

f ( z )dz = Wk f ( x k ) = 1 f (0.57735027) + 1 f (0.57735027)


i =1

f(0.57735027) = 2.10313369
f(0.57735027) = 0.56353297
2

W
i =1

f ( x k ) = 2.10313369 + 0.56353297 = 2.66666666


1

z4 z3 z2

1( z + z + z + 1)dz = 4 + 3 + 2 + z = 2.66666666
1
.
1

8
:
2
dx
2
= ln x 1 = 0.69314718
I =
x
1
(16) 1x2
1 z 1.
2 x (b + a ) 2 x 2 1
dz
z=
=
= 2x 3
dz=2dx dx =
ba
2 1
2
f ( x) =

70

1
x

f ( z) =

1
2
2
=
=
z (b a) + b + a z (2 1) + 2 + 1 z + 3
2

2 dz
1
dx
1 x = 1 z + 3 2 = 1 z + 3 dz
:
k

zk

Wk

1
2
3
4
5

0.90617985
0.53846931
0.00
+0.53846931
+0.90617985

0.23692689
0.47862867
0.56888889
0.47862867
0.23692689

f (zk ) =

1
zk + 3

0.47759593
0.40625128
0.33333333
0.28260808
0.25600460
5

W
k =1

Wk f(zk)
0.11315529
0.19444351
0.18962962
0.13526433
0.06065437

f ( z k ) = 0.69314712

7 .
4.11.
function I = GaussQR(a, b, n,fun)
% Funkcijata GaussQR(n,fun) presmetuva numericka aproksimacija na
% opredelen integral so Gausovotokvadratno pravilo vo intervalot [a,b] so n tocki, kade n
% pripaga vo mnozestvoto {2,3,4,5}. Pritoa fun e transformiranata funkcija vo interval [-1,1].
f=str2func(fun);
X2=[-0.57735027 0.57735027]; Z2=[1 1];
X3=[0.77459667 0 0.77459667]; Z3=[5/9 8/9 5/9];
X4=[-0.86113631 -0.33998104 0.33998104 0.86113631];
Z4=[0.34785485 0.65214515 0.65214515 0.34785485];
X5=[-0.90617985 -0.53846931 0 0.53846931 0.90617985];
Z5=[0.23692689 0.47862867 0.56888889 0.47862867 0.23692689];
if n==2
S=sum(f(X2).*Z2);
else if n==3
S=sum(f(X3).*Z3);
else if n==4
S=sum(f(X4).*Z4);
else if n==5
S=sum(f(X5).*Z5);
else
displ('Pogresen vnes za n');
end
end
end
end
I=S*(b-a)/2;
4.11

71

1. :
4.7 x
e ln x
a.
dx h=0.3;
x
2
1
1 + x x [0,0.5]
b. f ( x)dx f ( x) =
h=0.1.
2 x x (0.5,1]
0
2.
3

a.

ln xdx h=0.1;

2
2

b.

(2 + cos(2 x ))dx h=0.2.


0

3.
1
1
-10
0 1 + x dx 10 ?
4.
1
1
-10
0 1 + x dx 10 ?
4

5. e x x ln xdx :
1

a. h=0.2;
b. h=0.3;
c. n=6 (h=0.5).
6. 5 ,
1 x
e
dx .
x
0.4

72


.
,

. ,
, ..
.


, . (1)

. .
a11 x1 + a12 x2 + a13 x3 + ... + a1 j x j + ... + a1n xn = b1

a 21 x1 + a 22 x2 + a 23 x3 + ... + a 2 j x j + ... + a 2 n x n = b2
...

a i1 x1 + ai 2 x 2 + ai 3 x3 + ... + aij x j + ... + ain x n = bi


...

a n1 x1 + a n 2 x 2 + a n 3 x3 + ... + a nj x j + ... + a nn x n = bn

(1)

Ax=b,
A , x
, b , :

73

a11

a 21

...

ai1

...

a
n1

a12

... a1 j

a 22

... a 2 j

ai 2

...

a ij

an2

... a nj

... a1n x1 b1

... a 2 n x 2 b2

... ...
=
... ain xi bi

... ...

... a nn x n bn

(2)


:
1.
2 x1 + x 2 = 4
(1, 2).
1:
x1 x 2 = 1

2.
4 x1 + 6 x 2 = 10
.
2:
2 x1 + 3x 2 = 6

3.
4 x1 + 6 x 2 = 12
,
3:
2 x1 + 3x 2 = 6
6 2 x1

x1 ,
x1 D .
3

2 3 .
( )
. ,

. ,
,
.
74

. .
,
, .
,
.

, .
5 x1 + 7 x 2 = 12
(1,1).
4:
7 x1 + 10 x 2 = 17

, : x1 = 2.415; x2 = 0.
5 2.415 + 7 0 = 12.075

.
7 2.415 + 10 0 = 16.905

5.1

,
.

- .
, ( 5.1).
.
.
.
,
,
75

,
.

:

, ,
. "
" ,
. ()
. ,
, .
.
,
.
5.1

-

.
(1) n n .

a110.
n-1 mi :
a
i = 2,3,...,n
mi = i1
a11

a
m2 = 21 ;
a11

m3 =

a31
a
; . . . . . mn = n1
a11
a11

mi,
(i=2,3,..,n) (n-1) .
, n- .
x1 .
:
mi =

76

ai1
;
a 11

i = 2,3,...,n

aij' = aij mi a1 j

j = 1,2,...,n

ai'1 = ai1 mi a11 = ai1

j = 1

ai1
a11 = 0
a11

, x1 :
mi =

ai1
;
a 11

i = 2,3,...,n

ai'1 = 0
bi' = bi mi b1 ;

i = 2,3,...,n

a = aij mi a1 j ;

= 2,3,...,n

'
ij

x1 n- ,
:
a11 x1 + a12 x 2 + a13 x3 + ... + a1 j x j + ... + a1n x n = b1

'
'
x 2 + a 23
x3 + ... + a 2' j x j + ... + a 2' n x n = b2'
+ a 22
0
...

+ ai' 2 x 2 + ai' 3 x3 + ... + aij' x j + ... + ain' x n = bi'


0
...

'
0
x n = bn'
+ a n' 2 x 2 + a n' 3 x3 + ... + a nj' x j + ... + a nn
x2 n- .
x3 n- ..
xn-1 n- .
:
k- xk k+1 n-
. mi,
k-1 :
m

( k 1)
i

aik( k 1)
= ( k 1) ;
a kk

i = k+1, k+2, ..., n

(3)

k-1 (
). a kkk 1 0 .
:

77

aij( k ) = aij( k 1) mi( k 1) a kj( k 1)

aik( k ) = 0

bi( k ) = bi( k 1) mi( k 1) bk( k 1)


i = k+1, k+2, ..., n
j = k+1, k+2, ..., n

(4)

() :
1, 2, 3, n-1.
k = n-1, xn-1 n-
. (n-1) ()
(5).
a11 x1 + a12 x2 + a13 x3 + ... + a1 j x j + ... + a1n x n = b1

'
'
+ a 22
x 2 + a 23
x3 + ... + a 2' j x j + .... + a 2' n x n = b2'

...

a 'jj x j + ... + a 'jn x n = bi'

...

'

a nn
x n = bn'

(5)


- .
- (6).
xn =

x n 1

bn
;
a nn
b a n 1,n x n
= n 1
a n 1,n 1

...
xj =

b j a jn x n a j ,n 1 x n 1 ... a j , j +1 x j +1

(6)

;
j = n-2, n-3, ..., 2,1
a jj

() .

.
. ,
.

.

78

(pivot) , ,
, .
:
m

( k 1)
i

aik( k 1)
= ( k 1) ;
a kk

i = k+1, k+2, ...,n

0
:
a kk( k 1) aik( k 1)
akk
. ,
n-k+1 ()

.

5.2.
function [A,promenlivi, redici]=PGE(A)
% PGE(A) transformira dadena matrica A so praviloto
% na glavni elementi, promenlivi go sodrzi redot na promenlivite
% redici ja sodrzat permutacijata na redicite
[n n]=size(A);
promenlivi=1:n;
redici=1:n;
for j=1:n-1
ir=1:n;
ik=ir;
[maxr, rpom]=max(abs(A(j:n, j:n)));
rpom=rpom+j-1;
[maxk,km] =max(abs(maxr));
pom=ik(j); ik(j)=km+j-1; ik(km+j-1)=pom;
rm=rpom(km);
pom=ir(j); ir(j)=rm; ir(rm)=pom;
promenlivi=promenlivi(ik);
redici=redici(ir);
A= A(ir, :);
A=A(:,ik);
end
5.2

5:
.
79

:
x1 + x 2 + x3 = 4

2 x1 + 3x 2 + x3 = 9

x1 x 2 x3 = 2
x1 + x 2 + x3 = 4

x 2 x3 = 1

2 x 2 2 x3 = 6

m2 =

2
1

m3 =

1
1

m3 =

2
1

x1 + x 2 + x3 = 4

x 2 x3 = 1

4 x 3 = 4

:
x3 = 1
x2 = 1 + x3 = 2
x1 = 4 x2 x3 = 4 2 1 = 1

x1 = 1; x2 = 2; x3 = 1

6: .
:
1.241 10 0 x1 + 1.600 10 2 x 2 = 1.632 10 2

1.020 10 4 x1 + 1.540 10 3 x 2 = 1.174 10 4


: x1 = 1.000 100 x2 = 1.000 100

.
:
1.020 10 4
m=
= 3.147 10 3
0
3.241 10
,
:
80

5.730 10-1 x1 5.020 105 x2 = 5.019 105


x1, ,
.
:
5.019 10 5
= 9.998 10 1
x2 =
5
5.020 10
: x1 = 9.873 10-1
x1
, x2,
.
,
:
3.241 10 0
= 3.177 10 4
m=
4
1.020 10
:
0.000 x1 + 1.595 102 x2 = 1.595 102
: x1 = 1.000 100 x2 = 1.000 100
function x = gausjordan(A,b)
% Funkcijata gausjordan(A,b) ovozmozuva resenie na simultaniot sistem
% linearni ravenki, daden vo matricna forma Ax=b so
% Gaus-Jordanovata metoda so praviloto na glavni elementi
[n n]=size(A);
[A, promenlivi, redici]=PGE(A);
A=[A';b(redici)']';
x=zeros(n,1);
for i=1:n
for k=i+1:n
if A(i,i)==0, break,end
m=A(k,i)/A(i,i);
A(k,:)=A(k,:)-m*A(i,:);
end
end
x(n)=A(n,n+1)/A(n,n);
for i=n-1:-1:1
suma=0;
for j=i+1:n
suma=suma+x(j)*A(i,j);
x(i)=(A(i,n+1)-suma)/A(i,i);
end
end
x(promenlivi)=x;
5.3 -

81

(n > 100),
,
. ,
( )
, .
- 5.3.
5.2

-
. (1),
, - xk
(7).
xk =

1
a kk

k 1
n

b
a
x

k ki i a ki xi k = 1, 2, ..., n
i =1
i = k +1

(7)

() ;
;
( ),

.


,
.
1
:
X ( r 1) X ( r )

(8)

,
,

, .

r
X =

x
i =1

82

2
i

X = ( x1 , x 2 ,..., x n )

10x 1 + x 2 + x 3 = 12

7 2x 1 + 10x 2 + x 3 = 13
2x + 2x + 10x = 14
1
2
3

=0.002 (0,0,0).


:
x1 = 1.2 0.1x2 0.1x3
x2 = 1.3 0.2x1 0.1x3
x3 = 1.4 0.2x1 0.2x2
, :
x1 = 1.2, x2 = 1.3, x3 = 1.4
x1, x2 x3 .
:
x1 = 0.930, x2 = 0.920, x3 = 0.900
5.1.
5.1

i
1
2
3
4
5
6
7

x1
1.2000
0.9300
1.0180
0.9946
1.0015
0.9996
1.0001

X(i)
x2
1.3000
0.9200
1.0240
0.9934
1.0019
0.9995
1.0002

x3
1.4000
0.9000
1.0300
0.9916
1.0024
0.9993
1.0002

X ( i ) X (i 1)
2.2561
0.6836
0.1883
0.0544
0.0154
0.0044
0.0012

7-
,
.
5.4.
,
J, err.
83


.
function [x, J, err] = jakobi(A,b,x0,tol,maxi)
% Funkcijata jakobi(A,b) ovozmozuva resenie x na simultaniot sistem
% linearni ravenki, daden vo matricna forma Ax=b so
% Jakobievata iterativna metoda. tol e dozvolenata geska
% maxi e maksimalniot broj na iteracii, x0 e pocetno resenie
% J gi sodrzi rezultatite od iteraciite, a err greskata
n=length(b);
iteracii=0;
uslov=0;
xs=x0';
x=x0';
J=[x0];
while ((uslov==0) & (iteracii<=maxi))
for r=1:n
suma=b(r)-A(r,[1:r-1,r+1:n])*xs([1:r-1, r+1:n]);
x(r)=suma/A(r,r);
end
J=[J;x'];
err=norm(x-xs);
iteracii=iteracii+1;
if (err<=tol), uslov=1;end
xs=x;
end
5.4

5.3 -

-
, r- ,
r-, (9).

,
.
x k( r ) =

1
a kk

k 1
n

(r )
b
a
x
aik xi( r 1) k = 1, 2, ..., n

k ik i
i =1
i = k +1

(9)

,

.
(8).
84

,
. ,
.
,
:
1. aii ai1 + ... + ai-1,i + ai+1,i + ... + ain

i i
2. aii > ai1 + ... + ai-1,i + ai+1,i + ...+ ain


.
8 7
- (0,0,0) 0.002.
:
x1 = 1.2 0.1x2 0.1x3
x2 = 1.3 0.2x1 0.1x3
x3 = 1.4 0.2x1 0.2x2
x1 = 1.2, x1 = 1.2
x3 = 0 x2 = 1.060. x1 = 1.2 x2 = 1.060
x3 = 0.984.
5.2.
5.2

i
1
2
3
4

x1
1.2000
0.9992
0.9996
1.0000

X(i)
x2
1.0600
1.0054
1.0002
1.0000

x3
0.9480
0.9991
1.0001
1.0000

X ( i ) X ( i 1)
1.8607
0.2143
0.0053
0.0005


, 4- .
9: :
2x1 + x 2 = 2

x1 - 2x 2 = - 2

85

1
[2 x2 ]
2
1
x2 = [2 + x1 ]
2
:
x1 =

#1
#2
#3

6
2
: x1 = ; x 2 =
5
5
x1 = 0, x2 = 0
1
[2 + 1] = 3
2
2
1 9
1
x 2 = 2 + =
4 8
2
7 39
1
x 2 = 2 + =
2 16 32
x2 = 1.21875

1
[2 0] = 1
2
3 1
1
x1 = 2 =
2 4
2
1 9 7
x1 = 2 =
2 8 16
x1 = 0.4375
x1 =

0
1
2
3

x2 =

x1
0
1
1/4
7/16

x2
0
3/2
9/8
39/32

x22
x1 2x2 = -2

x1x1

5.1 -

.
10:
:
86

x1 2 x 2 = 2

2 x1 + x 2 = 2

x1 = 2 + 2x2
x2 = 2 2x1
:
#1
#2
#3

6
2
: x1 = ; x 2 =
5
5
x1 = 0, x2 = 0

x1 = 2 + 0 = 2
x1 = 2 + 26 = 10
x1 = 2 + 2(18) = 38

x2 = 2 2(2) = 6
x2 = 2 210 = 18
x2 = 2 2(38) = 78

x1
0
0
1
-2
2
10
3
-38
.

x2
0
6
-18
78

- 5.6.

.
function [x, J, err] = seidel(A,b,x0,tol,maxi)
% Funkcijata seidel(A,b) ovozmozuva resenie na simultaniot sistem
% linearni ravenki, daden vo matricna forma Ax=b so
% Gaus-Seidelovata iterativna metoda. tol e dozvolenata geska
% maxi e maksimalniot broj na iteracii, x0 e pocetno resenie
n=length(b);
iteracii=0;
uslov=0;
xs=x0';
x=x0';
J=[x0];
while ((uslov==0) & (iteracii<=maxi))
for r=1:n
suma=b(r)-A(r,[1:r-1,r+1:n])*x([1:r-1, r+1:n]);
x(r)=suma/A(r,r);
end
J=[J;x'];
err=norm(x-xs);
iteracii=iteracii+1;
if (err<=tol), uslov=1;end
xs=x;
end
5.6 -

87


(
)
.
,
, , -
.
.
.
11 , ,
(0,0,0,0) 0.01.
3x1 - 5x 2 + 47x3 + 20x4 = 18
56x + 23x + 11x - 19x = 36
1
2
3
4

12x
16x
17x
18x
+
+
+
2
3
4 = 25
1
17x1 + 65x 2 - 13x3 + 7x4 = 84

:
3
5
47
20
56
23
11 19
12
16
17
18
17
65
13
7
,
.
, 65. 65
:
3
47
20
56
11
19
12
17
18
, 56,
:
47
20
17
18
, 47
18.
65, 56, 47 18
:
88

65x 2 + 17x1 - 13x3 + 7x4 = 84


23x + 56x + 11x - 19x = 36
2
1
3
4

+
+
+
5x
3x
47x
20x
1
3
4 = 18
2
16x 2 + 12x1 + 17x3 + 18x4 = 25

5.3.
1
(84 17 x1 + 13x3 7 x4 )
65
1
(36 23x2 11x3 + 19 x4 )
x1 =
56
1
(18 + 5 x2 3x1 20 x4 )
x3 =
47
1
x 4 = (25 16 x 2 12 x1 17 x3 )
18
x2 =

5.3

i
1
2
3
4
5
6
7
8
9

X(i)
x2
0.1121
-0.1414
-0.2453
-0.3003
-0.3340
-0.3531
-0.3641
-0.3703
-0.3739

x1
1.2923
1.4000
1.5078
1.5537
1.5809
1.5969
1.6059
1.6111
1.6141

x3
0.5133
0.6768
0.7295
0.7703
0.7935
0.8065
0.8140
0.8183
0.8208

x4
-0.3193
-0.4006
-0.4768
-0.5195
-0.5431
-0.5568
-0.5647
-0.5692
-0.5718

X ( i ) X ( i 1)
1.4311
0.3304
0.1761
0.0929
0.0545
0.0313
0.0179
0.0103
0.0059

9- ,
(1.6141, -0.3739, 0.8208, -0.5718)
0.01.
5.4

n-
n

a
j =1

ij

x j ci = 0

(i = 1, 2, ..., n)

89

x j =

Dj


D
D=det(aij) Dj , ,
.
det(aij) , D
.

:
R1 = a11x + a12y c1
R2 = a21x + a22y c2
R1 = 0 R2 = 0
P ( 7).
R1 R2
,
| R1| < 1 | R2 | < 2
R11 =
0 R1=0 R22=0
R2=0. ,
R1=0 R2=0,
P ( 5.7).
.. ,

P.

R2=0

5.7

90

R1=0


. , , :
3

a
j =1

ij

x j ci = 0

(i=1,2,3)

o :
a11 x1 + a12 x 2 + a13 x3 + c1 = 0

a 21 x1 + a 22 x2 + a 23 x3 + c2 = 0
a x + a x + a x + c = 0
32 2
33 3
3
31 1

,
, :

cos 12 =

a11 a 21 + a12 a 22 + a13 a 23


2
2
2
+ a 22
+ a 23
a112 + a122 + a132 a 21

a11 a 21 + a12 a 22 + a13 a 23


3

j =1

a12j a 22 j
j =1

n , n
n
n :
2

2

cos ij =

a
k =1

ik

aik2
k =1

a jk
n

a
k =1

2
jk

aik a jk
k =1

cos 2 ij = n
n
aik2 a 2jk
k =1

(10)

k =1

ij ,
, .
cos2 = 0.90 cos2 = 0.95.

1.
:

91

4 x + 2 y + 6 z = 26

a. 3 x + 4 y + 5 z = 26

7 x + 5 y + 4 z = 29

4 x + 20 y 5 z = 61

b. 3 x + 4 y + 15 z = 64

17 x + 5 y 3 z = 8

2. :
3 x + 2 y 5 z = 10

a. 2 x y + 2 z = 1

4 x + y + 5 z = 8
x z = 5

c. 2 x + y + z = 7

y + 2z = 3

x y + z = 3.5

b. x 4 y + 2 z = 1.5

x + 2 y + 3z = 8.5
2 x + y z + w = 1

x 3 y + 2 z + w = 5
d.
2 x y + 3z + w = 5

x + y z 3w = 2

3. :
x + y z = 0

x + 3y = 2

x 2 z = 3

4. - :
4x + y z = 3

a. 2 x + 7 y + z = 19

x 3 y + 12 z = 31

92

8x y + 2z = 4

b. 4 x 2 y + 8 z = 8

x 10 y 6 z = 3

(Ordinary differential equations)


.
, .

, .

, .
dx(t )
d 2 ( x(t ))
.
, x" =
: x=x(t), x'=
dt
dt 2
1
x' x = et x(t ) = tet + cet
x' '+9 x = 0 x(t ) = c1 sin 3t + c2 cos 3t
1
x'+
= 0 x(t ) = c t
2x
,
, ..
.

:
x(t) :
dx(t )
= f (t , x(t ))

dt
x(t0 ) = x0

2
x' = x + 1
x(t ) = et 1

x(0) = 0

(1)

x' = 6t 1
x(t ) = 3t 2 t + 4

x(1) = 6
93

x' =
2
x + 1 x(t ) = t + 1 1

x(0) = 0

,
,
,
, -, .
(1)
t0, t1,, ,
x0,x1, , xn tn:
xn = x(tn ), n = 0,1,2,...

hn=tn+1-tn,
.
6.1

,
(Taylor).
6.1 ( ) f(x) 0,
1, 2, ..., n+1 [a, b], x c

n
f ( k ) (c)( x c) k f ( n +1) ( )( x c) n +1
(2)
f ( x) =
+
k!
(n + 1)!
k =0
x c, f(k)(x) k- f x.
(2) :
1
1
1
x(t + h) = x(t ) + hx' (t ) + h 2 x' ' (t ) + ... + h m x ( m ) (t ) +
h m +1 x ( m +1) ( ) (3)
2
m!
(m + 1)!
t t+h. ,
:
1
1
(4)
x(t + h) x(t ) + hx' (t ) + h 2 x' ' (t ) + ... + h m x ( m ) (t )
2
m!

m.
94

,
x(t+h) .

O(hm+1). h ,
, , .
h, ,
.
,
.
6.1.1


(Euler).

.
1 :

x(t + h) = x(t ) + hx' (t ) = x(t ) + hf (t , x(t ))

(5)

3 x' = x
x(0)=1 [0,3], h=0.3.
(5) x(t + h) = x(t ) + hx' (t ) = x(t ) + hx(t ) =
(1 + h) x(t ) . 6.1,
.
x(0.3) = x(0 + 0.3) = (1 + 0.3) x(0) = 1.3 1 = 1.3
x(0.6) = x(0.3 + 0.3) = (1 + 0.3) x(0.3) = 1.3 1.3 = 1.69
x(0.9) = x(0.6 + 0.3) = (1 + 0.3) x(0.6) = 1.3 1.69 = 2.197
6.1

n
0
1
2
3
4
5
6
7
8
9
10

tn
0
0.3
0.6
0.9
1.2
1.5
1.8
2.1
2.4
2.7
3

x(tn)
1
1.3
1.69
2.197
2.8561
3.7129
4.8268
6.2749
8.1573
10.6045
13.7858
95

x(t ) = et .
x(t),
, .
6.1 .

6.1 3

,
(t0, x(t0)),

.
4
x' = 1 + tx 2 x(0)=0 [0,1], h=0.1.
6.2

n
0
1
2
3
4
5
6
7
8
9
10
96

tn
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1

x(tn)
0
0.1
0.2001
0.3009
0.4036
0.5101
0.6231
0.7464
0.8854
1.0482
1.2470

x(t + h) = x(t ) + hx' (t ) =

(5)

x(t ) + h(1 + tx(t ) 2 ) . 6.2.



6.2.
function [X]=ojler(t0,x0,tkraj, h,f)
% Metoda na Ojler za diferenciranje na obicni diferencijalni
% ravenki so inicijalna vrednost x(t0)=x0, cekor h,
% tkraj - kj na intervalot i f=f(t,x(t))
t=t0;
x=x0;
X=[x];
while (t+h)<=tkraj
x=x+h*feval(f,t,x);
t=t+h;
X=[X x] ;
end
6.2

6.1.2


1. x(t)
f(t,x(t)) .
4.

,
.
.
5
4, x' = t + et , x(0)=1.
x' (t ) = t + et
x' ' (t ) = x' (t ) + et x' (t )
x' ' ' (t ) = x' ' (t )(1 + e t ) + e t ( x' (t )) 2
x ( 4) (t ) = x' ' ' (t )(1 + e t ) + 3e t x' (t ) x' ' (t ) + e t ( x' (t )) 3
1
1
1 4 ( 4)
x(t + h) x(t ) + hx' (t ) + h 2 x' ' (t ) + h 3 x' ' ' (t ) +
h x (t )
2
6
24
4
6.3.
97

function [X]=taylor4(t0,x0,tkraj, h,f1,f2,f3,f4)


% Metoda so Tejlorova serija od red 4 za diferenciranje
% na obicni diferencijalni ravenki so inicijalna vrednost x(t0)=x0,
% cekor h, tkraj kraj na intervalot
% f1, f2, f3 i f4 se 1, 2, 3, 4 izvod na x(t)
t=t0;
x=x0;
X=[x];
while (t+h)<=tkraj
x=x+h*feval(f1,t,x)+h^2*feval(f2,t,x)/2+h^3*feval(f3,t,x)/6+h^4*feval(f4,t,x)/24;
t=t+h;
X=[X x];
end
6.3 4

6 4
x' = x x(0)=1 [0,3], h=0.3.
x' = x' ' = x' ' ' = x ( 4) = x . 6.3.
(4) :

h 2 h3 h 4
+
+
x(t + h) = x(t )1 + h +
2
6 24

6.3

n
0
1
2
3
4
5
6
7
8
9
10

tn
0
0.3
0.6
0.9
1.2
1.5
1.8
2.1
2.4
2.7
3

x(tn)
1
1.3498
1.8221
2.4595
3.3199
4.4813
6.0491
8.1653
11.0218
14.8776
20.0824

x(t)
.
6.2 -

,
(1) f , .. -
98

(Runge-Kutta).
, :
i


1
f ( x + h, y + k ) = h + k f ( x, y )
y
i = 0 i! x

(5)

f(x,y).
, :
0



h + k f ( x, y ) = f ( x, y )
y
x
1



f ( x, y )
f ( x, y )
h + k f ( x, y ) = h
+k
y
x
y
x

(6)

2


2 f ( x, y )
2 f ( x, y )
2 f ( x, y )
h + k f ( x, y ) = h 2
2
hk
k
+
+
y
xy
x 2
y 2
x
...

(5):
i



1
1
h + k
f ( x + h, y + k ) = h + k f ( x, y ) +
y
y
(n + 1)! x
i = 0 i! x
n

n +1

f (x, y)

(7)

(x, y ) (x,y) (x+h,y+k).


, (7) n=1.
f ( x + h, y + k ) = f ( x, y ) + hf x ( x, y ) + kf y ( x, y ) +

1
+ h 2 f xx ( x , y ) + 2hkf xy ( x , y ) + k 2 f yy ( x , y )
2

(8)

, , w1 w2 .
:
K 1 hf (t , x)
(9)
K 2 hf (t + h, x + K 1 )
:
x(t + h) x(t ) + w1 K 1 + w2 K 2

(10)
99

. w1 = 1 w2 = 0
. K2
. :
K2
= f (t + h, x + K 1 ) = f (t + h, x + hf (t , x))
h
1
= f + hf t + hff x + 2 h 2 f tt (t , x ) + 2 fh 2 f tx (t , x ) + 2 h 2 f 2 f xx (t , x )
2
= f + hf t + hff x + O(h 2 )

(10) :
x(t + h) = x(t ) + w1 K 1 + w2 K 2

= x(t ) + w1 hf + w2 hf + w2h 2 f t + w2 h 2 ff x + O(h 3 )


= x(t ) + ( w1 + w2 )hf + w2 h 2 (f t + ff x ) + O(h 3 )

(11)

= x(t ) + ( w1 + w2 )hx' (t ) + w2 h 2 (f t + ff x ) + O(h 3 )


w1 + w2 = 1 w2 = w2 =

:
1 2
h ( f t + ff x ) + O(h 3 )
2
1
= x(t ) + hx' (t ) + h 2 x' ' (t ) + O(h 3 )
2

x(t + h) = x(t ) + hx' (t ) +

(12)

.. O
(h3).
= =1, w1 = w2 = -
, 6.4.
K 1 hf (t , x)
K 2 hf (t + h, x + K 1 )
1
x(t + h) x(t ) + (K 1 + K 2 )
2
6.4 -

= = 1 , w1 = w2 =
:
100

x(t + h) x(t ) +

h
3h 2h
2h

f (t , x) +
f t +
,x+
f (t , x)
4
4
3
3

(13)


- . -
, O (h5), 6.5.
K 1 hf (t , x)
K 2 hf (t + h / 2, x + K 1 / 2)
K 3 hf (t + h / 2, x + K 2 / 2)

K 4 hf (t + h, x + K 3 )
1
x(t + h) x(t ) + (K 1 + 2 K 2 + 2 K 3 + K 4 )
6
6.5 -

- , ,

, .
.
7 -
2

x
x' = (tx) 3 x(1)=1 x(1.1)
t
h=0.1.
2

x
) f (t , x) = x' = (tx) f (1,1) = 0
t
K 1 = hf (t , x) = 0.1 f (1,1) = 0.1 0 = 0
K 2 = hf (t + h, x + K 1 ) = 0.1 f (1 + 0.1,1 + 0) = 0.1 f (1.1,1)
3

1
3

K 2 = 0.1 (1.1 1) = 0.1 0.504554 = 0.0504554

1.1

1
1
x(1.1) = x(1 + 0.1) = x(1) + (K 1 + K 2 ) = 1 + (0 + 0.0504554) =1.025228
2
2
2

x
) f (t , x) = x' = (tx) f (1,1) = 0
t
K 1 = hf (t , x) = 0.1 f (1,1) = 0.1 0 = 0
3

101

K 2 = hf (t + h / 2, x + K 1 / 2) = 0.1 f (1 + 0.05,1 + 0) = 0.1 f (1.05,1) =0.0250596


K 3 = hf (t + h / 2, x + K 2 / 2) = 0.1 f (1 + 0.05,1 + 0.0250596 / 2) = 0.1 f (1.05,1.0125298)

K 3 = 0.02717852
K 4 = hf (t + h, x + K 3 ) = 0.1 f (1 + 0.05,1 + 0.02717852) = 0.1 f (1.05,1.02717852)
K 4 = 0.05705201
x(1.1) = x(1 + 0.1) = x(1) +

1
(K1 + 2 K 2 + 2 K 3 + K 4 ) = 1.02692136
6

8 -
x' = x 2 x(0)=1 [0,1]
h=0.1.
1

x =
1+ t
.
) -
6.4.
6.4

i
0
1
2
3
4
5
6
7
8
9
10

ti
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1

xi
1.000000
0.909500
0.833962
0.769971
0.715075
0.667467
0.625790
0.589003
0.556294
0.527021
0.500671

K1
-0.100000
-0.082719
-0.069549
-0.059286
-0.051133
-0.044551
-0.039161
-0.034692
-0.030946
-0.027775

K2
-0.081000
-0.068357
-0.058433
-0.050507
-0.044082
-0.038802
-0.034413
-0.030726
-0.027599
-0.024925

) -
6.5.

102

6.5

i
0
1
2
3
4
5
6
7
8
9
10

ti
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1

xi
1.00000000
0.90909119
0.83333373
0.76923121
0.71428615
0.66666709
0.62500040
0.58823567
0.55555590
0.52631611
0.50000030

-
6.6.
function [X]= RK2(t0,x0,tkraj,h,f)
% Runge-Kuta metoda od 2 red za diferenciranje na
% obicni diferencijalni ravenki so inicijalna vrednost x(t0)=x0,
% cekor h, tkraj kraj na intervalot i f=f(t,x(t))
x=x0;
t=t0;
X=[x];
while (t+h)<=tkraj
K1=h*feval(f,t,x);
K2=h*feval(f,t+h,x+K1);
x=x+0.5*(K1+K2);
t=t+h;
X=[X x];
end
6.6 -

-
6.7.
(10) w1 = 0 w2 = 1
, :
h
h

x(t + h) x(t ) + hf t + , x + f (t , x)
(14)
2
2

9
2

x
x' = (tx) x(1)=1 x(1.1) h=0.1.
t
3

103

0.1
0.1
x(1.1) = x(1 + 0.1) = x(1) + 0.1 f 1 +
,1 +
0 = 1 + 0.1 f (1.05,1)
2
2

x(1.1)= 1 + 0.1 0.250596 =1.025060


function [X]= RK4(t0,x0,tkraj,h,f)
% Runge-Kuta metoda od 4 red za diferenciranje na
% obicni diferencijalni ravenki so inicijalna vrednost x(t0)=x0,
% cekor h, tkraj kraj na intervalot i f=f(t,x(t))
x=x0;
t=t0;
X=[x];
while (t+h)<=tkraj
K1=h*feval(f,t,x);
K2=h*feval(f,t+h/2,x+K1/2);
K3=h*feval(f,t+h/2,x+K2/2);
K4=h*feval(f,t+h,x+K3);
x=x+(K1+2*K2+2*K3+K4)/6;
t=t+h;
X=[X x];
end
6.7 -


6.8.
function [X]=MOjler(t0,x0,tkraj, h,f)
% Modificirana metoda na Ojler za diferenciranje na obicni
% diferencijalni ravenki so inicijalna vrednost x(t0)=x0,
% cekor h, tkraj kraj na intervalot i f=f(t,x(t))
t=t0;
x=x0;
X=[x];
while (t+h)<=tkraj
x=x+h*feval(f,t+h/2,x+h/2*feval(f,t,x));
t=t+h;
X=[X x];
end
6.8

1.
, h=0.1:
a.
104

x' = t 2 + x 2 ; x(0)=0 [0, 1]

4
; x(1)=1 [1, 2]
10t 2
x' = t + x 2 ; x(0)=0 [0, 1]

b. x' = x 2 +
c.

2. 3,
x' = t 4 + e t , x(0)=1.
3. - :
x' = t 2 x 2 x(1)=1 [1,2]
h=0.1
b. x' = x 2 + x t x(0)=0 [0,1]
h=0.1
a.

4. - :
a. x' = t 2 x x(0)=1 [0,1] h=0.2.
b. x' = e x + sin x x(0)=0 [0,1]
h=0.1.
5. x' = t (x + 1) x(2)=0.5 x(2.1)
2

a.
b.
c.
d.


-
-

6.
:
a. x' = x sin t + t ; x(0)=0 [0, 1] h=0.1
b. x' = xe t ; x(0)=1 t = 0.1
c. x' = t + xt ; x(0)=0 [0, 1]

105



- .
.

, ""
(xi, f(xi))
.
"" - (xi, f(xi))
,
.

7.1

( 7.1)

- (xi, f(xi)).
.
.
,
.
106

xi, yi=f(xi)
yi = f(xi); i=1,2, ..., n, yi
.
. , yi
, y=f(x).
()
,
. ,
yi=f(xi).

,
.
,
,
.
7.1

n (xi, f(xi)), i=1,2,...,n


Y = k0 + k1x. ,

:
S = (Yi y i ) min.
2

Yi = Yi (k 0 , k1 )

(1)

S = S (k 0 , k1 ) min .
, S
k0 k1 ..
S
= 0;
k 0

S
=0
k1

(2)

:
Yi = k0 + k1xi

S = (k 0 + k1 xi y i ) min .
2

S
=0
k 0
107

k (k
i

+ k1 xi y i ) = 2(k 0 + k1 xi y i ) 1 = 0
2

S
=0
k1

i k (k 0 + k1 xi yi )2 = i 2(k 0 + k1 xi yi ) xi = 0
1
( ) :

(k
(k

+ k1 xi yi ) = 0

+ k1 x i y i ) x i = 0

:
k 0 + k1 xi yi = 0
i
i
i

2
+

k
x
k
x
0 i 1 i y i xi = 0
i
i
i
k0 k1
.
(3) k0 k1 :
n k 0 + k1 x i = y i

i
i

2
+
=
k
x
k
x
i xi yi
1 i
0 i
i
i

(3)

k0 k1
, Y = k0 + k1x,
, ""
.
1 ,
.
xi
yi=f(xi)

108

1
2

2
3

3
5

4
5

5
8

6
9

7
10

,
(
7.2).

7.2

,
7.1.
7.1

i
1
2
3
4
5
6
7

xi
0
1
2
3
4
5
6
21

yi
2
3
5
5
8
9
10
42

xiyi
0
3
10
15
32
45
60
165

xi2
0
1
4
9
16
25
36
91

(3) :
109

7 k 0 + 21k1 = 42

21k 0 + 91k1 = 165


. :
k 0 = 1.821429
k1 = 1.392857
, :
Y = 1.821429 + 1.392857 x

"" ( )
(xi, f(xi)) i = 1, 2, ..., 7.

:
Y = k0 + k1 x + k2 x2

S = k 0 + k1 xi + k 2 xi2 yi

min .

S
=0
k 0

i k k 0 + k1 xi + k 2 xi2 yi
0
S
=0
k1

i k k 0 + k1 xi + k 2 xi2 yi
1
S
=0
k 2

i k k 0 + k1 xi + k 2 xi2 yi
2

) = 2(k
2

+ k1 xi + k 2 xi2 yi 1 = 0

+ k1 xi + k 2 xi2 yi xi = 0

) = 2(k
2

) = 2(k
2

+ k1 xi + k 2 xi2 yi xi2 = 0

k
i

110

+ k1 xi + k 2 xi2 yi = 0
i

k 0 xi + k1 xi2 + k 2 xi3 xi yi = 0
i

k 0 x + k1 x + k 2 x xi2 yi = 0
2
i

3
i

4
i

i = 1,2, . . . ,n


k0, k1 k2:

nk 0 + k1 xi + k 2 xi2 = y i

i
i
i

2
3
k
x
k
x
k
x
+
+
=
0 i
i xi yi
1 i
2 i
i
i
i

2
3
4
2
k 0 x i + k1 x i + k 2 x i = x i y i
i
i
i
i

(4)

2 1,
, .
(4)
7.2.
7.2

i
1
2
3
4
5
6
7

xi
0
1
2
3
4
5
6
21

yi
2
3
5
5
8
9
10
42

xiyi
0
3
10
15
32
45
60
165

xi2yi
0
3
20
45
128
225
360
781

xi2
0
1
4
9
16
25
36
91

xi3
0
1
8
27
64
125
216
441

xi4
0
1
16
81
256
625
1296
2275

(4) :
7 k 0 + 21k1 + 91k 2 = 42

21k 0 + 91k1 + 441k 2 = 165


91k + 441k + 2275k = 781
1
2
0


:
k0 = 1.88095
k1 = 1.32143
k2 = 0.01190
111

,
:
Y = 1.88095+ 1.32143x +0.01190 x2


"". ( ) -
( ).
(5).
n

S i2
i =1

n 1

(Y
i =1

yi )

(5)

n 1

3
1 2 , ,
1.
( )
7.3.
7.3

i
1
2
3
4
5
6
7

xi
0
1
2
3
4
5
6

yi
2
3
5
5
8
9
10

Yi=1.821429+1.392857xi
1.821429
3.214286
4.607143
6.000000
7.392857
8.785714
10.178571

Si2
0.0319
0.0459
0.1543
1.0000
0.3686
0.0459
0.0319
1.6785

1.6785
= 0.529
6
( )
7.4.

1 =

112

7.4

i
1
2
3
4
5
6
7

xi
0
1
2
3
4
5
6

Y = 1.88095+ 1.32143x +0.01190 x2


1.88095
3.21428
4.57141
5.95234
7.35707
8.78560
10.23793

yi
2
3
5
5
8
9
10

Si2
0.00354
0.00000
0.00128
0.00227
0.00128
0.00000
0.00352
0.01199

0.01199
=0.0447
6
2 < 1
.

2 =

,
.

,
m- :
Y = k 0 + k1 x + k 2 x 2 + . . . . . + k m x m
(m+1)
m+1 , (6)
[A][k]=[b].

x
........

........
xm

x
x
x

m +1

x
x
x

2
3

m+2

k 0 y


m +1
k1 xy
. = .

. .

m
2m

... x k m x y
...
...

x
x

(6)

.
,
( ).
, ,
,
. ,
.
.
113

.
:
[ k ] = [ A ]-1 [ b ]
yi = f(xi)
, . ,
, yi ,
"". - xi, yi
Wi, i=1, 2, ..., n. Wi
:
0 Wi 1

, (7):
Wi Wi xi Wi xi2 ... Wi xim
Wi y i
k i
i

i
i
i
0 Wi xi y i

.
.
. .
k1 i

.
. .
(7)
. =

. .

. .

m
2 m k m

Wi xi y i
i Wi xi

i

, 7.3.
,
.
function [k, sigma]=PRegresija(x,y,m)
% Funkcijata PRegresija(x,y,m) opredeluva polinom od m-ti stepen
% kako regresiona zavisnost. k se koeficientite na polinomot, a
% sigma e kvadratnoto otstapuvanje
for i=1:m+1
for j=0:m
A(i,j+1)=sum(x.^(i+j-1));
end
b(i,1)=sum(x.^(i-1).*y);
end
k=gausjordan(A,b);
p=k(end:-1:1);
Y=polyval(p,x);
S=sum((Y-y).^2);
sigma=sqrt(S/(length(x)-1));
7.3

114

1. ,

.
i
1
2
3
4
5
6

xi
0
0.5
1
1.5
2
2.5

f(xi)
-1.12
0
1.2
2.4
3.5
4.5

2. ,

.
i
1
2
3
4
5
6

xi
-1
0
0.5
1
2
3

f(xi)
1.2
0
0.7
1.2
4.5
9

3. ,

.
i
1
2
3
4
5
6
7

xi
-2
-1
0
1
2
3
4

f(xi)
11
5
1
-2
-2
0
4

115

8.1 , ,


.
, ,
. :

, , ;
, , ;
;
;
;
.


.
. ,
.
,

8.1



.
, ..
.
,
.
, ,
.
,
( 8.1).
.
.. .
116



, .
1
2
, :
( 8.2).

.. 8.2

,
-.
,
,

8.3
.


,
8.3.
.
,

8.4.

a)

b)

A
B
B

c)

d)

8.4

117

8.2

,

.

, . , A,
B C ,
, ..
( 8.5).

8.5

B
Ai, i {1, 2,...n} . Ai
, .
8.6.
A1

.
.
.

An

8.6

B1
.
.
.

Bn
8.7

118

A,
Bi, i {1, 2,...n}
. 8.7 .
Bj, j {1, 2,...m}
Ai, i {1,
2,...n}, 8.8.
A1

B1

.
.
.

.
.
.

An

Bm
8.8

C A B,
D A B,
B ( 8.9).
A

D
8.9

A1

A2

8.10

B
A, C, A
. ,
119

A A1, A
B A2, A.
8.10.
,
. ,
. ,
. ,
.
:
1. , ..

;
2.
;
3.
.
8.3

Po~eten nastan
na mre`en
dijagram

Kraen nastan na
mre`en dijagram

8.11

,
,
.
,
120

,
( 8.11).
.

. .
8.12
.

Pat 1

Pat 2

Pat 3

8.12

8.4


, . ,

.
11
A, B, ... K. :
A, B, C D
;
E A;
F B;
G B C;
H D;
I E F;
J H G
K I.

121


,

, 8.13. ,

,
, ..
. "x",
.
A B C D E F G H I J K
A
x
B
x x
C
x
D
x
E
x
F
x
G
x
H
x
I
x
J
K
8.13

,
( 8.14).
A

H
8.14

122

,
:
E
I , E
I;
H
J , H
J;
.
8.15 .
A

8.15

8.5

,
, 1

2, 3, 5 .
,
,
,
.
,

.
123

,
.
i j,
i-j.
. :
,
,
.
,
,
, :
1.
,
, ;
2.
.
, - , , ;
3. ,
;
4. 2 3
.

,
.

8.16 .
2

4
8.16

124

1, 4
. 2, 3 4 ,
.
.
2, 3 4.
2

4
8.17

8.17 5 6,
.
5 6.
2

4
8.18

7 8
( 8.18). 8.19
9 .

125

8
9

4
8.19

8.6 PERT

, ,
.
,
.
.
PERT Project Evaluation and Review Technique
, ,
Polaris, Lockhead Booz, Allen and Hamilton.

.
PERT
: - to, m - tp.


.
. ,

.
,
.


.

126

. , ,
, ,
, ,
. ,
, ,
,
. ,
.

t0 - m - tp

,
te
( 8.20).
8.20

, PERT,
PERT

, .
.

,
, te.
:
t0 + 4 m + t p
te =
6

2
3

8
3

4
9

8.21

127


( 8.20).
0.5.

.
,

(, ) 8.21.
, ,
- TE (Earliest Time)
- TL (Latest Time).
TEj
j


j

TEj
:

, 8.22,
a)
b)
8.22
.
, j
i-j, ,
, TEj:

, ,
:

TE (i , j ) = TEi + te (i , j )
TEj
TE(i,j).

.
8.21, TE
:
1. 1 0;
2. 1-2, 1-3 1-4 3, 8 9
, 2, 3
4 TE2 = 3, TE3 = 8 TE4 = 9;
3. 5
1-5 3-5, :

TE (1,5) = TE1 + te (1,5) = 0 + 5 = 5


128

TE ( 3, 5) = TE 3 + t e ( 3,5) = 8 + 0 = 8
TE5 = 8, .. ;
4. 6
2-6 3-6, :

TE ( 2, 6 ) = TE 2 + t e ( 2, 6 ) = 3 + 4 = 7
TE ( 3, 6 ) = TE 3 + t e ( 3, 6 ) = 8 + 2 = 10
TE6 = 10, .. ;
5. 7
4-7 5-7, :

TE ( 4, 7 ) = TE 4 + t e ( 4, 7 ) = 9 + 2 = 11
TE ( 5, 7 ) = TE 5 + t e ( 5, 7 ) = 8 + 7 = 15
TE7 = 15, .. ;
6. 8 6-8,

TE 8 = TE 6 + t e ( 6,8) = 10 + 3 = 13
7. 9
7-9 8-9, :

TE ( 7 ,9 ) = TE 7 + t e ( 7 ,9 ) = 15 + 4 = 19
TE (8,9 ) = T8 + t e (8,9 ) = 13 + 2 = 15
TE9 = 19, .. .
2
3

1
0

3
8

6
2

8
3

10

5
5

13

2
9

7
7

15

19

4
9

8.23

129

8.23 .

,
. ,

:
,
TEj
8.24.
j
.
, i
j
TEj TLj
i-j,
,
,
TLj
TLj:
a)
b)

8.24

,
, :

TL (i , j ) = TLj te (i , j )
TLi
TL(i,j).


.
8.23, TL
:
1. 9
, 19;
2. 8-9 7-9 2 4
, 8
7 :

TL8 = TL 9 t e (8,9) = 19 2 = 17
TL 7 = TL 9 t e ( 7 ,9 ) = 19 4 = 15
3. 6, 5, 4 2 6-8,
5-7, 4-7 2-6 3, 7, 2 4 ,
6, 5, 4 2 :

TL 6 = TL8 t e ( 6,8) = 17 3 = 14

TL 5 = TL 7 t e ( 5, 7 ) = 15 7 = 8
TL 4 = TL 7 t e ( 4,7 ) = 15 2 = 13
130

TL 2 = TL 6 t e ( 2,6 ) = 14 4 = 10
4. 3 3-6 3-5,
:

TL ( 3, 6 ) = TL 6 t e ( 3, 6 ) = 14 2 = 12
TL ( 3,5) = TL 5 t e ( 3, 5) = 8 0 = 8
TL3 = 8;
5. 1 1-2, 1-3 1-4,
:

TL (1, 2 ) = TL 2 t e (1, 2 ) = 10 3 = 7
TL (1,3) = TL 3 t e (1,3) = 8 8 = 0
TL (1, 4 ) = TL 4 t e (1, 4 ) = 13 9 = 4
TL1 = 0.
8.25 .
2
3

1
0

10

3
0

6
2

10

8
3

14

5
5

13

17

2
9

7
7

15

15

19

19

4
9

13

8.25

61 8 TE
= 13 TL = 17, 4
,
. SL,
SL = TL - TE.
, 8.26.
131

TEj

TEj TLj

TLj
SLj

SLj

a)

b)
8.26

,
. ,
8.25 8.27.
2
3

10
7

1
0

3
0

6
2

10

8
3

14

13

5
5

17

7
7

15

15
0

19

19
0

4
9

13

8.27


(TL = TE),
0.
, ,
. ,
.
132

8.27
1-3-5-7-9, 1-3, 3-5, 5-7
7-9.
, ..
.
, Ts.
,
:

.
,
59 25 , .. TS = TL9 = 25.

, 64
6, .
6.
1-3-5-7-9, , ..
.
2
3

16
13

1
0

3
6

6
2

14

10

8
3

20

13

10

10

5
5

23

7
7

14

15

21
6

19

25
6

4
9

19

10

8.28

133

8.7 (CPM)

(Critical Path Method - CPM)


, Du Pont de Nemours &Co.
1957 , .
PERT, CPM
i-j, tij
, 8.27.

i
TEi TLi

j
tij

TEj TLj

8.27

, i
: i,
RP
i KZ. ,
,
PERT.
CPM :
RZ KP.
i-j, 8.27,
:
RP = TEi
RZ = TEi + ti j
2
6
KP = TLj - tij
KZ = TLj
4
3
10
10 14
, 2-6
8.28 :
7
4
RP = 3, RZ = 7, KP = 10 KZ = 14.
8.28
CPM
:
() - Rt
KZ
RZ:
Rt = KZ - RZ = TLj - (TEi + ti j)
134

8.28,
2-6 Rt = 14 - 7 = 7 .
- Rs
:
Rs = TEj - (TEi + ti j)


. 2-6 8.28, Rs =
10 - (3 + 4) = 3 .
- Ru
,
.
:
Ru = Rt - Rs

2-6 8.28, Ru = 7 - 3 = 4 .
- Rn

:
Rn = TEj - (TLi + ti j)


, ,
.
.
2-6 8.28, Rn = 10 - (10 + 4) = -4 .. Rn = 0
2-6 .

. 8.25,
8.1. 1 7
, :
8=4
9=4+3
10 = 7 - 3

11 = 7
12 = 7 - (4 + 3) = 7 - 9
13 = 6 - (4 + 3) = 6 - 9

14 = 12 - 13
15 = 6 - (5 + 3)

135

8.1

3
3
8
9
5
4
2
0
2
7
3
4
2

TE

TL

TE

TL

4
0
0
0
0
3
8
8
9
8
10
15
13

5
0
0
0
0
10
8
8
13
8
14
15
17

6
3
8
9
8
10
10
8
15
15
13
19
19

7
10
8
13
8
14
14
8
15
15
17
19
19

8
0
0
0
0
3
8
8
9
8
10
15
13

9
3
8
9
5
7
10
8
11
15
13
19
15

10
7
0
4
3
10
12
8
13
8
14
15
17

KZ

2
2
3
4
5
6
6
5
7
7
8
9
9

KP

1
1
1
1
1
2
3
3
4
5
6
7
8

RZ

tij

RP

Rt

Rs

Ru

Rn

11
10
8
13
8
14
14
8
15
15
17
19
19

12
7
0
4
3
7
4
0
4
0
4
0
4

13
0
0
0
3
3
0
0
4
0
0
0
4

14
7
0
4
0
4
4
0
0
0
4
0
0

15
0
0
0
3
0(-4)
0
0
0
0
0(-4)
0
0

,
.. 12 .
0, . ,
: 1 - 3, 3 - 5, 5 - 7 7 - 9.

,
8 11.
,
,
.
.. .

:
1. C, D E A B.
2. D A, B C.
3. C A, D B, E A B.
4. B C A, D
B.
5. B C A, D
B, E D C.
136

6. B C A, D
B C.
7. 3 A, B C. D
A C, E B C,
F C.
8. 3 A, B C. D
A, B C, E
B C.
9. 3 A, B C. D
A C, E B C,
F A B.
10. 3 A, B C. D
A B, E B C.
11 12:
11. A, B C
, D E A, F A B, G C F, H
D, E G.
.
12. A , B, C D
A, E F B, G C F, H D, J
E, G H.
.
13.
,
:
a) 1 2
;
3, 4 5 1;
6 2;
7 1 2;
8 3 4;
9 5 7;
10 6, 8 9;
b) 1 ;
2, 3 4 1;
5 2 4;
6 7 3;
8 5;
9 3 5;
10 8 9;
11 6 7.
137

9.1

.
,
,
,
, .

.
.
,
.
,
, , .
1.
4 , 100m.
9.1.
.
.
9.1

D1
D2
D3
D4

x
200
200
200
200

y
200
300
400
500

h1 (m)
673
670
677
680

h2 (m)
660
665
668
670

x 4 ,
, y.

138

.
9.2.
9.2

i
0
1
2
3

yi (100m)
2
3
4
5

f(yi) (100m)
6.73
6.70
6.77
6.80

g(yi) (100m)
6.60
6.65
6.68
6.70


:
L0 ( x ) =

(x x1 )(x x2 )(x x3 ) (x 3)(x 4)(x 5) x 3 + 12 x 2 47 x + 60


=
=
(x0 x1 )(x0 x 2 )(x0 x3 ) (2 3)(2 4)(2 5)
6

(
(
x x0 )( x x2 )( x x3 )
x 2)( x 4)( x 5) x 3 11x 2 + 38 x 40
L1 ( x) =
=
=
(x1 x0 )(x1 x2 )(x1 x3 ) (3 2)(3 4)(3 5)
2
3
(
(
x x0 )( x x1 )( x x3 )
x 2)( x 3)( x 5) x + 10 x 2 31x + 30
L2 ( x) =
=
=
(x2 x0 )(x2 x1 )(x2 x3 ) (4 2)(4 3)(4 5)
2
L3 ( x) =

(x x0 )(x x1 )(x x2 ) = (x 2)(x 3)(x 4) =


(x3 x0 )(x3 x1 )(x3 x2 ) (5 2)(5 3)(5 4)

x 3 9 x 2 + 26 x 24
6


:
x 3 + 12 x 2 47 x + 60
x 3 11x 2 + 38 x 40
6.73 +
6.70 +
6
2
x 3 + 10 x 2 31x + 30
x 3 9 x 2 + 26 x 24
+
6.77 +
6.80
6
2
P3 ( x) = 0.0233x 3 + 0.2600 x 2 0.8867 x + 7.6500

P3 ( x) =


x=200.

139

x100m

D3
D1

D4

D2

x100m
9.1


x=200 :
x 3 + 12 x 2 47 x + 60
x 3 11x 2 + 38 x 40
6.60 +
6.65 +
6
2
x 3 + 10 x 2 31x + 30
x3 9 x 2 + 26 x 24
+
6.68 +
6.70
2
6
P3 ( x) = 0.0017 x3 0.0250 x 2 + 0.1433x + 6.4000

P3 ( x) =


x=200.

, 9.1.

140

2.
, 16
9.2.
9.3 f(x,y) .
x=250 y=180.
y

38,7

250

39,3

200

41,9

150

41,5

100

40,9

41,2

40,6

43,6

42,4

38,6

43,1

41,8

37,9

42,5

40,4

37,2
x

100

200

300

400

9.2
1.3

y
x
100
200
300
400

100

150

200

250

41,5
42,5
40,4
37,2

41,9
43,1
41,8
37,9

39,3
43,6
42,4
38,6

38,7
40,9
41,2
40,6


, 3- .
fA=f(100,180), fB=f(200,180), fC=f(300,180) fD=f(400,180)
- ,
f(250,180).
y y0 180 100
=
=
= 1,6
k
50
fA, fB, fC fD. :
2 f ( X , y 0 )
3 f ( X , y 0 )
f ( X ,180) = f ( X , y 0 ) + f ( X , y 0 ) + ( 1)
+ ( 1)( 2)
2!
3!
141

fA :
i
0
1
2
3

yi
100
150
200
250

f(100,yi)
41,5
41,9
39,3
38,7

f(100,yi)

2 f(100,yi)

3 f(100,yi)

0,4
-2,6
-0,6

-3
2

3
5
+ ( 1) ( 2) =40,38
2!
3!
fB :

f A = f (100,180) = 41,5 + 0,4 + ( 1)

i
0
1
2
3

yi
100
150
200
250

f(200,yi)
42,5
43,1
43,6
40,9

f(200,yi)

2 f(200,yi)

3 f(200,yi)

0,6
0,5
-2,7

-0,1
-3,2

-3,1

0,1
3,1
=43,61
+ ( 1) ( 2)
2!
3!
fC :

f B = f (200,180) = 42,5 + 0,6 + ( 1)

i
0
1
2
3

yi
100
150
200
250

f(300,yi)
40,4
41,8
42,4
41,2

f(300,yi)

2 f(300,yi)

3 f(300,yi)

1,4
0,6
-1,2

-0,8
-1,8

-1

0,8
1
=42,32
+ ( 1) ( 2)
2!
3!
fD :

f C = f (300,180) = 40,4 + 1,4 + ( 1)

i
0
1
2
3

yi
100
150
200
250

f(400,yi)
37,2
37,9
38,6
40,6

f(400,yi)

2 f(400,yi)

3 f(400,yi)

0,7
0,7
2

0
1,3

1,3

f D = f (400,180) = 37,2 + 0,7 + ( 1)

142

0
1,3
+ ( 1) ( 2) =38,24
2!
3!

f(250,180)
:
i
0
1
2
3

xi
f(xi ,180)
100
40,38
200
43,61
300
42,32
400
38,24
x x0 250 100
=
=
= 1,5
h
100

f(xi ,180)

2 f(xi ,180)

3 f(xi ,180)

3,23
-1,29
-4,08

-4,52
-2,79

1,73

4,52
1,73
=43,42
+ ( 1) ( 2)
2!
3!
(250,180)
43,42%.
f (250,180) = 40,38 + 3,23 + ( 1)

9.2


,
,
, ,
,
.
3 9.3
.
9.4.
, .
9.4

1
2
3
4
5
6
7
8
9

0.51
0.12
16.1
4.2
25.0
2.1
1.5
143

9.4

,
9.5.
9

5
8

6
7
9.5

9 (F=1) 3 6,
. 5 9 ,
(1). ,
. -1,
, 1, 0, .
.

144

C= 0

1 0

(1)

J np-1=2, np
1 , S nn-1=3, nn
-1 .

N = 2( F + S ) 1 = 2(1 + 3) 1 = 7 .
M=CB, B=[Bj]
Bj j.
, B9 =1, (2).
B1

B7

B1

B2

B4

M = 0

B2

B3

B5

B4

B6

B8

B5

B7

B8

(2)

1 7 ,
.
A=Ma, a=[aj] j
j.
3 4,
(3).
A=

0 0.51B2
0

0.12 B3

4.2 B5

16.1B4

25.0 B6

0 2.1B7

(3)

,
.
:
145

0.12 B3 + 25.0 B6 1.5 = 0


8 (4)
.
0
0
0
0
1
0 B1 1
1 0

0
0
0
0
0 B2 0
1
1
1

0
1
0
0
0
0 B3 0
1
1

0
0
0
1
0
0
1
1 B4 0

0
B
0
0
0
1
0
1
0
1

0 0.51 0.12 0 4.2


B
0
0
0
0

0
0
0
16.1
0
0
25.0 0 2.1 B7

0
0
0
0 8 1.5
0.12 0
25.0 0

(4)

,
.
:
B1 = 1.1351
B2 = 1.0444
B3 = 0.9445
B4 = 0.0907
B5 = 0.0998
B6 = 0.0555
B7 = 0.1351
B8 = 0.0353
4
, .
.
,
, .

146

Mg(OH)2 + 2MgO + 4SiO2 = (-5523 kjmol-1)


2Mg(OH)2 + MgO + 2SiO2 = (-4038 kjmol-1)
2Mg(OH)2
+ 3SiO2 = (-4269.8 kjmol-1)

x, y z
.
Mg(OH)2

x+

2 x+

2x+

MgO
2y
y

SiO2
+ 4z
+2z
+3z

-5523
-4038
-4269.8

x + 2 y + 4 z = 5523

2 x + y + 2 z = 4038

2 x + 3 z = 4269.8

.
,
:
4 z + x + 2 y = 5523

3 z + x = 4269.8

2 z + 2 x + y = 40382

- , :
4 z + x + 2 y = 5523

1.25 x 1.5 y = 127.55

1.5 x = 40382

,
.
:
147

G Mg(OH)2 = -851 kjmol-1


G MgO = -624.13 kjmol-1
G SiO2 = -855.93 kjmol-1

9.3



, , .
.
5
1
.
9.5.

.
9.5

x
1
2
3
4
5
6
7
8
9
10
11
12


y [dm]
3,50
3,67
3,89
4,12
4,56
4,02
3,78
4,10
3,95
3,88
3,78
3,65


9.6.

148

9.6

i
1
2
3
4
5
6
7
8
9
10
11
12

xi
1
2
3
4
5
6
7
8
9
10
11
12
78

yi
3,50
3,67
3,89
4,12
4,56
4,02
3,78
4,10
3,95
3,88
3,78
3,65
46.9

x iy i
3.50
7.34
11.67
16.48
22.80
24.12
26.46
32.80
35.55
38.80
41.58
43.80
304.90

xi2

xi2 y i

xi3

xi4

1
4
9
16
25
36
49
64
81
100
121
144
650

3.50
14.68
35.01
65.92
114.00
144.72
185.22
262.40
319.95
388.00
457.38
525.60
2516,38

1
8
27
64
125
216
343
512
729
1000
1331
1728
6084

1
16
81
256
625
1296
2401
4096
6561
10000
14641
20736
60710

:
12k 0 + 78k1 = 46.9

78k 0 + 650k1 = 304.90


k0 = 3.9061 k1 = 0.0003.
:
Y = 3.9061 + 0.0003 x
( )
9.7.
9.7

i
1
2
3
4
5
6
7
8
9
10
11
12

xi
1
2
3
4
5
6
7
8
9
10
11
12

yi
3,50
3,67
3,89
4,12
4,56
4,02
3,78
4,10
3,95
3,88
3,78
3,65

Yi = 3.9061 + 0.0003 xi
3.9091
3.9121
3.9151
3.9181
3.9211
3.9241
3.9271
3.9301
3.9331
3.9361
3.9391
3.9421

Si2
0.1674
0.0586
0.0006
0.0408
0.4082
0.0092
0.0216
0.0289
0.0003
0.0031
0.0253
0.0853
0.8493

149

1 =

0.8493
= 0.2771
11

(7.4) :
12k 0 + 78k1 + 650k 2 = 46.9

78k 0 + 650k1 + 6084k 2 = 304.90

650k 0 + 6084k1 + 60710k 2 = 2516.38


9.8

i
1
2
3
4
5
6
7
8
9
10
11
12

xi
1
2
3
4
5
6
7
8
9
10
11
12

yi
3,50
3,67
3,89
4,12
4,56
4,02
3,78
4,10
3,95
3,88
3,78
3,65

Yi = 3.3450+ 0.2408xi -0.0185 xi2


3.5673
3.7526
3.9009
4.0123
4.0866
4.1240
4.1243
4.0877
4.0140
3.9034
3.7558
3.5712

Si2
0.0045
0.0068
0.0001
0.0116
0.2241
0.0108
0.1185
0.0002
0.0041
0.0005
0.0006
0.0062
0.3881


:
k0 = 3.3450
k1 = 0.2408
k2 = -0.0185

,
:
Y = 3.3450+ 0.2408x -0.0185 x2
( )
9.8.
150

0.3881
= 0.1878
11

,
PRegresija.

1 =

= 0.1690
Y = 3.0003+ 0.5072x - 0.0677 x2 + 0.0025x3

4- = 0.1684
Y = 2.9048+ 0.6157x - 0.1019 x2 + 0.0065x3 - 0.0002x4

5- = 0.1512

Y = 3.7682 - 0.6669x + 0.4853 x2 - 0.1061x3 + 0.0094x4 - 0.0003x5

6- = 0.1383

Y = 5.1036 - 3.0740x + 1.9370 x2 - 0.5038x3 + 0.0637x4 - 0.0039x5 + 0.0001x6


6-
,
.

9.4


, ,
- , ,
, . ,
,
,
,
.
6 ( - II )

151

.
:
A , m =12 ;
B m =20 ;
C m =10 ;
D m =8 ;
E m =22 ;
F m =5 ;
G m =10 ;
H m =3 ;
I m =26 ;
J m =7 ;
K
m =1 ;
L m =3 ;
M m =1 .
- to
25% , - tp
50% .
- te
:
A to=9, tp=18 te=12.5 ;
B to=15, tp=30 te=21 ;
C to=7.5, tp=15 te=10.5 ;
D to=6, tp=12 te=8.5 ;
E to=16.5, tp=33 te=23 , A;
F to=4, tp=7.5 te=5 , A;
G to=7.5, tp=15 te=10.5 , A B;
H to=2.5, tp=4.5 te=3 , C;
I to=19.5, tp=39 te=27 , D;
J to=5, tp=10.5 te=7 , F, G, H I;
K to=1, tp=1.5 te=1 , E J;
L to=1, tp=2 te=4.5 , J;
M to=1, tp=1.5 te=1 , J.

, 9.6:

152

A B C D E F G H I J K L M
A
x x x
B
x
C
x
D
x
E
x
F
x
G
x
H
x
I
x
J
x x x
K
L
M
9.6


, 9.7.
A

F
B

G
5
C

10

M
H

9.7

PERT,

9.8.

153

A
12.5

12.5 12.5

21

25
4

C
10.5

10.5 32.5

5
21

B
0

42.5 44.5

23

10.5

6
10

14

42.5 42.5

0
H
3

8.5

4
8.5 8.5

45.5 44.5

3
3

0
1

10

9
43.5 45.5

22
D

27

9.8 PERT

, 9.8,
45,5 .
0,
1, 4, 6, 7 10, D, I, J
L. ,
.
PERT
,
99% .

TE10 3 10 , TE10 ,
10
:

10 = D2 + I2 + J2 + L2
,
t p to
=
. :
6
154

12 6
=1
6
39 19.5
I =
= 3.25
6
10.5 5
J =
= 0.92
6
4.5 2
L =
= 0.42
6

D =

10 = 12 + 3.25 2 + 0.92 2 + 0.42 2 = 3.5476 3.55


:
TE10 3 10 = 45.5 3 3.55 = 45.5 10.65 = (34.85 56.15) = (35 56)

PERT
45.5 , , 99% - II
35 ,
56 .

155

[1] . , . : ,
. - , 1982
[2] R. W. Hamming: Numerical Methods for Scientists and Engineers, 2 edition,
Dover Publications, 1987
[3] S. Vuji, A. Ivi: Matematike metode u rudarstvu i geologiji: Teorija i
primena, Rudarsko-geoloki fakultet - Beograd, 1991
[4] A. Vila, Z. Leicher: Planiranje proizvodnje i kontrola rokova: Operativna
priprema rada, Poslovanje specijalnim alatima, Informator - Zagreb, 1976
[5] S. C. Chapra, R. Canale: Numerical Methods for Engineers: With Software and
Programming Applications, 4th Edition, McGraw-Hill, 2001
[6] G.V. Milovanovic: Numerika analiza, Nauna knjiga - Beograd, 1985
[7] S. E. Pav: Numerical Methods Course Notes, University of California at San
Diego, October, 2005
[8] J. Petri: Operaciona iztraivanja, Nauna knjiga - Beograd, 1989
[9] L. N. Trefethen: Numerical Analysis, Oxford University, May 2006
[10] G. Dahlquist, . Bjrck: Numerical Methods in Scientific Computing,
Working copy, February 2006
[11] P. Henrici: Applied and Computational Complex Analysis. Volume 1: Power
Series, Integration, Conformal Mapping, Location of Zeros, Wiley Classics Library,
New York, 1988. Reprint of the 1974 original
[12] P. Henrici: Applied and Computational Complex Analysis. Volume 2: Special
Functions, Integral Transforms, Asymptotics, Continued Fractions, Wiley Classics
Library, New York, 1991. Reprint of the 1977 original
[13] K. E. Atkinson: An Introduction to Numerical Analysis, John Wiley, New
York, second edition, 1989
[14] P. Deuflhard, A. Hohmann Numerical Analysis in Modern Scientific
Computing, Springer, Berlin, second edition, 2003
156

[15] L. Elden, L. Wittmeyer-Koch, H. B. Nielsen: Introduction to Numerical


Computation, Studentlitteratur, Lund, Sweden, 2004
[16] K. Eriksson, D. Estep, P. Hansbo, C. Johnson Computational Differential
Equations, Cambridge University Press, Cambridge, UK, 1996
[17] W. Gander, Jii Hebiek.: Solving Problems in Scientific Computing using
Maple and Matlab, Springer-Verlag, Berlin, 4th edition, 2004
[18] D. Kincaid, W. Cheney: Numerical Analysis, Brooks/Cole, Pacific Grove, CA,
third edition, 2002
[19] C.B. Moler: Numerical Computing with Matlab, SIAM, Philadelphia, PA,
2004
[20] J. Stoer, R. Bulirsch: Introduction to Numerical Analysis, Springer-Verlag,
New York, third edition, 2002
[21] G. W. Collins II: Fudamental Numerical Methods and Data Analysis, Case
Western Reserve University, 2003

157

You might also like