Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://dfgm.math.msu.su/files/golo/modelling.pdf
Äàòà èçìåíåíèÿ: Wed May 27 14:26:14 2009
Äàòà èíäåêñèðîâàíèÿ: Sat Apr 9 22:24:37 2016
Êîäèðîâêà:
..

-


.. , ..

Moc 2009


.. , .. . . ­ M.: - - - , 2009, ­ 120 .

. . . . , , .

: . .-. ., . ..

c - , 2009 .



1 1.1. . . . . . . . . . . . . . . . . 1.2. . . . . . . . . 1.2.1. . . . . . . . . . . . . . 1.2.2. . . . . . . . . . . . . . 1.3. . . . . . 1.3.1. . . . . 1.3.2. 1.3.3. Maxwell'a . . . 1.3.4. . . 1.4. : . . . . . . . 1.4.1. . . . . . 1.4.2. . . . . . . . . . . 1.4.3. 1.4.4. . . . . . . . . . . . . . . . . . . . . . 2 2.1. . . . . . . . . . . . . . . . . . . . 2.2. : . . . . . . . . . 2.2.1. . . . . . 2.2.2. . . . 2.2.3. . . . . . . . . . . 2.2.4. 2.2.5. . . . . . . . . . . . . . . . . . . . . . 2.3. . . . . . . . . . . . . . . 2.4. : . . . . 2.4.1. . . . . . 2.4.2. . . . . . . . . . . 2.4.3. 2.4.4. . . . . . . . . . . . . . . . . . . . . . 3 a 3.1. . . . . . . 3.2. . . . . . . . . . . . 3.3. a, . . . . . . . . . . . . 3.4. . . . . . . . . . . . . . . . . . . . . . 7 7 8 9 9 11 13 13 16 20 22 22 23 34 37 39 39 41 41 42 44 60 64 64 66 66 67 71 73 75 76 77 78 80 3


3.5. a 83 3.6. . . . . . . . . . . . . . . . . . . 84 3.7. : . . . . . . . . . . 86 3.7.1. . . . . . 86 3.7.2. . 87 3.7.3. . . . . . . . . . . 89 3.7.4. 101 3.7.5. . . . . . . . 103 3.7.6. . . . . . . . . . . . . . . . . . . . . . 105 3.8. . . . . . . . . . . . . . . . . . . . . . 106 4 g > 0, 107 4.1. Mathematica . . . . . . . . . . . . . . . . . 108 4.2. g > 0 . . . . . . . . 110

4



, - . . , , , , , , , . , , , , , , . , , ( , ). , (, ; ­ ). , , . ++, 5


. . , , . Mathematica, , . ( ), , . , ++. .. .

6


1


, .. . , . , . .

1.1.
, , . x, x(t) t. f , ­ m. Newton'a dp = f, dt p ­ , p=m dx . dt

, .. f = 0, p = const. , . , p x = x0 + vt, v = m 7


, : , . d d p = f, p = m x dt dt . , Newton'a, . . , . , , , . . Newton'a. 1 gramm, 1 sec, 1 cm, .. CGS.

1.2.
, , - . , -. . ­ , . 8


1.2.1. . P = p1 + p2 , E= p2 p2 1 +2 2 m1 2m

2

, p
1

= =

m1 P± m1 + m2 m2 P m1 + m2

2 m1 m2 m1 1+ m 2 m1 m2 m1 + m2

2

E- E-

P2 m1 + m

2

p

1

P2 m1 + m

2

­ . m1 = m2 = m. , . , , .. , p1 , p2 p1 , p2 p2 = p1 p1 = p2 , , , p1 , p2 , . 1.2.2. . , . , . . , , , , 9


, . , . , . , , . . v1 + v2 v1
2

= =

+ v2

2

v1 + v2

(1.1)
2

v1 2 + v2

(1.2)

, 4 6 ­ . , . v1 , v2 v1 = +Y, v2 = v2 + Z (1.1) , Z = -Y , Y . Y , (1.2). Y = x W , W ­ . v1 = v1 - x W, (1.2), v1 = v1 - 1 (V · W ) W, 2 v2 = v2 + 1 (V · W ) W 2 v2 = v2 - x W

V V = v1 - v2 . "" W . , , , . , , 10


­ , , , V , , W . .

1.3.
, , . , , . . 1.2.1. , , f (t), - f (t), 3- Newton'a, . , f (t) = 0, t < 0, t , .. . p1 = f (t), p2 = -f (t)

p1 + p2 = const. , . p1 ,p2 , p2 p2 p1 p2 + = f (t) m1 m2 p1 p2 - m1 m2

, .. p1 p2 = m1 m2 . 3- Newton'a. 11


, , , . m1 ,m2 ; , , . f (t) -f (t) . , p1 = f (t), p2 = -f (t) - kx2 , p1 + p2 . , , , : p1 p1 p1 p2 p2 p2 + = f (t) - m1 m2 m1 m2 , p1 p2 - = v1 - v2 = 0 m1 m2 f (t) = 0. ,
2 2 m1 v1 k m1 v1 + + x2 = const 2 2 22

, . , t p=
t

f (t)

, , . , , , . 12


1.3.1. N 1 . . . , , . N 1 , , , , .. , , , v 2 . 1.3.2. . , , , . , , .. . . , . . T , .. , , . . i- fi (t), ti < t < ti + . 0 < t < T 13


n . f= 1 T
T n n

dt
0 i=1

fi (t) =
i=1

1 T

T

dt fi (t)
0

(1.3)

, i- , ,
T

p(T ) - p(0) =
0

fi (t) dt

, f= 1 T
n

(p
i=1

i,f in

-p

i,init

)

(1.4)

, , , . , . ( ) . , , , , .. , , pinit = -pfin p
init

-p

fin

= 2mv

v ­ . (1.4) n 1 f= 2mi vi T i=1 14


i . , , j , N 1 f= Kj · 2mj vj T j =1 Kj j - T ; vj . Kj , , . Lz , Lz 0 = vj C, 2 0 . j - T Kj = ,
N

T vj 20
2 mj vj Lz

f=
j =1

, .. , Lx Ly . , V = Lx Ly Lz , P= f 1 = Lx Ly V
N 2 mj vj = j =1

2 V

N j =1

2 mj vj 2

(1.5)

x y , 3P = 2 V
N j =1 2 2 2 mj vy,j mj vz, mj vx,j + + 2 2 2 j

=

2 V

N j =1

2 mj vj 2

15


, , 1 v= N
2 N 2 vj j =1

PV = 2 mv N 3 2
2

, . , , 3 mv 2 = kB T 2 2 kB ­ . , N ­ . , , ­ NA 6 · 1023 . (1.6) PV = RT , R = NA kB R . 1.3.3. . a , , .. . , , , , . . , - , . , - 16


, , .. , . , , , , .. , . . , , . . , , . , , , , , , . , , , . , , .. . . , , , . . . , , a n. , . l a n. , , 17


v , . , a , , .. , a2 vt, t ­ , . K = n a2 vt. , , .. , l= 1 vt = K a2 n

, , . 1/ 2 . . , 1) . , f v dv (1.7) f = dz . . . H . , U . , , ..
1) " .. , , , a (1.7) . , , , , .

18


, , 2) . , ­ z v=U H , , , U f = H (1.7). (1.7) . , . dz , l, , v v + dv . , dz ­ , , . . n , u ­ . , x, y , z 1) , n/3. , , , , , , .. n/6. dA 1 nV dA 6
; . 1) .
2)

19


. , , V + dV , -1/6nV dA(mdV ), , , V , 1/6nV dA(mdV ), .. 1 ndA (mdV ) 3 , , dF = 1 nV m dV 3

, , f= dF 1 1 dV = nV m dV = nV m dz dA 3 3 dz

, , dz l, (1.7) = 1 nV m l 3 (1.8)

, nm cm3 , .. . , , mV = 3a2 . : ; 1) . 1.3.4. . , ,
1) . , .

20


. R L. V P1 , P2 . , , , .. , . , , , . r, , .. , . ­ , , P1 - P2 , .. (P1 - P2 ) R2 = 2RL f (r) , ­ . , f (r) = P1 - P2 r 2L

, R, .. , P1 - P2 f (R) = R 2L . f (r) (1.7) f (r) = - dv dr

v ­ r dv P1 - P2 r =- dr L 2 21


, v (r = R) = 0 (1.9) v= P1 - P2 R2 - r L 4
2

,
R

Q = 2

0

vrdr =

P1 - P2 r4 . L 8

. , . XIX , . , . , , . XX ­ , , , . , , , . (W.H.Keesom) 20- , .

1.4. :
1.4.1. , , , 22


, . , , . , : , . , , , , , ­ ( ). , . . . , ­ , . , , , , ( , ) ­ , ­ . , . , , (1.6), - ? . 1.4.2. , , : ) , ; ) 23


, . , ( ) . , ( ) , , , , . ) . , , , , . . 1) : // , // 500 for (int n = 1; n <= 500; n++) { Evolution_until_after_next_collision(x, v, X, V, t); // . . . ( ) } n , 500 ­ , x, v ­ 1)

. . 32.

24


, X, V ­ 2) , t ­ , Evolution_until_after_next_collision ­ , . , , . "// . . ." , ( , ) ), . , , . , , . , , , . , . Evolution_until_after_next_collision. , , : x( ) = x0 + v0 , v ( ) = v0 . 1) , x0 , v0 ­ . -g , : X ( ) = X0 + V0 - V ( ) = V0 - g . g 2 , 2

, .
2) , . 1) t, ; .

25


x( ) = 0, : x0 bottom = - . v0 , , , , . x( ) = X ( ), x0 + v0 = X0 + V0 - , , g 2 +(v0 - V0 ) + x0 - X0 = 0. 2 , x0 - X0 0. ( g > 0) , . , , , : -(v0 - V0 )+ (v0 - V0 )2 - 2g (x0 - X0 ) . piston = g , , bottom piston : // , // void Evolution_until_after_next_collision(double& x, double& v, double& X, double& V, double& t) { double tau_bottom = - x / v; // double D = (v-V) * (v-V) - 2. * g * (x - X); double tau_piston = (V - v + sqrtl(D)) / g; // // . . . 26 g 2 , 2


, v0 > 0 ( , bottom < 0), , . bottom > 0, . , : . , bottom < piston , , ­ . if (tau_bottom > 0 && tau_bottom < tau_piston) { // . . . ( ) } else { // . . . ( ) } tau_collision, tau_bottom tau_piston . , , . -, : x , v , X V . : // : tau_collision = tau_bottom; x = 0; // , // ; // X = X + V * tau_collision - g * tau_collision * tau_collision / 2.; V = V - g * tau_collision; // // . . . , , , : v = -v; // 27


, : // : tau_collision = tau_piston; x = x + v * tau_collision; X = x; // , // v_before = v; V_before = V - g * tau_collision; // // . . . v_before V_before, (vb Vb ). , , . mv + MV = mvb + MVb , MV mv 2 + 2 2 : v= V=
2

=

2 mvb MVb2 + 2 2

(m - M )vb +2MVb , M +m (M - m)Vb +2mvb . M +m

, : v = ( (m - M) * v_before + 2 * M * V_before ) / (M + m); V = ( (M - m) * V_before + 2 * m * v_before ) / (M + m); // , : t = t + tau_collision; 28


Evolution_until_after_next_collision . , , , . , , , . , . , , , , , 1) . , , , , . , , ( ) . , . . , X , . , . , , , . ? ( ) (). . ,
1) , , , , , .

29


, : , ­ , , .. , . , X (t) . , , . ­ . , ( ). , , . , ( , ­ , ), . . : . , , . , , , . , ­ , (, Mathematica; , ; gnuplot, Microsoft Excel ). , , , , . main() 30


: ofstream X_res_file("X.res"); ofstream t_res_file("t.res"); main() , : X_res_file.close(); t_res_file.close(); X t : X_res_file << X << ", "; t_res_file << t << ", "; , , . , -, , . ( ): #define m 1 #define M 1000 #define g 1. , . . , . -, , . 1) main: t = 0.; x = 1.; v = 100.; X = 20.; V = 0.;
1) , .

31


, , , , . . . , : #include #include using namespace std; #define m 1 #define M 1000 #define g 1. // , // void evolution_until_after_next_collision(double& x, double& v, double& X, double& V, double& t) { double tau_bottom = - x / v; // double D = (v-V) * (v-V) - 2. * g * (x - X); double tau_piston = (V - v + sqrtl(D)) / g; // double tau_event; // double v_before, V_before; // if (tau_bottom > 0 && tau_bottom < tau_piston) { // tau_event = tau_bottom; 32


x = 0;

// , // v = -v; // // X = X + V * tau_event - g * tau_event * tau_event / 2.; // V = V - g * tau_event; } else // { tau_event = tau_piston; x = x + v * tau_event; X = x; // , // v_before = v; V_before = V - g * tau_event; // v = ( (m - M) * v_before + 2 * M * V_before ) / (M + m); V = ( 2 * m * v_before + (M - m) * V_before ) / (M + m); // } t = t + tau_event; // // }

int main() { double t; // ( ) double x, v; // double X, V; // t = 0.; 33


x = 1.; v = 100.; X = 10.; V = 0.; ofstream X_res_file("X.res"); ofstream t_res_file("t.res"); // , // 500 for (int n = 1; n <= 500; n++) { evolution_until_after_next_collision(x,v,X,V,t); // X_res_file << X << ", "; t_res_file << t << ", "; } X_res_file.close(); t_res_file.close(); return 0; } 1.4.3. , . X.res X: 19.9820, 19.9642, 19.9068, 19.8504, 19.7558, . . . t.res ­ t: 0.18982, 0.389282, 0.587994, 0.785572, 0.981651, . . . X (t). , . , . 1.1. , . , . , . , 34


X 25

20

15

10

5

0

10

20

30

40

50

60

t

. 1.1. X (t) 2.

X 25

20

15

10

5

0

10

20

30

40

t

. 1.2. X (t) 0,5.

35


, . , , X t, ( , , , ). , 15 . , , , . 1.1, , , . , , 5, ­ , . . 1.2. , , , , , , ( ), ­ . , , . , : , , , . M g , m v X , , . , , M , g X m v , , ­ . , , , , , . 36


? , . (1.5) : 2 mv 2 . P= V2 3 , . , , , ­ , : Mg X = mv 2 , (1.10)

, , . , , , , , 10 ( (1.10)), , . 1.3. , , , . 1.4.4. , , : , ­ , : , , . , , , , , . . , , , . 37


X 25

20

15

10

5

0

10

20

30

40

50

t

. 1.3. X (t) ( 1): .

38


2


, . .

2.1.
, a, f (t), , . , .. x + x + 2 x = f (t)
..

(2.1)

x1 , x2 , f = 0, x(t) = C1 x1 (t)+ C2 x2 (t) (2.1) , .. , C1 , C2 . , , , dC2 dC1 x1 + x2 = 0 dt dt dx dx1 dx2 = C1 + C2 dt dt dt dx2 dC2 dx1 dC1 d2 x1 d2 x2 d2 x + = C1 + C2 + 2 2 dt dt dt2 dt dt dt dt 39 (2.2)

(2.2)


, C1 , C2 dC1 dx1 dC2 dx2 + = f (t) dt dt dt dt (2.2)(2.3) x2 f (t) x1 f (t) dC1 dC2 =- = , , dt x1 x2 - x2 x1 dt x1 x2 - x2 x1 x(t) = -x1 x2 f (t) dt + x2 x1 x2 - x2 x1 x1 f (t) dt x1 x2 - x2 x1 (2.4) (2.3)

, , , x1,2 = e
±1,2 t

,

1,2 = -

±i 2

2 0 -

2 4

(2.4) t e 2 i t e x= 2i - 2 4 , ( = 0), f (t) cos(0 t), , ( . ). exp(-t/2) . , , , , , , c . =
2 0 -

t e 2 eit f (t) dt + H.C.

(2.5)

40


2.2. : c
2.2.1. , , . , , : , , , . . , , ­ . (, , ). , , ( ), . , , x , Fdiss ( ), , ­ x , : Fdiss (0) x ( , , Fdiss (0) = 0). , , . (2.1): 2 x + x + 0 x = f (t). ¨ , , (2.5). : . , , 41


, , , . , , , (, ). , ( ), . , , , . , , ( ) , . , , . , . . : x = v, 2 v = -v - 0 x + f (t), (2.6)

. . 2.2.2. : x = F (x, t), 42


x = (x1 ,... ,xk ) ­ ( ) t (). : tn = n t, ; t ­ . , , , , . x, tn , xn ( , ). xn xn+1 . F (x, t). , , . xn x(tn ) . : 1 F (xn ,tn )+ F (xn+1 ,tn+1 ) t. (2.7) xn+1 - xn = 2 , , F (x, t) x , F (t), F (tn ) F (tn+1 ) t . (2.7) , xn+1 , ( xn ), , F . . , 43


, ( ). , xn+1 (2.7). . (0) , xn+1 (, xn ), (1) (2) xn+1 , xn+1 ,... , xn+1 , : 1 (i) F (xn ,tn )+ F (xn+1 ,tn+1 ) t. 2 , (i+1) (i) xn+1 - xn+1 (, ). , , . , , , , , , . , xn+1 . N t (0,N t). , , ­ . , . , (2.1). xn+1 = xn +
(i+1)

2.2.3. . , , . , , 44


, , . , 1): while (t < 100) // { // (0, 100) // ... ( ) } (x v ) . x, . x1 , ... ,xk : x[0],..., x[k-1]. (, , ) , , . ( ). , , , , . , , : struct Var // { double x, v; }; main(), , : Var V; ( V v, ). 1)

. . 52.

45


. , : Var operator +(Var& A, Var& B) { // Var Res; Res.x = A.x + B.x; Res.v = A.v + B.v; return Res; } Var operator *(double k, Var& A) { // Var Res; Res.x = k * A.x; Res.v = k * A.v; return Res; } ( ), ( ´ ). . , , ­ , F (x, t), , , , (2.6), . RHS(...) (righthand side, ). , -, V t. -, : 0 . , , , , , 46


. , : struct Par // { double omega0, gamma; }; RHS. (2.6) : Var RHS(Var& V, Par& P, double t) { // Var Res; Res.x = V.v; Res.v = - P.gamma * V.v - pow(P.omega0, 2) * V.x + Ext_force(P, t); return Res; } Ext_force(P, t) ­ , f (t). P, , . . , : void Trapezium_step(Var& V, Par& P, double& t, double st) { Var V0 = V; // // Var F0 = RHS(V0, P, t); // // Var V_prev = V; // , // , // do { // // 47


V_prev = V; V = V0 + 0.5 * st * ( F0 + RHS(V_prev, P, t + st) ); } while ( fabsl(V.x - V_prev.x) + fabsl(V.v - V_prev.v) > 0.00000001 ); // // , ; // , // t += st; // } V0, . , , V_prev, . , V , , . , : . , : while (t < 100) // { // (0, 100) Trapezium_step(V, P, t, st); // } ( P ­ , st ­ ). , , , . , , 48


, . , x , . , 100 ( , ). i, 100 : // : i++; // if ( i == 100 ) { // 100 x_res_file << V.x << " "; i = 0; } . , , , . , : f (t) = F cos t. . , , , . 1) 2) , .
, : Pk (t) et , Pk (t) ­ k , ­ . 2) , .
1)

49


, : xpart (t) = p cos t + q sin t, p q ­ . (2.1) cos t sin t, : p=
2 F 0 - 2 2

( -

2 0

2 )2

+ 2

,

q=

F ( - 2 ) + 2
2 0 2 2

.

, : xgen (t) = e F
-t/2 2

(a cos t + b sin t)+
2 2

2 0 -

cos t + sin t
2

2 (0 - 2 ) + 2

,

2 , , = 0 - 4 , a b ­ , . x(0) = x0 x(0) = x0 : x(0) = 0 x(0) = 0 ( a b):

xpar

t,0

(t) =
2

F ( -
2 0 2 )2

+ 2
-t/2

2

â (2.8) ,

2 â 0 -

cos t - e

cos t + sin t

+ sin t -

2 0 + 2 e 2

-t/2

: xhom (t) = e
-t/2

(x0 cos t +

x0 + x0 /2 cos t).

(2.9)

: xpart (t) = xpar 50
t,0

(t)+ xhom (t).

(2.10)


, , , : double Ext_force(Par& P, double t) { // return P.F * cosl(P.omega * t); } P.F P.omega ­ ( F ), P. , 1) , , Exact_x, (2.10): double Exact_x(Var& V0, Par& P, double t) { // // return Homogeneous_x(V0, P, t) + Partial_0_x(P, t); } Homogeneous_x Partial_0_x, (2.9) (2.8): double Homogeneous_x(Var& V0, Par& P, double t) { // // double Omega = sqrtl( pow(P.omega0, 2) - pow(P.gamma, 2) / 4. ); return expl(- P.gamma * t / 2.) * ( V0.x * cosl(Omega * t) + ( (V0.v + P.gamma * V0.x / 2.) / Omega ) * sinl(Omega * t) ); } double Partial_0_x(Par& P, double t) { // // double Omega = sqrtl( pow(P.omega0, 2) - pow(P.gamma, 2) / 4. );
1) x(t), , , .

51


double diff = pow(P.omega0,2) - pow(P.omega,2); double exponent = expl(- P.gamma * t / 2.); double factor = (pow(P.omega0,2) + pow(P.omega,2)) / (2. * P.omega * Omega); return ( P.F / ( pow(diff, 2) + pow(P.gamma, 2) * pow(P.omega, 2) ) ) * ( diff * ( cosl(P.omega * t) - exponent * cosl(Omega * t) ) + P.gamma * P.omega * ( sinl(P.omega * t) - factor * exponent * sinl(Omega * t) ) ); } , , . ´ , , . , P. , . , , : , , , , ­ . , . "force_res.h"1): #ifndef FORCE_RES_H #define FORCE_RES_H struct Var // { double x, v; }; // :
1) #ifndef .

52


Var operator +(Var& A, Var& B); Var operator *(double k, Var& A); struct Par // { double omega0, gamma, F, omega; }; // , double Ext_force(Par& P, double t); // , // : Var RHS(Var& V, Par& P, double t); // : void Trapezium_step(Var& V, Par& P, double& t, double st); // , // : double Exact_x(Var& V0, Par& P, double t); double Homogeneous_x(Var& V0, Par& P, double t); double Partial_0_x(Par& P, double t); #endif "var.cpp", Var: #include "force_res.h" Var operator +(Var& A, Var& B) { // Var Res; Res.x = A.x + B.x; Res.v = A.v + B.v; return Res; } 53


Var operator *(double k, Var& A) { // Var Res; Res.x = k * A.x; Res.v = k * A.v; return Res; } "integ.cpp", : #include "force_res.h" #include "math.h" void Trapezium_step(Var& V, Par& P, double& t, double st) { Var V0 = V; // // Var F0 = RHS(V0, P, t); // // Var V_prev = V; // , // , // do { // // V_prev = V; V = V0 + 0.5 * st * ( F0 + RHS(V_prev, P, t + st) ); } while ( fabsl(V.x - V_prev.x) + fabsl(V.v - V_prev.v) > 0.00000001 ); // // , ; // , // 54


t += st; }

//

"force_res.cpp", , : , : #include "force_res.h" #include double Ext_force(Par& P, double t) { // return P.F * cosl(P.omega * t); } Var RHS(Var& V, Par& P, double t) { // Var Res; Res.x = V.v; Res.v = - P.gamma * V.v - pow(P.omega0, 2) * V.x + Ext_force(P, t); return Res; } double Exact_x(Var& V0, Par& P, double t) { // // return Homogeneous_x(V0, P, t) + Partial_0_x(P, t); } double Homogeneous_x(Var& V0, Par& P, double t) { // // double Omega = sqrtl( pow(P.omega0, 2) - pow(P.gamma, 2) / 4. ); return expl(- P.gamma * t / 2.) * ( V0.x * cosl(Omega * t) + ( (V0.v + P.gamma * V0.x / 2.) / Omega ) * sinl(Omega * t) ); 55


} double Partial_0_x(Par& P, double t) { // // double Omega = sqrtl( pow(P.omega0, 2) - pow(P.gamma, 2) / 4. ); double diff = pow(P.omega0,2) - pow(P.omega,2); double exponent = expl(- P.gamma * t / 2.); double factor = ( pow(P.omega0,2) + pow(P.omega,2) ) / (2. * P.omega * Omega); return ( P.F / ( pow(diff, 2) + pow(P.gamma, 2) * pow(P.omega, 2) ) ) *( diff * ( cosl(P.omega * t) - exponent * cosl(Omega * t) ) + P.gamma * P.omega * ( sinl(P.omega * t) - factor * exponent * sinl(Omega * t) ) ); } , "main.cpp", 1) : #include #include #include #include "force_res.h"

using namespace std; int main() { Var V; V.x = 0.; V.v = 0.; Var V0 = V; Par P; P.omega0 = 1.; P.gamma = 0.05; P.F = 1.; P.omega = 1.2; double t = 0.;
1)

.

56


double st = 0.001; double x_ex = 0.; // double max_diff = 0.; // // ( ) ofstream x_res_file("x.res"); // ofstream x_exact_res_file("x_exact.res"); // double t1 = st; double error_out_interval = 1.; // // // error_out_interval int i = 0; int n_steps_out = 100; // // x // n_steps_out while (t < 200) // { // (0, 200) Trapezium_step(V, P, t, st); // x_ex = Exact_x(V0, P, t); // i++; if ( i == n_steps_out ) { // x_res_file << V.x << " "; x_exact_res_file << x_ex << " "; i = 0; 57


} // if ( fabsl(V.x - x_ex) > max_diff) max_diff = fabsl(V.x - x_ex); if (t1 >= error_out_interval) { // cout << "\ntime: " << t << " error: " << max_diff << " "; t1 = st; } else t1 += st; } x_res_file.close(); x_exact_res_file.close(); return 0; } . , , . main ( 1 ) . "" , ( ): time: time: time: time: time: time: time: 58 1 2 3 4 5 6 7 error: error: error: error: error: error: error: 1.56344e-007 2.45403e-007 2.49116e-007 6.93856e-007 6.97645e-007 8.89064e-007 1.28346e-006


x 0.06 0.04 0.02 5 0.02 0.04 0.06 10 15 20 t

. 2.1. , : x(t) , , = 0, 0 = 1, = 5, x0 = 0, x0 = 0. time: 8 error: 1.28346e-006 ... time: 200 error: 4.40115e-006 , 0.001 x, . 10 , 0.0001, :

time: time: time: ... time:

1 2 3 200

error: 2.65392e-010 error: 8.09929e-010 error: 1.30159e-009 error: 4.67997e-008

, 100 . , . , . 59


2.2.4. , . : = 0. 0 = 1, = 5, . . 2.1. , : , , "" ­ . . , ( ) (. (2.8)): x(t) = F (cos t - cos 0 t) , - 2
2 0
0

(2.11)

T

=

2 1.2. , : 0 = 1, = 1.2. . 2.2. ( ). . , (2.11) : x(t) = - t 2F sin sin (0 + )t, 2 - 2 2
2 0

2 6.3 T = 0

= - 0 ­ . , 0 + , . 2 2 F 2F - 2 2 0 - 0 . () : 0 = = 1. , . 2.3. 60


x 4 2 t

10 2 4

20

30

40

50

60

. 2.2. : x(t) , , . . , = 0, 0 = 1, = 1.2, x0 = 0, x0 = 0.

x 40 20 t

20 20 40

40

60

80

100

. 2.3. : x(t) , , . . , = 0, 0 = 1, = 1, x0 = 0, x0 = 0.

61


x 4 2 50 2 4 100 150 200 t

. 2.4. : x(t) , > , = 0.03, 0 = 1, = 1.2, x0 = 0, x0 = 0. . : 2 (2.12) x + 0 x = F cos t, ¨ = 0 . , x(t) = t (p cos t + q sin t) ( 1, t, ). (2.12), : p = 0, : x(t) = F t sin t, 2 0 q= F . 2 0

. , . : = 0. , : 62


x 20 10 50 10 20 100 150 200 t

. 2.5. : x(t) , , = 0.05, 0 = 1, = 1.0001, x0 = 0, x0 = 0.
2 = - (, = 0 - 4 ­ ). , > , , 0 = 1, = 1.2, = 0.03. . 2.4. , , , , , . , . , .
2

, "" , , 0 = 1, = : 1.0001, = 0.05. , . 2.5. , ­ . , , ( ), . e-t , . . 1 F . 20 , , . 63


2.2.5. . : , , , , . , , , . . , , , . , - , , ­ , ­ 4:2:1 ( ), , , . , , , , . . , , , . , : , , . .

2.3.
, , x + x +( 2 - 2 sin 2t) x = 0 64
..


. , Rayleigh' 1) . x = A1 sin t + B1 cos t + A3 sin 3t + B3 cos 3t +A5 sin 5t + B5 cos 5t + ... A1 ,B1 ,A3 ,B3 ,A5 ,B5 ,... , sin t, cos t, sin 3t, cos 3 t,... . sin 2t, . : A1 ( 2 - 2 ) B1 ( 2 - 2 ) A3 ( 2 - 9 2 ) B3 ( 2 - 9 2 ) A5 ( 2 - 25 2 ) B5 ( 2 - 25 2 ) ........................ - + - + - + ( + ( - (3 + (3 + (5 + (5 + )B1 )A1 )B1 )A1 )B5 )A5 + - + - + - B3 A3 B5 A5 B7 A7 = = = = = = 0 0 0 0 0 0

­ , . , A3 , B3 A1 , B1 ; A5 , B5 A3 , B3 . , A3 , B3 , A1 ( 2 - 2 ) - B1 ( + ) = 0, B1 ( 2 - 2 )+ A1 ( - ) = 0.
2

( 2 - 2 )2 = 2 - 2 (2.13)

2 - 2 2 0
1)

(2.14)

J.W.Strutt, Baron Rayleigh, The Theory of Sound, volume I, Ch.3; : ., , I, , (1940).

65


, + A1 =2 = B1 - 2 + -

, . , , 2 , 1) .

2.4. :
2.4.1. , , , , . , , : (), , ­ . , , ­ . . , , , . , , , , , , , , , .
1) G. Hill' , . G.Hill, "On the Part of the Motion of the Lunar Pedigree, which is a Function of the Mean Motion of the Sun and the Moon Acta Mathematica, 8 , 1 (1886).

66


, , , , . , ( ) . x + x +( 2 - 2 sin 2t) x = 0 ¨ , . 2.4.2. , , . , . , . "par_res.cpp", : #ifndef PAR_RES_H #define PAR_RES_H struct Var // { double x, v; }; // : Var operator +(Var& A, Var& B); Var operator *(double k, Var& A); struct Par // { double omega, gamma, eps, nu; }; 67


// , // : Var RHS(Var& V, Par& P, double t); // : void Trapezium_step(Var& V, Par& P, double& t, double st); #endif "var.cpp", Var: #include "par_res.h" Var operator +(Var& A, Var& B) { // Var Res; Res.x = A.x + B.x; Res.v = A.v + B.v; return Res; } Var operator *(double k, Var& A) { // Var Res; Res.x = k * A.x; Res.v = k * A.v; return Res; } "integ.cpp", : #include "par_res.h" #include "math.h" void Trapezium_step(Var& V, Par& P, double& t, double st) { Var V0 = V; // 68


// Var F0 = RHS(V0, P, t); // // Var V_prev = V; // , // , // do { // // V_prev = V; V = V0 + 0.5 * st * ( F0 + RHS(V_prev, P, t + st) ); } while ( fabsl(V.x - V_prev.x) + fabsl(V.v - V_prev.v) > 0.00000001 ); // // , ; // , // t += st; } "par_res.cpp", : #include "par_res.h" #include Var RHS(Var& V, Par& P, double t) { // Var Res; Res.x = V.v; Res.v = - P.gamma * V.v - pow(P.omega, 2) * (1. - 2. * P.eps * sinl(2. * P.nu * t) ) * V.x; return Res; } , "main.cpp", : 69 //


#include #include #include #include

"par_res.h"

using namespace std; int main() { Var V; V.x = 0.; V.v = .1; Var V0 = V; Par P; P.omega = 1.; P.gamma = 0.01; P.eps = 0.03; P.nu = 1.; double t = 0.; double st = 0.001; ofstream x_res_file("x.res"); // double t1 = 0; double point_out_interval = 0.01; // // x // point_out_interval x_res_file << V.x << " "; while (t < 500) // { // (0, 500) Trapezium_step(V, P, t, st); // t1 += st; if ( t1 > point_out_interval - st / 2.) { // x_res_file << V.x << " "; 70


t1 = 0; } } x_res_file.close(); return 0; } 2.4.3. 2 , = . , , , , , x(0) = 0, x(0) = 0 , , ( ). , , x(0) = 0, x(0) = 0.1. () = 0.01, = 0.03 , . 2.6. , 1) . (2.14), , : || .

, , ( ) : = 0.05, , : = 0.03, = 1, = 1, , . 2.7. , , . . , = 1.1, = 1, = 0.01, = 0.03 , . 2.8. : = 1.1, = 1, = 0, = 0.03
1)

, .

71


x 20

10

100 10

200

300

400

500

t

20

. 2.6. , = 1, = 1, = 0.01, = 0.03.

x 0.4 0.2 t

100 0.2 0.4

200

300

400

500

. 2.7. , = 1, = 1, = 0.05, = 0.03.

72


x 0.4 0.2 t

100 0.2 0.4

200

300

400

500

. 2.8. , , = 1, = 1.1, = 0.01, = 0.03. , . 2.9. 2.4.4. , . , , . , . . , , , , . , , , , , , .

73


x 0.4 0.2 t

100 0.2 0.4

200

300

400

500

. 2.9. , , , = 1, = 1.1, = 0, = 0.03.

74


3

a
a , 1/r2 , . Newton'a, , , ­ ( a). , , .. a. 1/r, ­ ­ , , . , , , . m . , , , . , , , , . , f =- m M r r3 (3.1)

r ­ , m ­ , M ­ , ­ , . (3.1) a. , a; 75


Q, q 1/, ­ . .

3.1.
a d2 m M r=- 3 r (3.2) 2 dt r , , mv 2 mM - = E = const (3.3) 2 r , ­ m mM r U =- f =- U r

, (3.3) . L=râp (p = m v ) (3.4)

­ , . (3.2), d L=0 dt .. , L = const. , ­ . , L - r . v·L = 0 76


, , .

3.2.
, z L. x - y , x = r cos , y = r sin . E L3 = L m2 mM E= ( + r2 2 ) - r , L = m r2 2 r L = m r2 = const (3.5)

, a, . . E= L2 mM m2 r+ - 2 2 2mr r (3.6)

(3.6) L2 mM (3.7) - Uef f = 2mr2 r . , r 0 (3.7) , r 0 , , L2 r = 2m2 M , . (3.6)(3.5) . , (3.5)-(3.6) 77


dr dt d dt d = dr L r
2

= = L r2

2 [E - U m

ef f

],

2 [E - U m

ef f

]

L r2 = 0 + dr (3.8) 2 [E - Uef f ] m , , , .

3.3. a,
. . , z = 0. x+
..

M x = 0, r3

y+

..

M y=0 r3

M ­ , . x = r cos , y = r sin

r,
.. M .. r cos - r sin -r cos 2 - 2sin r + 2 cos r 78

= 0,


.. M .. r sin + r cos -r sin 2 +2 cos r + 2 sin r

=0

cos , sin . M .. r -r 2 + 2 = 0 r (3.5), a, . u = 1/r. r= d dt 1 u = d d 1 u d 1 du =- 2 dt u d d2 u d2
2

r = - L2 u d2 u M m +u= d2 L2 u= r= M m L2
2 .. 2

(1 + e cos( - 0 ))

L2 1 M m2 1+ e cos( - 0 ) , : e < 1,e > 1,e = 1 ­ , . ­ a. , A, - , r2 L dA = = dt 2 2m 79


, LT A= 2m , , A = ab, a, b ­ . c p b 2 = p a, p= L2 M m
2

­ a T = 2a
3/2

/ M ,



T2 4 2 = a3 M

(3.9)

M ­ (""). , , ,
2 2 T1 T2 3 = a3 a1 2

.

3.4. .
( ) . , , , . , , , . , , 80


, , , , . , , . , , . . 1). ­ . m, . , .. , . T , . , , : l, m, g , T . , , , , , , ( ). , CGS. T = const ma g b lc ­ . [m] = gr, [g ] = cm , sec2 [l] = cm, [T ] = sec

, 1) Rayleigh, "... ; , , , " , . . , " " , , ­ (1940).

81


a =0 c+b = 0 2b = 1 T = const l g

2 , .. . , , ­ , const l 1) , .. . , " , "2) . a. , (3.2) r a r, t bt (3.10) ab
-2

=a

-2

,



a3 = b

2

(3.10) . , , 3) .
. "Raffiniert ist der Herr Gott, aber b¨ artigt ist er nicht". os 3) , , a . , . . 78.
2) 1)

82


. , ­ . - . , . , . L. , L3 , , L2 . L . . R > 1 N . , N .

3.5. a
, , . ­ . . , , , . . , , . a1) :
1) ., , I I I, , . 201, , (1976).

83


" 1 / 2100 000 000 2). , . , 1 / 4 . 1 / 4200 000 000 , . . , 10000 42 , , , . . , , , , 100 000 . 7IV 16V , , , 13III . , , ". 20 000 - 100 000 .

3.6.
. , , , , , , , , . , , , . , , m/M ­
2) 1.21 · 105 km, 1.43 · 109 km, , , 1 / 2 240 000 000 .

84


m M . , ( ) , ­ . . r , r1 ­ . d2 r dt2 d2 m1 2 r1 dt m = = - mM mm1 r- (r - r1 ) (3.11) |r |3/2 |r - r1 |3/2 m1 M m1 m - r - (r1 - r ) (3.12) 3/2 1 |r1 | |r - r1 |3/2

m ­ , m1 ­ . (3.11) m, (3.12) m1 , 1 1 - |r |3/2 |r1 |3/2 (3.13) |r - r1 | |r |, |r1 |, (3.13) = r - r1 . d2 m + m1 =- (3.14) 2 dt | |3/2 Kepler'a (3.9), m + m1 = 4
2

m + m1 d2 (r - r1 ) = - (r - r1 ) - M dt2 |r - r1 |3/2

a3 T

2

() ­ M + m = 4
2

a3 2 T 85


, , a M +m = m a
3

T T

2

(3.15)

a/a , T /T, (3.15) .

3.7. :
3.7.1. , , . , , . , , , . , , , , . , . . . , , , . 86


, , , , , , . , 1) , . , , . 3.7.2. , , , , . , . ( ­ ). x = F (x, t) ( ) 2) : xn+1 = xn + t (55Fn - 59Fn-1 +37Fn-2 - 9Fn-3 ), 24

1) , . , , . , , . 2) .

87


xk ­ , x tk = k t, Fk = F (tk ) ­ . , Fn , , , . , , , , , 3) . . , , , ´ , , . . , , . F , , . , ­ . : k1 = k2 = k3 = k4 = xn+1 F (xn F (xn F (xn F (xn = xn ,tn ), + 1 t k1 ,tn + 1 t), 2 2 + 1 t k2 ,tn + 1 t), 2 2 +t k3 ,tn +t), + t (k1 +2k2 +2k3 + k4 ). 6

, , ­ F (xn ,tn ).
3) .

88


3.7.3. 1) , , . . , , , . , ­ , , 1) ( ). , , , 2) . , x, y , x, y . : struct Var // { double x, y; double vx, vy; }; , , , . . (3.2): m m M d2 r=- r. dt2 r3

, , , . . 93. , , , , - . 2) , , , .
1) 1)

89


("")3). M . M , GM. , , , , P, , , . , (, ), , . , , : struct Par // { double GM; // , G * M }; , , : x = vx , y = vy , M x vx = - 3, (x2 + y 2 ) 2 M y , vy = - 2 + y2) 3 2 (x : Var RHS(Var& V, Par& P, double t) { // Var Res;
3) . ( , ) ( , ). , , . , , .

90


Res.x = Res.y = double double Res.vx Res.vy return

V.vx; V.vy; r = sqrtl(V.x * V.x + V.y * V.y); coeff = P.GM / (r * r * r); = - coeff * V.x; = - coeff * V.y; Res;

} , . , , . ­ 4- , : void Adams_Bashforth_4_step(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st) { Var F = RHS(V, P, t); V = V + (st / 24.) * ( 55. * F + (- 59.) * F1 + 37. * F2 + (- 9.) * F3 ); t += st; F3 = F2; F2 = F1; F1 = F; } F1, F2, F3 ­ 1, 2 3 , . F ( ), F1, "" . , ­ : void Start_for_Adams_4(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st) { // , // F3 = Runge_Kutta_4_step(V, P, t, st); F2 = Runge_Kutta_4_step(V, P, t, st); F1 = Runge_Kutta_4_step(V, P, t, st); } 91


, Runge_Kutta_4_step , ( , , ). ­ : Var Runge_Kutta_4_step(Var& V, Par& P, double& t, double st) { // double st2 = st / 2.; Var K1 = RHS(V, P, t); Var K2 = RHS(V + st2 * K1, P, t + st2); Var K3 = RHS(V + st2 * K2, P, t + st2); Var K4 = RHS(V + st * K3, P, t + st); V = V + (st / 6.) * (K1 + 2. * K2 + 2. * K3 + K4); t += st; return K1; } main(). , . , ­ x y point_out_interval ( , , ; point_out_interval, , , ). ( ). : M m mv 2 - E= 2 r z- : Lz = m(xvy - yvx ). 92


, , . , . "Kepler.h": #ifndef KEPLER_H #define KEPLER_H struct Var // { double x, y; double vx, vy; }; // : Var operator +(Var& A, Var& B); Var operator *(double k, Var& A); struct Par // { double GM; // , G * M }; // , // : Var RHS(Var& V, Par& P, double t); // , : double Energy(Var& V, Par& P); double Momentum(Var& V); // : void Trapezium_step(Var& V, Par& P, double& t, double st); // - : 93


Var Runge_Kutta_4_step(Var& V, Par& P, double& t, double st); // : void Start_for_Adams_4(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st); // : void Adams_Bashforth_4_step(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st); #endif "var.cpp": #include "Kepler.h" Var operator +(Var& A, Var& B) { // Var Res; Res.x = A.x + B.x; Res.y = A.y + B.y; Res.vx = A.vx + B.vx; Res.vy = A.vy + B.vy; return Res; } Var operator *(double k, Var& A) { // Var Res; Res.x = k * A.x; Res.y = k * A.y; Res.vx = k * A.vx; Res.vy = k * A.vy; return Res; } , "Kepler.cpp": 94


#include "Kepler.h" #include Var RHS(Var& V, Par& P, double t) { // Var Res; Res.x = V.vx; Res.y = V.vy; double r = sqrtl(V.x * V.x + V.y * V.y); double coeff = P.GM / (r * r * r); Res.vx = - coeff * V.x; Res.vy = - coeff * V.y; return Res; } double Energy(Var& V, Par& P) { // return 0.5 * (V.vx * V.vx + V.vy * V.vy) - P.GM / sqrtl(V.x * V.x + V.y * V.y); } double Momentum(Var& V) { // - z- return V.x * V.vy - V.y * V.vx; } "integ.cpp": #include "Kepler.h" #include "math.h" void Trapezium_step(Var& V, Par& P, double& t, double st) { Var V0 = V; // // Var F0 = RHS(V0, P, t); // // Var V_prev = V; 95


// , // , // do { // // V_prev = V; V = V0 + 0.5 * st * ( F0 + RHS(V_prev, P, t + st) ); } while ( fabsl(V.x - V_prev.x) + fabsl(V.v - V_prev.v) > 0.00000001 ); // // , ; // , // t += st; } Var Runge_Kutta_4_step(Var& V, Par& P, double& t, double st) { // double st2 = st / 2.; Var K1 = RHS(V, P, t); Var K2 = RHS(V + st2 * K1, P, t + st2); Var K3 = RHS(V + st2 * K2, P, t + st2); Var K4 = RHS(V + st * K3, P, t + st); V = V + (st / 6.) * (K1 + 2. * K2 + 2. * K3 + K4); t += st; return K1; } void Start_for_Adams_4(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st) { // , // 96 //


F3 = Runge_Kutta_4_step(V, P, t, st); F2 = Runge_Kutta_4_step(V, P, t, st); F1 = Runge_Kutta_4_step(V, P, t, st); } void Adams_Bashforth_4_step(Var& V, Var& F1, Var& F2, Var& F3, Par& P, double& t, double st) { Var F = RHS(V, P, t); V = V + (st / 24.) * ( 55. * F + (- 59.) * F1 + 37. * F2 + (- 9.) * F3 ); t += st; F3 = F2; F2 = F1; F1 = F; } "main.cpp": #include "Kepler.h" #include #include using namespace std; int main() { Var V; V.x = 1.; V.y = 0.; V.vx = 0.; V.vy = 1.1; Par P; P.GM = 1.; double t = 0., st = 0.001; double E0 = Energy(V, P); double L0 = Momentum(V); ofstream x_res_file("x.res"); // x ofstream y_res_file("y.res"); // y double t1 = 0; 97


double point_out_interval = 0.01; // // // point_out_interval double t2 = 0; double error_interval = 1; // // // error_interval x_res_file << V.x << " "; y_res_file << V.y << " "; Var F1, F2, F3; Start_for_Adams_4(V, F1, F2, F3, P, t, st); while (t < 50) // { // (0, 20) // : Adams_Bashforth_4_step(V, F1, F2, F3, P, t, st); // : Trapezium_step(V, P, t, st); t1 += st; if ( t1 >= point_out_interval ) { // x_res_file << V.x << " "; y_res_file << V.y << " "; t1 = 0; } t2 += st; if ( t2 >= error_interval ) { // // 98


y 1.5

1.0

0.5

2.5

2.0

1.5

1.0

0.5 0.5

0.5

1.0

x

1.0

1.5

. 3.1. , = 1, M = 1, m = 1, r0 = (1, 0), v0 = (0, 1.2). cout << "Time: " << t << "; "; cout << "Steps: " << (int) (t / st) << "; \n"; cout << "Error in E: " << Energy(V, P) - E0 << "; "; cout << "Error in L: " << Momentum(V) - L0 << "\n\n"; t2 = 0; } } x_res_file.close(); y_res_file.close(); return 0; }

99


y 6 5 4 3 2 1 x

8

6

4

2

. 3.2. , = 1, M = 1, m = 1, r0 = (1, 0), v0 = (0, 2).

y

10

8

6

4

2

10

8

6

4

2

x

. 3.3. , = 1, M = 1, m = 1, r0 = (1, 0), v0 = (0, 2).

100


3.7.4. , . . , 0.001 10-12 , , 4- , . ( ). , : (. 3.1), (. 3.2) (. 3.3). ­ : E < 0,E = 0 E > 0. , : - . . ( 3.1 - 1) . 3.4. , , : "" " " , ´ ( r2 = const, , , , , , ). , , : . , . 3.5. , , , , , , , 9 : 15 = 3 : 5, ­ 5 2.5 : 3.5 = 5 : 7. ( 3 )2 = 0.36, ( 7 )3 0.364, 5 ( ; , ). 101


y 1.5

1.0

0.5

2.5

2.0

1.5

1.0

0.5 0.5

0.5

1.0

x

1.0

1.5

. 3.4. : .

y

1.0

0.5

1.5

1.0

0.5

0.5

1.0

x

0.5

1.0

. 3.5. .

102


y 1.5

1.0

0.5

2.5

2.0

1.5

1.0

0.5 0.5

0.5

1.0

x

1.0

1.5

. 3.6. : 0.2. 3.7.5. . 0.001. , ( 10-12 ), . , , , , , 0.2, , . 3.6. , , . 10-2 . . , 1 , , r , r1101 . . 3.7. . , , . . , , , 1 ( ) r2 r 103


y 1.5

1.0

0.5

2.5

2.0

1.5

1.0

0.5 0.5

0.5

1.0

x

1.0

1.5

2.0

. 3.7. ,

r

1.01

1

.

y

2

1

2

1

1

2

x

1

2

. 3.8. ,

r

1.05

1

.

104


( ), (. . 3.8). , , , , . , , . , : . , , , , , . 3.7.6. , . : , . , (, 1) ).

1) , , , : , . , .

105


3.8.
. , : (Tycho Brahe) . , , 2) ­ . , , . , . , , , ­ , . , , , : 1) , , , . , .

2) , , : . 1) , , - , , , , ( ); , .

106


4

g > 0,
, , , . , , , -, . , , , , . , , , . , , (, ), , , , (, ). . Mathematica ( 7.0), , . . 107


4.1. Mathematica
Mathematica , "nb" (notebo ok). , , .. . Plot ( , ; , , ; , ; , ). Plot , ( ), , , {x, a, b} (x ­ , a ­ , b ­ ). , Plot[Sin[x],{x, 0, 10}] x, 0 10. , , ( ) , . , PlotRange , . , PlotRange -> {0, 1} . . ListPlot. : ­ . {3, 4}, ­ { {1, 5.2}, {2, 3.7}, {3, 4.1} }. . 108


, , , nb-, . : SetDirectory[NotebookDirectory[]]; , "x.res" Lx = ReadList["x.res", Number, WordSeparators -> {","}]; Number ­ (), WordSeparators -> {","} ( "x.res" ). Lx { 0., 0.5, 1.0, 1.5, ... }. : Ly = ReadList["y.res", Number, WordSeparators -> {","}]; ­ , Pairs = Table[{Lx[[i]], Ly[[i]]}, {i, 1, Length[Lx]}]; Lx[[i]] ­ i- Lx, Table {Lx[[i]], Ly[[i]]} i, 1 Length[Lx] ­ Lx. G = ListPlot[Pairs, Joined -> True] Joined -> True , . G. , , , eps: Export[NotebookDirectory[] <> "graph.eps", G, ImageSize -> 500] 109


Export ­ ( ), . ( <>) nb- ­ "graph.eps". ImageSize -> 500 . ( , ) . Plot ListPlot, , Plot3D ListPlot3D. , ­ : . . .

4.2. g > 0
. , , : , , ­ . , . , , . , , (. 4.1), , (. 4.2). , ( ). . ( , , ): , ­ . . , 110


"" "" (, ). ­ . , 0, 1. , 2, 3 . . , , , , , . . , r R (R > r), , , XY : x2 + y 2 = R2 . d = ( x2 + y 2 - R)2 + z 2 . z = r2 - ( x2 + y 2 - R)2 XY: z = - r2 - ( x2 + y 2 - R)2 . , Mathematica : R = 2; r = 0.5; l = R + r; Plot3D[{ r2 - r2 - x2 + y 2 - R
2 2

,

x2 + y 2 - R

},{x,-l,l},{y,-l,l},BoxRatios{1,1,0.2}]

, -l < x < l, -l < y < l. BoxRatios ( ) , ( z , x y, ). r2 - ( x2 + y 2 - R)2 (. . 4.3). ( r) x2 + y 2 = R2 . , , r, 0. 111


, XY. , , . , 2 . , (""). , , , , , : (x + a)2 + y 2 = R2 (x - a)2 + y 2 = R2 , a R . , . , , , . . , 2 -((x+a)2 +y2 -R2 ) 3 . , , , : e , . , 2 :

R = 2; a = 2.3; l = 5; m = 3; 2 2 -((x+a)2 +y2 -R2 ) -((x-a)2 +y2 -R2 ) 1 3 3 +e - .1) 2 , Plot3D[{(e 2 2 -((x+a)2 +y2 -R2 ) -((x-a)2 +y2 -R2 ) 1 3 3 +e - .1) 2 }, -(e {x,-l,l},{y,-m,m}, BoxRatios {1.5,1,0.2}] . 4.4. 3: 112


. 4.1. 0: .

R = 2; a = 2.2; b = 1.5; l = 5; m = 3; 2 2 -((x+a)2 +y2 -R2 ) -((x-a)2 +y2 -R2 ) 3 3 +e Plot3D[{(e 2 2 -(x2 +(y-a-b)2 -R2 ) -((x+a)2 +y2 -R2 ) 1 3 3 +e - .1) 2 ,-(e 2 2 -((x-a)2 +y2 -R2 ) -(x2 +(y-a-b)2 -R2 ) 1 3 3 +e +e - .1) 2 }, {x,-l,l},{y,-m,2m},BoxRatios{1.2,1,0.3}] . 4.5.

113


. 4.2. 1: .

. 4.3. , (. ).

114


. 4.4. 2: .

115


. 4.5. 3.

116






M., - , 2009. ­ 120 .

07.02.2009 . 60â90 1/16. 7,5 .. 2 300 . ­ . , . -