:

:

ߠ

Π

:

:

I

(.)

: 011-469

2001 .

堠 - 3

1. - 蠠 - 4

1.1. - 4

1.2. 蠠 - 6

2. . ⠠ - 9

2.1. - 9

2.2. 頠 - 10

3. ࠠ - 11

4. 蠠 - 13

5. 蠠 - 14

6. - 蠠 - 16

ࠠ - 21

1.   y = x + cos ( y / Ö0.3 ) x0 = 0.7 y0 = 2.1 [ 0.7 ; 1.7 ] h = 0.1.

2.   - .

3.   .1. .

4.   .

5.   , .

6.   - , , QBASIC. :

- y( xi ), xi, h h/2 ;

- F( xi ) xi ;

- i = F( xi ) - yi.

- - .

1.

-

1.1.

, .. y(x), . , - y(x) x0, .. y(x0) = y0, [ x0 - xn ].

. 1. , .

1. .

- - ( ). :

yi+1* = yi + h f( xi ; yi ), i = 0,1,2 ... n

yi+1 = yi + h (f( xi ; yi ) + f( xi+1 ; yi+1*)) / 2

n , :

n = (xn - xo) / h

, i,yi i+1,yi+1*, ( . 2)

.2. - .

yi+1, - , , yi+1*, . h , .. - .

1.2. ר

堠 y = x + cos ( y / Ö0.3 ) 蠠 x0 = 0.7, y0 = 2.1 ࠠ 堠 [ 0.7 ; 1.7 ] h = 0.1 .

-

yi+1* = yi + h f( xi ; yi ),

yi+1 = yi + h (f( xi ; yi ) + f( xi+1 ; yi+1*)) / 2

y1* y1

f( x0 ; y0 ) = 0.7 + cos (2.1 / Ö0.3 ) = - 0.069675

x1 = x0 + h = 0.7 + 0.1=0.8

y1* = y0 + h * f( x0 ; y0 ) = 2.1 + 0.1 * (- 0.069675) = 2.093032

y1 = y0 + h * (f( x0 ; y0 ) + f( x0 + h ; y1* )) / 2 = 2.1 + 0.1 * ((- 0.069675) + 0.022266)/2 =

= 2.09763

x y :

f( x1 ; y1 ) = 0.8 + cos (2.09763/ Ö0.3 ) = 0.02757

x2 = 0.8 + 0.1 = 0.9

y2* = 2.09763 + 0.1 * 0.02757 = 2.100387

y2 = 2.09763 + 0.1 * (0.02757 + 0.130776) / 2 = 2.105547

f( x2 ; y2 ) = 0.9 + cos (2.105547 / Ö0.3 ) = 0.136831

x3 = 0.9 + 0.1 = 1

y3* = 2.105547 + 0.1 * 0.136831 = 2.11923

y3 = 2.105547 + 0.1 * (0.136831 + 0.25321) / 2 = 2.125049

f( x3 ; y3 ) = 1 + cos (2.125049 / Ö0.3 ) = 0.260317

x4 = 1+ 0.1 = 1.1

y4* = 2.125049 + 0.1 * 0.260317 = 2.1510807

y4 = 2.125049 + 0.1 * (0.260317 + 0.393124) / 2 = 2.157721

f( x4 ; y4 ) = 1.1 + cos (2.157721 / Ö0.3 ) = 0.401751

x5 = 1.1 + 0.1 = 1.2

y5* = 2.157721+ 0.1 * 0.401751 = 2.1978961

y5 = 2.157721 + 0.1 * (0.401751 + 0.556089) / 2 = 2.205613

f( x5 ; y5 ) = 1.2 + cos (2.205613 / Ö1.3 ) = 0.566933

x6 = 1.2 + 0.1 = 1.3

y6* = 2.205613 + 0.1 * 0.566933 = 2.2623063

y6 = 2.205613 + 0.1 * (0.566933 + 0.750302) / 2 = 2.271475

f( x6 ; y6 ) = 1.3 + cos (2.271475 / Ö0.3 ) = 0.764362

x7 = 1.3 + 0.1 = 1.4

y7* = 2.271475 + 0.1 * 0.764362 = 2.347911

y7 = 2.271475 + 0.1 * (0.764362 + 0.987033) / 2 = 2.359045

f( x7 ; y7 ) = 1.4 + cos (2.359045/ Ö0.3 ) = 1.005629

x8 = 1.4 + 0.1 = 1.5

y8* = 2.359045 + 0.1 * 1.005629 = 2.4596079

y8 = 2.359045 + 0.1 * (1.005629 + 1.280033) / 2 = 2.473328

f( x8 ; y8 ) = 1.5 + cos (2.473328 / Ö0.3 ) = 1.304536

x9 = 1.5+ 0.1 = 1.6

y9* = 2.473328 + 0.1 * 1.304536 = 2.6037816

y9 = 2.473328 + 0.1 * (1.304536 + 1.6414317) / 2 = 2.620626

f( x9 ; y9 ) = 1.6 + cos (2.620626 / Ö0.3 ) = 1.6721351

x10 = 1.6 + 0.1 = 1.7

y10* = 2.620626 + 0.1 * 1.6721351 = 2.7878395

y10 = 2.620626 + 0.1 * (1.6721351 + 2.068584) / 2 = 2.807662

h / 2 :

f( x0 ; y0 ) = 0.7 + cos (2.1 / Ö0.3 ) = - 0.069675

x1 = 0.7 + 0.05 = 0.75

y1* = 2.1 + 0.05 * (- 0.069675) = 2.096516

y1 = 2.1 + 0.05 * ((- 0.069675) + ( - 0.02372)) / 2 = 2.097665

f( x1 ; y1 ) = 0.75 + cos (2.097665 / Ö0.3 ) = - 0.022389

x2 = 0.75 + 0.05 = 0.8

y2* = 2.097665 + 0.05 * (- 0.022389) = 2.096546

y2 = 2.097665 + 0.05 * ((- 0.022389) + 0.026314) / 2 = 2.097763

f( x2 ; y2) = 0.8 + cos (2.097763 / Ö0.3 ) = 0.027724

x3 = 0.8 + 0.05 = 0.85

y3* = 2.097763 + 0.05 * 0.027724 = 2.0991492

y3 = 2.097763 + 0.05 * (0.027724 + 0.079334) / 2 = 2.10044

f( x3 ; y3) = 0.85 + cos (2.10044 / Ö0.3 ) = 0.080838

x4 = 0.85 + 0.05 = 0.9

y4* = 2.10044 + 0.05 * 0.080838 = 2.1044819

y4 = 2.10044 + 0.05 * (0.080838 + 0.135575) / 2 = 2.10585

f( x4; y4) = 0.9 + cos (2.10585 / Ö0.3 ) = 0.137188

x5 = 0.9 + 0.05 = 0.95

y5* = 2.10585 + 0.05 * 0.137188 = 2.1127094

y5 = 2.10585 + 0.05 * (0.137188 + 0.195345) / 2 = 2.114164

f( x5; y5) = 0.95 + cos (2.114164 / Ö0.3 ) = 0.19709

x6 = 0.95 + 0.05 = 1

y6* = 2.114164 + 0.05 * 0.19709 = 2.1240185

y6 = 2.114164 + 0.05 * (0.19709 + 0.259053) / 2 = 2.125567

:

yi+1 = yih + (yih/2 - yih ) / (2p - 1) , :

- , - = 2

= 1. :

y(1) = 2.125049 + (2.125567 - 2.125049) / (22 - 1) = 2.1252216

e ih= 2p (yih - yih/2) / (2p - 1) = 22 (2.125567 - 2.125049) / 3 = 6.9 * 10 -4

e ih/2= (yih - yih/2) / (2p - 1) = (2.125567 - 2.125049) / 3 = 1.73 * 10 -4

1. X Y, .

I X ( I ) Y ( I )
0 0.7 2.1
1 0.8 2.09763
2 0.9 2.105547
3 1 2.125049
4 1.1 2.157721
5 1.2 2.205613
6 1.3 2.271475
7 1.4 2.359045
8 1.5 2.473328
9 1.6 2.620626
10 1.7 2.807662

3.

2. .

2.1.

, .1. ( 1. ) , .. , , X ( I ) , Y ( I ). : F (x) = ax2 + bx + c

( 1.) , ..:

( ax2 + bx + c - yi )2 => min

, .

DF / da = 0, dF / db = 0, dF / dc = 0

:

a11a + a12b + a13c = b1

a21a + a22b + a23c = b2

a31a + a32b + a33c = b3

堠 a11 = , a12 = a21 = , a13 = a22 = a31 = , a23 = a32 =xi , a33 = n + 1

b1 = yi , b2 =xi yi , b3 =yi .

2.2. ר

, .2.2.:

11 = 0.74 + 0.84 + 0.94 + 1.04 + 1.14 + 1.24 + 1.34 + 1.44 + 1.54 + 1.64 + 1.74 = 32.5094

12 = 21 = 0.73 + 0.83 + 0.93 + 1.03 + 1.13 + 1.23 + 1.33 + 1.43 + 1.53 + 1.63 + 1.73 = 22.9680

13 = 22 = 31 = 0.72 + 0.82 + 0.92 + 1.02 + 1.12 + 1.22 + 1.32 +1.42+1.52+1.62+1.72 = 16.9400

23 = 32 = 0.7 + 0.8 + 0.9 + 1 + 1.1 + 1.2 + 1.3 + 1.4 + 1.5 + 1.6 + 1.7 = 13.2000

33 = n + 1 = 11

b1 = 2.1 * 0.72 + 2.09763 * 0.82 + 2.105547 * 0.92 + 2.125049 * 1.02 + 2.157721 * 1.12 + 2.205613 * 1.22 + 2.271475 * 1.32 + 2.359045 * 1.42 + 2.473328 * 1.52 + 2.620626 * 1.62 + 2.807662 * 1.72 = 40.83941

b2 = 2.1 * 0.7 + 2.09763 * 0.8 + 2.105547 * 0.9 + 2.125049 * 1.0 + 2.157721 * 1.1 + 2.205613 * 1.2 + 2.271475 * 1.3 + 2.359045 * 1.4 + 2.473328 * 1.5 + 2.620626 * 1.6 + 2.807662 * 1.7 = 31.119972

b3 = 2.1 + 2.09763 + 2.105547 + 2.125049 + 2.157721 + 2.205613 + 2.271475 + 2.359045 + 2.473328 + 2.620626 + 2.807662 = 25.3237

:

32.5094a + 22.968b + 16.94c = 40.83941

22.968a + 16.94b + 13.2c = 31.119972

16.94a + 13.2b + 11c = 25.3237

a,b,c.

3.

, , , .

, . 2.2.:

, . , . , .

:

μ21 = 21 / 11 = 22.968 / 32.5094 = 0.7065

:

32.5094a * 0.7065 + 22.968b * 0.7065 + 16.94 * 0.7065 = 40.83941 * 0.7065

:

22.968a + 16.2269b + 11.9681c = 28.853043

:

0a + 0.7131b + 1.2319c = 2.266929

:

i31 = a31 / a11 = 16.94 / 32.5094 = 0.5211

32.5094a * 0.5211 + 22.968b * 0.5211 + 16.94c * 0.5211 = 40.83941 * 0.5211

16.94a + 11.9686b + 8.8274c = 21.281416

, :

0a +1.2314b + 2.1726c = 4.042284

, , :

32.5094a + 22.968b + 16.94c = 40.83941

0.7131b + 1.2319c = 2.266929

1.2314b + 2.1726c = 4.042284

, . :

μ32 = a32 / a22 = 1.2314 / 0.7131 = 1.7268

:

0.7131b * 1.7268 + 1.2319c * 1.7268 = 2.266929 * 1.7268

1.2314b + 2.1272c = 3.914533

:

0b + 0.0454c = 0.127751

, :

32.5094a + 22.968b + 16.94c = 40.83941

0.7131b + 1.2319c = 2.266929

0.0454c = 0.127751

:

c = 0.127751 / 0.0454 = 2.813899

b = (2.266929 - 1.2319 * 2.813899) / 0.7131 = - 1.682111

a = (40.83941 - 16.94 * 2.813899 - 22.968 * (- 1.682111) ) / 32.5094 = 0.978384

, :

32.5094 * 0.978384 + 22.968 * (- 1.682111) + 16.94 * 2.813899 = 40.83941

22.968 * 0.978384 + 16.94 * (- 1.682111) + 13.2 * 2.813899 = 31.119972

16.94 * 0.978384 + 13.2 * (- 1.682111) + 11 * 2.813899 = 25.3237

40.8394 40.83941

31.12 31.119972

25.3228 25.3237

, :

F (x) = 0.978384x2 - 1.682111x + 2.813899

4.

F(x) = 0.978384 x2 - 1.682111 x + 2.813899

[0.7; 1.7] h=0.1

x0 = 0.7

F( x0 ) = 0.978384 * 0.72 - 1.682111 * 0.7 + 2.813899 = 2.118622

x1 = x0 + h = 0.7 + 0.1 = 0.8

F( x1 ) = 0.978384 * 0.82 - 1.682111 * 0.8 + 2.813899 = 2.095734

x2 = 0.8 + 0.1 = 0.9

F( x2 ) = 0.978384 * 0.92 - 1.682111 * 0.9 + 2.813899 = 2.092711

x3 = 0.9 + 0.1 = 1.0

F( x3 ) = 0.978384 * 1.02 - 1.682111 * 1.0 + 2.813899 = 2.109553

x4 = 1.0 + 0.1 = 1.1

F( x4 ) = 0.978384 * 1.12 - 1.682111 * 1.1 + 2.813899 = 2.14626

x5 = 1.1 + 0.1 = 1.2

F( x5 ) = 0.978384 * 1.22 - 1.682111 * 1.2 + 2.813899 = 2.202831

x6 = 1.2 + 0.1 = 1.3

F( x6 ) = 0.978384 * 1.32 -1.682111 * 1.3 + 2.813899 = 2.279266

x7 = 1.3 + 0.1 = 1.4

F( x7 ) = 0.978384 * 1.42 - 1.682111 * 1.4 + 2.813899 = 2.375567

x8 = 1.4 + 0.1 = 1.5

F( x8 ) = 0.978384 * 1.52 - 1.682111 * 1.5 + 2.813899 = 2.491732

x9 = 1.5 + 0.1 = 1.6

F( x9 ) = 0.978384 * 1.62 - 1.682111 * 1.6 + 2.813899 = 2.627762

x10 = 1.6 + 0.1 = 1.7

F( x10 ) = 0.978384 * 1.72 - 1.682111 * 1.7 + 2.813899= 2.783656

5. .

:

yi - , .1.2. (. 1), F(xi) - xi, . 4. xi.

:

0 = F( x0 ) - y0 = 2.118622 - 2.1 = 0.018622

02 = 3.46779 * 10 - 4

1 = F( x1 ) - y1 = 2.095734 - 2.09763 = - 0.001896

12 = 3.59482 *10 - 6

2 = F( x2 ) - y2 = 2.092711 - 2.105547 = - 0.012836

22 = 1.64763 * 10 - 4

3 = F( x3 ) - y3 = 2.109553 - 2.125049 = - 0.015496

32 = 2.40126 * 10 - 4

4 = F( x4 ) - y4 = 2.14626 - 2.157721 = - 0.011461

42 = 1.31355 * 10 - 4

5 = F( x5 ) - y5 = 2.202831 - 2.205613 = - 0.002782

52 = 7.73953 * 10 - 6

6 = F( x6 ) - y6 = 2.279266 - 2.271475 = 0.007791

62 = 6.06997 * 10 - 5

7 = F( x7 ) - y7 = 2.375567 - 2.359045 = 0.06522

72 = 2.72977 * 10 - 4

8 = F( x8 ) - y8 = 2.491732 - 2.473328 = 0.08404

82 = 3.38707 * 10 - 4

9 = F( x9 ) - y9 = 2.627762 - 2.620626 = 0.007136

92 = 5.09225 * 10 - 5

10 = F( x10 ) - y10 = 2.783656 - 2.807662 = - 0.024006

102 = 5.76288 * 10 -4

11

 
d = Ö 0.0021939515 = Ö 1.9945013 * 10 - 4 = 0.014122681 1.412268 * 10 - 2

2.

2. .

I

xi

yi

F(xi)

i

i2

0 0.7 2.1 2.118622 0.018622

3.46779 * 10 - 4

1 0.8 2.09763 2.095734 - 0.001896

3.59482 * 10 - 6

2 0.9 2.105547 2.092711 - 0.012836

1.64763 * 10 - 4

3 1.0 2.125049 2.109553 - 0.015496

2.40126 * 10 - 4

4 1.1 2.157721 2.14626 - 0.011461

1.31355 * 10 - 4

5 1.2 2.205613 2.202831 - 0.002782

7.73953 * 10 - 6

6 1.3 2.271475 2.279266 0.007791

6.06997 * 10 - 5

7 1.4 2.359045 2.375567 0.06522

2.72977 * 10 - 4

8 1.5 2.473328 2.491732 0.08404

3.38707 * 10 - 4

9 1.6 2.620626 2.627762 0.007136

5.09225 * 10 - 5

10 1.7 2.807662 2.783656 - 0.024006

5.76288 * 10 - 4

4.

5.

6. -

- . 6.

X(I),Y(I),N.

. 3- . (. . 2.2). . .

:

FNY(X) = K(1) X 2 + K(2) X + K(3)

, Y(I), , . .

. 7 , X(I) Y(I).

. 6. - .

CLS

PRINT " - "

X0 = 0.7

XN = 1.7

Y0 = 2.1

H = 0.1

N = (XN - X0) / H

DIM X(N)

DIM Y(N)

X(0) = X0

Y(0) = Y0

FOR I = 0 TO N - 1

X(I + 1) = X(I) + H

Y(I + 1)* = Y(I) + H * (X(I) + COS(Y(I) / SQR(0.3)))

Y(I +1) = Y(I)+H*((X(I)+COS(Y(I)/SQR(0.3)))+(X(I+1)+COS(Y(I+1)* / SQR(0.3))))/2

PRINT " X("; I; ")="; X(I), , "Y("; I; ")="; Y(I)

NEXT I

I = 10: PRINT " X("; I; ")="; X(I), "Y("; I; ")="; Y(I)

PRINT " "

PRINT " "

a11 = 0: b1 = 0: a12 = 0: b2 = 0: a13 = 0: b3 = 0: a23 = 0: a33 = N + 1

FOR I = 0 TO N

a11 = a11 + X(I) ^ 4

a12 = a12 + X(I) ^ 3

a13 = a13 + X(I) ^ 2

a23 = a23 + X(I)

b1 = b1 + (X(I) ^ 2) * Y(I)

b2 = b2 + X(I) * Y(I)

b3 = b3 + Y(I)

NEXT I

a21 = a12: a22 = a13: a31 = a13: a32 = a23: S = 0

REM

DIM (3)

m21 = a21 / a11

m31 = a31 / a11

a22 = a22 - a12 * m21

a23 = a23 - a13 * m21

b2 = b2 - b1 * m21

a32 = a32 - a12 * m31

a33 = a33 - a13 * m31

b3 = b3 - b1 * m31

m32 = a32 / a22

a33 = a33 - a23 * m32

b3 = b3 - b2 * m32

(3) = b3 / a33

(2) = (b2 - (3) * a23) / a22

(1) = (b1 - (3) * a13 - (2) * a12) / a11

REM

DIM F(N)

DEF FNY(X) = K(1) * X ^ 2 + K(2) * X + K(3)

PRINT "-----------------------------------------------------------------------------------"

PRINT " X(I) | y(I) | F(x(I)) | F(x(I))-y(I) | d^2 "

PRINT "-----------------------------------------------------------------------------------"

FOR I = 0 TO N

F(I) = FNY(X(I))

D = F(I) - Y(I)

S = S + D ^ 2

PRINT X(I), Y(I), f(I), D, D^2

NEXT I

E = SQR(S / (N + 1))

PRINT " ="; E

END

1.         .. . . .1991.

2.         ., . . . . . л 1982.

3.         .. , .2 - , 1996.

4.         .. . . . 1992. .

5.         - , 1997.


 
2012 , , .