7.7 Numerical Methods for Systems

We now discuss the numerical approximation of solutions of systems of differential equations. Our goal is to apply the methods of Sections 2.4 through 2.6 to the initial value problem

x=f(t, x), x(t0)=x0
x'=f(t, x), x(t0)=x0
(1)

for a system of m first-order differential equations. In (1) the independent variable is the scalar t, and

x=(x1, x2, , xm)andf=(f1, f2, , fm)
x=(x1, x2, , xm)andf=(f1, f2, , fm)

are vector-valued functions. If the component functions of ff and their first-order partial derivatives are all continuous in a neighborhood of the point (t0,x0)(t0,x0), then Theorems 3 and 4 of Appendix A guarantee the existence and uniqueness of a solution x=x(t)x=x(t) of (1) on some subinterval [of the t-axis] containing t0t0. With this assurance we can proceed to discuss the numerical approximation of this solution.

Beginning with step size h, we want to approximate the values of x(t)x(t) at the points t1, t2, t3, ,t1, t2, t3, , where tn+1=tn+htn+1=tn+h for n0n0. Suppose that we have already computed the approximations

x1,x2,x3,,xn
x1,x2,x3,,xn

to the actual values

x(t1),x(t2),x(t3),,x(tn)
x(t1),x(t2),x(t3),,x(tn)

of the exact solution of the system in (1). We can then make the step from xnxn to the next approximation xn+1x(tn+1)xn+1x(tn+1) by any one of the methods of Sections 2.4 through 2.6. Essentially all that is required is to write the iterative formula of the selected method in the vector notation of the present discussion.

Euler Methods for Systems

For example, the iterative formula of Euler’s method for systems is

xn+1=xn+hf(t, xn).
xn+1=xn+hf(t, xn).
(2)

To examine the case m=2m=2 of a pair of first-order differential equations, let us write

x=[xy]andf=[fg].
x=[xy]andf=[fg].

Then the initial value problem in (1) is

x=f(t,x,y),x(t0)=x0,y=g(t,x,y),y(t0)=y0,
x'y'==f(t,x,y),g(t,x,y),x(t0)y(t0)==x0,y0,
(3)

and the scalar components of the vector formula in (2) are

xn+1=xn+hf(tn,xn,yn),yn+1=yn+hg(tn,xm,yn).
xn+1yn+1==xnyn++hf(tn,xn,yn),hg(tn,xm,yn).
(4)

Note that each iterative formula in (4) has the form of a single Euler iteration, but with ynyn inserted like a parameter in the first formula (for xn+1xn+1) and with xnxn inserted like a parameter in the second formula (for yn+1yn+1). The generalization to the system in (3) of each of the other methods in Sections 2.4 through 2.6 follows a similar pattern.

The improved Euler method for systems consists at each step of calculating first the predictor

un+1=xn+hf(tn,xn)
un+1=xn+hf(tn,xn)
(5)

and then the corrector

xn+1=xn+h2[f(tn,xn)+f(tn+1,un+1)].
xn+1=xn+h2[f(tn,xn)+f(tn+1,un+1)].
(6)

For the case of the two-dimensional initial value problem in (3), the scalar components of the formulas in (5) and (6) are

un+1=xn+hf(tn,xn,yn),vn+1=yn+hg(tn,xn,yn)
un+1vn+1==xnyn++hf(tn,xn,yn),hg(tn,xn,yn)
(7)

and

xn+1=xn+h2[f(tn,xn,yn)+f(tn+1,un+1,vn+1)],yn+1=yn+h2[g(tn,xn,yn)+g(tn+1,un+1,vn+1)].
xn+1yn+1==xnyn++h2[f(tn,xn,yn)+f(tn+1,un+1,vn+1)],h2[g(tn,xn,yn)+g(tn+1,un+1,vn+1)].
(8)

Example 1

Consider the initial value problem

x=3x2y,x(0)=3;y=5x4y,y(0)=6.
x'y'==3x2y,5x4y,x(0)y(0)==3;6.
(9)

The exact solution of the system in (9) is

x(t)=2e2t+et,y(t)=5e2t+et.
x(t)=2e2t+et,y(t)=5e2t+et.
(10)

Here we have f(x, y)=3x2yf(x, y)=3x2y and g(x, y)=5x4yg(x, y)=5x4y in (3), so the Euler iterative formulas in (4) are

xn+1=xn+h(3xn2yn),yn+1=yn+h(5xn4yn).
xn+1=xn+h(3xn2yn),yn+1=yn+h(5xn4yn).

With step size h=0.1h=0.1 we calculate

x1=3+(0.1)[3.32.6]=2.7,y1=6+(0.1)[5.34.6]=5.1
x1y1==3+(0.1)[3.32.6]=2.7,6+(0.1)[5.34.6]=5.1

and

x2=2.7+(0.1)[3(2.7)2(5.1)]=2.49y2=5.1+(0.1)[5(2.7)4(5.1)]=4.41.
x2y2==2.7+(0.1)[3(2.7)2(5.1)]=2.495.1+(0.1)[5(2.7)4(5.1)]=4.41.

The actual values at t2=0.2t2=0.2 given by (10) are x(0.2)2.562x(0.2)2.562 and y(0.2)4.573y(0.2)4.573.

To compute the improved Euler approximations to x(0.2) and y(0.2) with a single step of size h=0.2h=0.2, we first calculate the predictors

u1=3+(0.2)[3.32.6]=2.4,v1=6+(0.2)[5.34.6]=4.2.
u1v1==3+(0.2)[3.32.6]=2.4,6+(0.2)[5.34.6]=4.2.

Then the corrector formulas in (8) yield

x1=3+(0.1)([3.32.6]+[3(2.4)2(4.2)])=2.58,y1=6+(0.1)([5.34.6]+[5(2.4)4(4.2)])=4.62.
x1y1==3+(0.1)([3.32.6]+[3(2.4)2(4.2)])=2.58,6+(0.1)([5.34.6]+[5(2.4)4(4.2)])=4.62.

As we would expect, a single improved Euler step gives better accuracy than two ordinary Euler steps.

The Runge–Kutta Method and Second-Order Equations

The vector version of the iterative formula for the Runge–Kutta method is

xn+1=xn+h6(k1+2k2+2k3+k4),
xn+1=xn+h6(k1+2k2+2k3+k4),
(11)

where the vectors k1, k2, k3k1, k2, k3, and k4k4 are defined (by analogy with Eqs. (5a)(5d) of Section 2.6) as follows:

k1=f(tn,xn),k2=f(tn+12h,xn+12hk1),k3=f(tn+12h,xn+12hk2),k4=f(tn+h,xn+hk3).
k1k2k3k4====f(tn,xn),f(tn+12h,xn+12hk1),f(tn+12h,xn+12hk2),f(tn+h,xn+hk3).
(12)

To describe in scalar notation the Runge–Kutta method for the two-dimensional initial value problem

x=f(t,x,y),x(t0)=x0,y=g(t,x,y),y(t0)=y0,
x'y'==f(t,x,y),g(t,x,y),x(t0)y(t0)==x0,y0,
(3)

let us write

x=[xy],f=[fg],andki=[FiGi].
x=[xy],f=[fg],andki=[FiGi].

Then the Runge–Kutta iterative formulas for the step from (xn,yn)(xn,yn) to the next approximation (xn+1,yn+1)(x(tn+1), y(tn+1))(xn+1,yn+1)(x(tn+1), y(tn+1)) are

xn+1=xn+h6(F1+2F2+2F3+F4),yn+1=yn+h6(G1+2G2+2G3+G4),
xn+1yn+1==xn+h6(F1+2F2+2F3+F4),yn+h6(G1+2G2+2G3+G4),
(13)

where the values F1, F2, F3F1, F2, F3, and F4F4 of the function f are

F1=f(tn,xn,yn),F2=f(tn+12h,xn+12hF1,yn+12hG1),F3=f(tn+12h,xn+12hF2,yn+12hG2),F4=f(tn+h,xn+hF3,yn+hG3);
F1F2F3F4====f(tn,xn,yn),f(tn+12h,xn+12hF1,yn+12hG1),f(tn+12h,xn+12hF2,yn+12hG2),f(tn+h,xn+hF3,yn+hG3);
(14)

G1, G2, G3,G1, G2, G3, and G4G4 are the similarly defined values of the function g.

Perhaps the most common application of the two-dimensional Runge–Kutta method is to the numerical solution of second-order initial value problems of the form

x=g(t,x,x),x(t0)=x0,x(t0)=y0.
x′′=g(t,x,x'),x(t0)=x0,x'(t0)=y0.
(15)

If we introduce the auxiliary variable y=x,y=x', then the problem in (15) translates into the two-dimensional first-order problem

x=y,x(t0)=x0,y=g(t,x,y),y(t0)=y0.
x'y'==y,g(t,x,y),x(t0)y(t0)==x0,y0.
(16)

This is a problem of the form in (3) with f(t,x,y)=y.f(t,x,y)=y.

If the functions f and g are not too complicated, then it is feasible to carry out manually a reasonable number of steps of the two-dimensional Runge–Kutta method described here. But the first operating electronic computers were constructed (during World War II) specifcally to implement methods similar to the Runge–Kutta method for the numerical computation of trajectories of artillery projectiles. The application material for this section lists TI-Nspire CX CAS and Python versions of Program RK2DIM that can be used with two-dimensional systems.

Example 2

The exact solution of the initial value problem

x=x;x(0)=0,x(0)=1
x''=x;x(0)=0,x'(0)=1
(17)

is x(t)=sint.x(t)=sint. The substitution y=xy=x' translates (17) into the two-dimensional problem

x=y,x(0)=0;y=x,y(0)=1,
x'y'==y,x,x(0)y(0)==0;1,
(18)

which has the form in (3) with f(t,x,y)=yf(t,x,y)=y and g(t,x,y)=x.g(t,x,y)=x. The table in Fig.7.7.1 shows the results produced for 0t50t5 (radians) using Program RK2DIM with step size h=0.05.h=0.05. The values shown for x=sint and y=costx=sint and y=cost are all accurate to five decimal places.

FIGURE 7.7.1.

Runge–Kutta values (with h=0.05h=0.05) for the problem in Eq. (18).

t x=sintx=sint y=costy=cost
0.5 +0.47943+0.47943 +0.87758+0.87758
1.0 +0.84147+0.84147 +0.54030+0.54030
1.5 +0.99749+0.99749 +0.07074+0.07074
2.0 +0.90930+0.90930 0.416150.41615
2.5 +0.59847+0.59847 0.801140.80114
3.0 +0.14112+0.14112 0.989990.98999
3.5 0.350780.35078 0.936460.93646
4.0 0.756800.75680 0.653640.65364
4.5 0.977530.97753 0.210800.21080
5.0 0.958920.95892 +0.28366+0.28366

Example 3

Lunar lander In Example 4 of Section 2.3 we considered a lunar lander that initially is falling freely toward the surface of the moon. Its retrorockets, when fired, provide a deceleration of T=4m/s2.T=4m/s2. We found that a soft touchdown at the lunar surface is achieved by igniting these retrorockets when the lander is at a height of 41,870 meters (just over 26 miles) above the surface and is then descending at the rate of 450 m/s.

Now we want to compute the descent time of the lunar lander. Let the distance x(t) of the lander from the center of the moon be measured in meters and measure time t in seconds. According to the analysis in Section 2.3 (where we used r(t) in stead of x(t)), x(t) satisfes the initial value problem

d2xdt2=TGMx2=44.9044×1012x2,x(0)=R+41870=1,781,870,x(0)=450
d2xdt2x(0)==TGMx2=44.9044×1012x2,R+41870=1,781,870,x'(0)=450
(19)

where G6.6726×1011 N(m/kg)2G6.6726×1011 N(m/kg)2 is the universal gravitational constant and M=7.35×1022 kgM=7.35×1022 kg and R=1.74×106 mR=1.74×106 m are the mass and radius of the moon. We seek the value of t when x(t)=R=1,740,000.x(t)=R=1,740,000..

The problem in (19) is equivalent to the first-order system

dxdt=y,x(0)=1,781,870;dydt=44.9044×10x2,y(0)=450.
dxdtdydt==y,x(0)=1,781,870;44.9044×10x2,y(0)=450.
(20)

The table in Fig. 7.7.2 shows the result of a Runge–Kutta approximation with step size h=1h=1 (the indicated data agreeing with those obtained with step size h=2h=2). Evidently, touchdown on the lunar surface (x=1,740,000)(x=1,740,000) occurs at some time between t=180t=180 and t=190t=190 seconds. The table in Fig. 7.7.3 shows a second Runge–Kutta approximation with t(0)=180, x(0)=1,740,059, y(0)=16.83,t(0)=180, x(0)=1,740,059, y(0)=16.83, and h=0.1.h=0.1. Now it is apparent that the lander’s time of descent to the lunar surface is very close to 187 seconds; that is, 3 min 7 s. (The final velocity terms in these two tables are positive because the lander would begin to ascend if its retrorockets were not turned off at touchdown.)

FIGURE 7.7.2.

The lander’s descent to the lunar surface.

t(s) x(m) v(m/s)
0 1,781,870 450.00450.00
20 1,773,360 401.04401.04
40 1,765,826 352.37352.37
60 1,759,264 303.95303.95
80 1,753,667 255.74255.74
100 1,749,033 207.73207.73
120 1,745,357 159.86159.86
140 1,742,637 112.11112.11
160 1,740,872 64.4564.45
180 1,740,059 16.8316.83
200 1,740,199 30.77

FIGURE 7.7.3.

Focusing on the lunar lander’s soft touchdown.

t(s) x(m) v(m/s)
180 1,740,059 16.8316.83
181 1,740,044 14.4514.45
182 1,740,030 12.0712.07
183 1,740,019 9.699.69
184 1,740,011 7.317.31
185 1,740,005 4.934.93
186 1,740,001 2.552.55
187 1,740,000 0.170.17
188 1,740,001 2.21
189 1,740,004 4.59
190 1,740,010 6.97

Higher-Order Systems

As we saw in Section 7.1, any system of higher-order differential equations can be replaced with an equivalent system of first-order differential equations. For example, consider the system

x=F(t,x,y,x,y),y=G(t,x,y,x,y)
x''y''==F(t,x,y,x',y'),G(t,x,y,x',y')
(21)

of second-order equations. If we substitute

x=x1,y=x2,x=x3=x1,y=x4=x2,
x=x1,y=x2,x'=x3=x'1,y'=x4=x'2,

then we get the equivalent system

x1=x3,x2=x4,x3=F(t,x1,x2,x3,x4),x4=G(t,x1,x2,,x3,x4)
x'1x'2x'3x'4====x3,x4,F(t,x1,x2,x3,x4),G(t,x1,x2,,x3,x4)
(22)

of four first-order equations in the unknown functions x1(t)=x(t), x2(t)=y(t), x3(t), and x4(t).x1(t)=x(t), x2(t)=y(t), x3(t), and x4(t). It would be a routine (if slightly tedious) matter to write a four-dimensional version of program RK2DIM for the purpose of solving such a system. But in a programming language that accommodates vectors, an n-dimensional Runge–Kutta program is scarcely more complicated than a one-dimensional program. For instance, the application material for this section lists the n-dimensional Matlab program rkn that closely resembles the one-dimensional program rk of Fig.2.6.11.

Example 4

Batted baseball Suppose that a batted ball starts at x0=0, y0=0x0=0, y0=0 with initial velocity v0=160 ft/sv0=160 ft/s and with initial angle of inclination θ=30.θ=30. If air resistance is ignored, we find by the elementary methods of Section 1.2 that the baseball travels a [horizontal] distance of 4003 ft4003 ft (approximately 693 ft) in 5 s before striking the ground. Now suppose that in addition to a downward gravitational acceleration (g=32 ft/s2),(g=32 ft/s2), the baseball experiences an acceleration due to air resistance of (0.0025)v2(0.0025)v2 feet per second per second, directed opposite to its instantaneous direction of motion. Determine how far the baseball will travel horizontally under these conditions.

Solution

According to Problem 30 of Section 7.1, the equations of motion of the baseball are

d2xdt2=cvdxdt,d2ydt2=cvdydtg
d2xdt2=cvdxdt,d2ydt2=cvdydtg
(23)

where v=(x)2+(y)2v=(x')2+(y')2 is the speed of the ball, and where c=0.0025c=0.0025 and g=32g=32 in fps units. We convert to a first-order system as in (22) and thereby obtain the system

x1=x3,x2=x4,x3=cx3x23+x24,x4=cx4x23+x24g
x'1x'2x'3x'4====x3,x4,cx3x23+x24,cx4x23+x24g
(24)

of four first-order differential equations with

x1(0)=x2(0)=0,x3(0)=803,x4(0)=80.
x1(0)x3(0)==x2(0)=0,803,x4(0)=80.
(25)

Note that x3(t) and x4(t)x3(t) and x4(t) are simply the x- and y-components of the baseball’s velocity vector, so v=x23+x24.v=x23+x24. We proceed to apply the Runge–Kutta method to investigate the motion of the batted baseball described by the initial value problem in (24) and (25), first taking c=0c=0 to ignore air resistance and then using c=0.0025c=0.0025 to take air resistance into account.

Without Air Resistance: Figure 7.7.4 shows the numerical results obtained when a Runge–Kutta program such as rkn is applied with step size h=0.1h=0.1 and with c=0c=0 (no air resistance). For convenience in interpreting the results, the printed output at each selected step consists of the horizontal and vertical coordinates x and y of the baseball, its velocity v, and the angle of inclination αα of its velocity vector (in degrees measured from the horizontal). These results agree with the exact solution when c=0.c=0. The ball travels a horizontal distance of 4003692.82 ft4003692.82 ft in exactly 5 s, having reached a maximum height of 100 ft after 2.5 s. Note also that the ball strikes the ground at the same angle and with the same speed as its initial angle and speed.

FIGURE 7.7.4.

The batted baseball with no air resistance (c=0)(c=0).

t x y v αα
0.0 0.00 0.00 160.00 +30+30
0.5 69.28 36.00 152.63 +25+25
1.0 138.56 64.00 146.64 +19+19
1.5 207.85 84.00 142.21 +13+13
2.0 277.13 96.00 139.48 +7+7
2.5 346.41 100.00 138.56 +0+0
3.0 415.69 96.00 139.48 77
3.5 484.97 84.00 142.21 1313
4.0 554.26 64.00 146.64 1919
4.5 623.54 36.00 152.63 2525
5.0 692.82 0.00 160.00 3030

FIGURE 7.7.5.

The batted baseball with air resistance (c=0.0025)(c=0.0025).

t x y v αα
0.0 0.00 0.00 160.00 +30+30
0.5 63.25 32.74 127.18 +24+24
1.0 117.11 53.20 104.86 +17+17
1.5 164.32 63.60 89.72 +8+8
2.0 206.48 65.30 80.17 33
2.5 244.61 59.22 75.22 1515
3.0 279.29 46.05 73.99 2727
3.5 310.91 26.41 75.47 3737
4.0 339.67 0.91 78.66 4646

FIGURE 7.7.6.

The batted ball’s apex and its impact with the ground.

t x y v αα  
1.5 164.32 63.60 89.72 +8+8  
1.6 173.11 64.60 87.40 +5+5  
1.7 181.72 65.26 85.29 +3+3  
1.8 190.15 65.60 83.39 +1+1 ← Apex
1.9 198.40 65.61 81.68 11
2.0 206.48 65.30 80.17 33  
 
3.8 328.50 11.77 77.24 4242  
3.9 334.14 6.45 77.93 4444  
4.0 339.67 0.91 78.66 4646 ← Impact
4.1 345.10 4.844.84 79.43 4747
4.2 350.41 10.7910.79 80.22 4949  

With Air Resistance: Figure 7.7.5 shows the results obtained with the fairly realistic value of c=0.0025c=0.0025 for the air resistance for a batted baseball. To within a hundredth of a foot in either direction, the same results are obtained with step sizes h=0.05h=0.05 and h=0.025.h=0.025. We now see that with air resistance the ball travels a distance well under 400 ft in just over 4 s. The more refined data in Fig.7.7.6 show that the ball travels horizontally only about 340 ft and that its maximum height is only about 66 ft. As illustrated in Fig.7.7.7, air resistance has converted a massive home run into a routine fly ball (if hit straightaway to center field). Note also that when the ball strikes the ground, it has slightly under half its initial speed (only about 79 ft/s) and is falling at a steeper angle (about 4646). Every baseball fan has observed empirically these aspects of the trajectory of a fly ball.

FIGURE 7.7.7.

An “easy out” or a home run?

Variable Step Size Methods

The Runge–Kutta method for a large system requires an appreciable amount of computational labor, even when a computer is employed. Therefore, just as the step size h should not be so large that the resulting error in the solution is unacceptable, h ought not to be so small that too many steps are needed, hence requiring an unacceptable amount of computation. Thus the practical numerical solution of differential equations involves a tradeoff between accuracy and efficiency.

To facilitate this tradeoff, modern variable step size methods vary the step size h as the solution process proceeds. Large steps are taken in regions where the dependent variables are changing slowly; smaller steps are taken when these variables are changing rapidly, in order to prevent large errors.

An adaptable or variable step size Runge–Kutta method employs both a pre-assigned minimum error tolerance MinTol and a maximum error tolerance MaxTol to attempt to ensure that the error made in the typical step from xnto xn+1xnto xn+1 is neither too large (and hence inaccurate) nor too small (and hence in efficient). A fairly simple scheme for doing this may be outlined as follows:

  • Having reached xnxn with a Runge–Kutta step of length tntn1=h, let x(1)tntn1=h, let x(1) denote the result of a further Runge–Kutta step of length h and let x(2)x(2) denote the result of two successive Runge–Kutta steps each of length h/2.

  • On the grounds that x(2)x(2) should be a more accurate approximation to x(tn+h)x(tn+h) than is x(1),x(1), take

    Err=|x(1)x(2)|
    Err=|x(1)x(2)|

    as an estimate of the error in x(1).x(1).

  • If MinTolErrMaxTol, then let xn+1=x(1), tn+1=tn+h,MinTolErrMaxTol, then let xn+1=x(1), tn+1=tn+h, and proceed to the next step.

  • If Err<MaxTol,Err<MaxTol, then the error is too small! Hence let xn+1=x(1),tn+1=tn+h,xn+1=x(1),tn+1=tn+h, but double the step size to 2h before making the next step.

  • If Err>MaxTol,Err>MaxTol, then the error is too large. Hence reject x(1)x(1) and start afresh at xnxn with the halved step size h/2.

The detailed implementation of such a scheme can be complicated. For a much more complete but readable discussion of adaptive Runge–Kutta methods, see Section 17.2 of William H. Press et al., Numerical Recipes: The Art of Scientific Computing (Cambridge: Cambridge: University Press, 2007).

Several widely available scientific computing packages (such as Maple, Mathematica, and Matlab) include sophisticated variable step size programs that will accommodate an essentially arbitrary number of simultaneous differential equations. Such a general-purpose program might be used, for example, to model numerically the major components of the solar system:the sun and the nine (known) major planets. If mimi denotes the mass and ri=(xi, yi, zi)ri=(xi, yi, zi) denotes the position vector of the ith one of these 10 bodies, then—by Newton’s laws—the equation of motion of mimi is

mir=jiGmimj(rij)3(rjri),
mir''=jiGmimj(rij)3(rjri),
(26)

where rij=|rjri|rij=|rjri| denotes the distance between mi and mj.mi and mj. For each i=1, 2, ,i=1, 2, , 10, the summation in Eq. (26) is over all values of jiji from 1 to 10. The 10 vector equations in (26) constitute a system of 30 second-order scalar equations, and the equivalent first-order system consists of 60 differential equations in the coordinates and velocity components of the 10 major bodies in the solar system. Mathematical models that involve this many (or more) differential equations—and that require sophisticated software and hardware for their numerical analysis—are quite common in science, engineering, and applied technology.

Earth–Moon Satellite Orbits

For an example of a program whose efficient solution requires adaptive step size methods, we consider an Apollo satellite in orbit about the Earth E and Moon M. Figure 7.7.8 shows an x1x2x1x2-coordinate system whose origin lies at the center of mass of the Earth and the Moon and which rotates at the rate of one revolution per “moon month”of approximately τ=27.32τ=27.32 days, so the Earth and Moon remain fixed in their positions on the x1x1-axis. If we take as unit distance the distance (about 384,000 kilometers, assumed constant) between the Earth and Moon centers, then their coordinates are E(μ, 0)E(μ, 0) and M(1μ,0),M(1μ,0), where μ=mM/(mE+mM)μ=mM/(mE+mM) in terms of the Earth mass mEmE and Moon mass mMmM. If we take the total mass mE+mMmE+mM as the unit of mass and τ/(2π)4.35τ/(2π)4.35 days as the unit of time, then the gravitational constant is G=1G=1 in Eq. (26), and the equations of motion of the satellite position S(x1, x2)S(x1, x2) are

x1=x1+2x2(1μ)(x1+μ)(rE)3μ(x11+μ)(rM)3,x2=x22x1(1μ)x2(rE)3μx2(rM)3,
x′′1x′′2==x1+2x'2(1μ)(x1+μ)(rE)3μ(x11+μ)(rM)3,x22x'1(1μ)x2(rE)3μx2(rM)3,
(27)

FIGURE 7.7.8.

The Earth–Moon center-of-mass coordinate system.

where rErE and rMrM denote the satellite’s distance to the Earth and Moon (indicated in Fig. 7.7.8). The initial two terms on the right-hand side of each equation result from the rotation of the coordinate system. In the system of units described here, the lunar mass is approximately mM=0:012277471.mM=0:012277471. The second-order system in (27) can be converted to an equivalent first-order system (of four differential equations) by substituting

x1=x3,x2=x4,so thatx1=x3,  x2=x4.
x'1=x3,x'2=x4,so thatx′′1=x'3,  x′′2=x'4.

Suppose that the satellite initially is in a clockwise circular orbit of radius about 2400 kilometers about the Moon. At its farthest point from the Earth (x1=0.994)(x1=0.994) it is “launched” into Earth–Moon orbit with initial velocity v0.v0. The corresponding initial conditions are

x1(0)=0.994,x2(0)=0,x3(0)=0,x4(0)=v0.
x1(0)=0.994,x2(0)=0,x3(0)=0,x4(0)=v0.

An adaptive step size method (ode45) in the Matlab software system was used to solve numerically the system in (27). The orbits in Figs. 7.7.9 and 7.7.10 were obtained with

v0=2.031732629557andv0=2.001585106379,
v0=2.031732629557andv0=2.001585106379,

FIGURE 7.7.9.

Apollo Moon–Earth bus orbit with insertion velocity v0=7476 km/hv0=7476 km/h.

FIGURE 7.7.10.

Apollo Moon–Earth bus orbit with insertion velocity v0=7365 km/hv0=7365 km/h.

respectively. [In the system of units used here, the unit of velocity is approximately 3680 km/h.] In each case a closed but multilooped periodic trajectory about the Earth and the Moon—a so-called bus orbit—is obtained, but a relatively small change in the initial velocity changes the number of loops! For more information, see NASA Contractor Report CR-61139, “Study of the Methods for the Numerical Solution of Ordinary Differential Equations,” prepared by O. B. Francis, Jr. et al. for the NASA–George C. Marshall Space Flight Center, June 7, 1966.

So-called Moon–Earth “bus orbits” are periodic—that is, are closed trajectories traversed repeatedly by the satellite—only in a rotating x1x2x1x2-coordinate system as discussed above. The satellite of Fig. 7.7.9 traverses its closed orbit and returns to rendezvous with the Moon about 48.4 days after its insertion into orbit. Figures 7.7.11 and 7.7.12 illustrate the motion of the same satellite—but in an ordinary nonrotating xy-coordinate system centered at the Earth, in which the Moon encircles the Earth counterclockwise in a near-circular orbit, completing one revolution in about 27.3 days. The Moon starts at point S, and after 48.4 days it has completed a bit over 1.75 revolutions about the Earth and reaches the point R at which its rendezvous with the satellite occurs. Figure 7.7.11 shows the positions of Moon and satellite a day and a half after the satellite’s insertion into its orbit, each traveling in a generally counterclockwise direction around the Earth. Figure 7.7.12 shows their positions a day and a half before their rendezvous at point R, the satellite meanwhile having encircled the Earth about 2.5 times in an orbit that (in the indicated xy-coordinate system) appears to resemble a slowly varying ellipse.

FIGURE 7.7.11.

The moon and satellite in a nonrotating coordinate system, 1.5 days after orbital insertion of the satellite at starting point S.

FIGURE 7.7.12.

The moon and satellite in a nonrotating coordinate system, 1.5 days before their rendezvous at point R.

7.7 Problems

A hand-held calculator will suffice for Problems 1 through 8. In each problem an initial value problem and its exact solution are given. Approximate the values of x(0.2) and y(0.2) in three ways: (a) by the Euler method with two steps of size h=0.1h=0.1; (b) by the improved Euler method with a single step of size h=0.2h=0.2; and (c) by the Runge–Kutta method with a single step of size h=0.2.h=0.2. Compare the approximate values with the actual values x(0.2) and y(0.2).

  1. x=x+2y, x(0)=0,y=2x+y, y(0)=2;x(t)=e3tet, y(t)=e3t+etx'=x+2y, x(0)=0,y'=2x+y, y(0)=2;x(t)=e3tet, y(t)=e3t+et

     

  2. x=2x+3y,x(0)=1,y=2x+y, y(0)=1;x(t)=et, y(t)=etx'=2x+3y,x(0)=1,y'=2x+y, y(0)=1;x(t)=et, y(t)=et

     

  3. x=3x+4y, x(0)=1,y=3x+2y,y(0)=1;x(t)=17(8e6tet), y(t)=17(6e6t+et)x'=3x+4y, x(0)=1,y'=3x+2y,y(0)=1;x(t)=17(8e6tet), y(t)=17(6e6t+et)

     

  4. x=9x+5y, x(0)=1,y=6x2y, y(0)=0;x(t)=5e3t+6e4t, y(t)=6e3t6e4tx'=9x+5y, x(0)=1,y'=6x2y, y(0)=0;x(t)=5e3t+6e4t, y(t)=6e3t6e4t

     

  5. x=2x5y, x(0)=2,y=4x2y, y(0)=3;x(t)=2cos4t114 sin 4t, y(t)=3 cos 4t+12 sin 4tx'=2x5y, x(0)=2,y'=4x2y, y(0)=3;x(t)=2cos4t114 sin 4t, y(t)=3 cos 4t+12 sin 4t

     

  6. x=x2y, x(0)=0,y=2x+y, y(0)=4;x(t)=4et sin 2t, y(t)=4et cos 2tx'=x2y, x(0)=0,y'=2x+y, y(0)=4;x(t)=4et sin 2t, y(t)=4et cos 2t

     

  7. x=3xy, x(0)=2,y=x+y, y(0)=1;x(t)=(t+2)e2t, y(t)=(t+1)e2tx'=3xy, x(0)=2,y'=x+y, y(0)=1;x(t)=(t+2)e2t, y(t)=(t+1)e2t

     

  8. x=5x9y, x(0)=0,y=2xy, y(0)=1;x(t)=3e2t sin 3t, y(t)=e2t(sin 3tcos 3t)x'=5x9y, x(0)=0,y'=2xy, y(0)=1;x(t)=3e2t sin 3t, y(t)=e2t(sin 3tcos 3t)

A computer will be required for the remaining problems in this section. In Problems 9 through 12, an initial value problem and its exact solution are given. In each of these four problems, use the Runge–Kutta method with step sizes h=0.1h=0.1 and h=0.05h=0.05 to approximate to five decimal places the values x(1) and y(1) Compare the approximations with the actual values.

  1. x=2xy,x(0)=1,y=x+2y,y(0)=0;x(t)=e2t cos t,y(t)=e2t sin tx'=2xy,x(0)=1,y'=x+2y,y(0)=0;x(t)=e2t cos t,y(t)=e2t sin t

     

  2. x=x+2y,x(0)=0,y=x+et,y(0)=0;x(t)=19(2e2t2et+6tet),y(t)=19(e2tet+6tet)x'=x+2y,x(0)=0,y'=x+et,y(0)=0;x(t)=19(2e2t2et+6tet),y(t)=19(e2tet+6tet)

     

  3. x=x+y(1+t3)et,x(0)=0,y=xy(t3t2)et,y(0)=1;x(t)=et(sin tt),y(t)=et(cos t+t3)x'=x+y(1+t3)et,x(0)=0,y'=xy(t3t2)et,y(0)=1;x(t)=et(sin tt),y(t)=et(cos t+t3)

     

  4. x+x=sin t,x(0)=0;x(t)=12(sin tt cos t)x′′+x=sin t,x(0)=0;x(t)=12(sin tt cos t)

     

  5. Crossbow bolt Suppose that a crossbow bolt is shot straight upward with initial velocity 288 ft/s. If its deceleration due to air resistance is (0.04)v, then its height x(t) satisfies the initial value problem

    x=32(0.04)x;x(0)=0,x(0)=288.
    x′′=32(0.04)x';x(0)=0,x'(0)=288.

    Find the maximum height that the bolt attains and the time required for it to reach this height.

  6. Repeat Problem 13, but assume instead that the deceleration of the bolt due to air resistance is (0.0002)v2.(0.0002)v2.

     

  7. Height of projectile Suppose that a projectile is fired straight upward with initial velocity v0 from the surface of the earth. If air resistance is not a factor, then its height x(t) at time t satisfies the initial value problem

    d2xdt2=gR2(x+R)2;x(0)=0,x(0)=v0.
    d2xdt2=gR2(x+R)2;x(0)=0,x'(0)=v0.

    Use the values g=32.15 ft/s2  0.006089 mi/s2 for the gravitational acceleration of the earth at its surface and R=3960 mi as the radius of the earth. If v0=1 mi/s, find the maximum height attained by the projectile and its time of ascent to this height.

Batted Baseball

Problems 16 through 18 deal with the batted baseball of Example 4, having initial velocity 160 ft/s and air resistance coefficient c=0.0025.

  1. Find the range—the horizontal distance the ball travels before it hits the ground—and its total time of flight with initial inclination angles 40, 45, and 50.

     

  2. Find (to the nearest degree) the initial inclination that maximizes the range. If there were no air resistance it would be exactly 45, but your answer should be less than 45.

     

  3. Find (to the nearest half degree) the initial inclination angle greater than 45 for which the range is 300 ft.

  4. Home run Home run Find the initial velocity of a baseball hit by Babe Ruth (with c=0.0025 and initial inclination 40) if it hit the bleachers at a point 50 ft high and 500 horizontal feet from home plate.

  5. Crossbow bolt Crossbow bolt Consider the crossbow bolt of Problem 14, fired with the same initial velocity of 288 ft/s and with the air resistance deceleration (0.0002)v2 directed opposite its direction of motion. Suppose that this bolt is fired from ground level at an initial angle of 45. Find how high vertically and how far horizontally it goes, and how long it remains in the air.

  6. Artillery projectile Artillery projectile Suppose that an artillery projectile is fired from ground level with initial velocity 3000 ft/s and initial inclination angle 40. Assume that its air resistance deceleration is (0.0001)v2. (a) What is the range of the projectile and what is its total time of flight? What is its speed at impact with the ground? (b) What is the maximum altitude of the projectile, and when is that altitude attained? (c) You will find that the projectile is still losing speed at the apex of its trajectory. What is the minimum speed that it attains during its descent?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.109.5