SYSTEMS OF ODES Consider the pendulum shown below. Assume the rod is of neglible mass, that the pendulum is of mass m, and that the rod is of length `. Assume the pendulum moves in the plane shown, and assume there is no friction in the motion about its pivot point. Let (x) denote the position of the pendulum about the vertical line thru the pivot, with measured in radians and x measured in units of time. Then Newton's second law implies m`d dx = mg sin ( (x))
Introduce Y 1 (x) = (x) and Y (x) = 0 (x). The function Y (x) is called the angular velocity. We can now write Y 0 1 (x) = Y (x); Y 1 (0) = (0) Y 0 (x) = g` sin (Y 1(x)) ; Y (0) = 0 (0) This is a simultaneous system of two dierential equations in two unknowns. We often write this in vector form. Introduce " # Y1 (x) Y(x) = Y (x) Then Y 0 Y (x) (x) = 4 g ` sin (Y 1(x)) " # Y1 (0) Y(0) = Y 0 = = Y (0) 5 " (0) 0 (0) #
Introduce z f (x; z) = 4 g ` sin (z 5 ; z = 1) Then our dierential equation problem Y 0 Y (x) (x) = 4 g ` sin (Y 1(x)) " # Y1 (0) Y(0) = Y 0 = = Y (0) can be written in the familiar form 5 " z1 z " (0) 0 (0) # # Y 0 (x) = f (x; Y(x)) ; Y(0) = Y 0 (1) We can convert any higher order dierential equation into a system of rst order dierential equations, and we can write them in the vector form (1).
Lotka-Volterra predator-prey model. Y1 0 = AY 1[1 BY ]; Y 1 (0) = Y 1;0 Y 0 = CY () [DY 1 1]; Y (0) = Y ;0 with A; B; C; D > 0. x denotes time, Y 1 (x) is the number of prey (e.g., rabbits) at time x, and Y (x) the number of predators (e.g., foxes). If there is only a single type of predator and a single type of prey, then this model is often a good approximation of reality. Again write and dene f (x; z) = Y(x) = " Y1 (x) Y (x) " Az1 [1 Bz ] Cz [Dz 1 1] # # ; z = " z1 although there is no explicit dependence on x. Then system () can be written as z Y 0 (x) = f (x; Y(x)) ; Y(0) = Y 0 #
GENERAL SYSTEMS OF ODES An initial value problem for a system of m dierential equations has the form Y 0 1 (x) = f 1(x; Y 1 (x); : : : ; Y m (x)); Y 1 (x 0 ) = Y 1;0.. Ym(x) 0 = f m (x; Y 1 (x); : : : ; Y m (x)); Y m (x 0 ) = Y m;0 () Introduce Y(x) = f(x; z) = 6 4 6 4 Y 1 (x). Y m (x) Then () can be written as 7 5 ; Y 0 = f 1 (x; z 1 ; : : : ; z m ). f m (x; z 1 ; : : : ; z m ) 6 4 Y 1;0. Y m;0 Y 0 (x) = f (x; Y(x)) ; Y(0) = Y 0 7 5 7 5
LINEAR SYSTEMS Of special interest are systems of the form Y 0 (x) = AY(x) + G(x); Y(0) = Y 0 (4) with A a square matrix of order m and G(x) a column vector of length m with functions G i (x) as components. Using the notation introduced for writing systems, f(x; z) = Az + G(x); z R m This equation is the analogue for studying systems of ODEs that the model equation y 0 = y + g(x) is for studying a single dierential equation.
Consider EULER'S METHOD FOR SYSTEMS Y 0 (x) = f (x; Y(x)) ; Y(0) = Y 0 to be a systems of two equations Y1 0(x) = f 1(x; Y 1 (x); Y (x)); Y 1 (0) = Y 1;0 Y 0(x) = f (5) (x; Y 1 (x); Y (x)); Y (0) = Y ;0 Denote its solution be [Y 1 (x); Y (x)]. Following the earlier derivations for Euler's method, we can use Taylor's theorem to obtain Y 1 (x n+1 ) = Y 1 (x n ) + hf 1 (x n ; Y 1 (x n ); Y (x n )) + h Y 00 1 ( n) (6) Y (x n+1 ) = Y (x n ) + hf (x n ; Y 1 (x n ); Y (x n )) + h Y 00 ( n) Dropping the remainder terms, we obtain Euler's method for problem (5), y 1;n+1 = y 1;n + hf 1 (x n ; y 1;n ; y ;n ); y 1;0 = Y 1;0 y ;n+1 = y ;n + hf (x n ; y 1;n ; y ;n ); y ;0 = Y ;0 for n = 0; 1; ; : : :
ERROR ANALYSIS If Y 1 (x), Y (x) are twice continuously dierentiable, and if the functions f 1 (x; z 1 ; z ) and f (x; z 1 ; z ) are suciently dierentiable, then it can be shown that max Y 1 (x n ) y 1;n ch x 0 xb (7) Y (x n ) y ;n ch max x 0 xb for a suitable choice of c 0. The theory depends on generalizations of the proof used with Euler's method for a single equation. One needs to assume that there is a constant K > 0 such that kf (x; z) f (x; w)k 1 K kz wk 1 (8) for x 0 x b, z; w R. Recall the denition of the norm kk 1 from Chapter 6.
The role of @f(x; z)=@z in the single variable theory is replaced by the Jacobian matrix F(x; z) = 6 4 It is possible to show that @f 1 (x; z 1 ; z ) @f 1 (x; z 1 ; z ) @z 1 @f (x; z 1 ; z ) @z @f (x; z 1 ; z ) @z 1 @z K = is suitable for showing (8). max x 0 xb zr kf(x; z)k 1 7 5 (9) All of this work generalizes to problems of any order m. Then we require kf (x; z) f (x; w)k 1 K kz wk 1 (10) with x 0 x b, z; w R m. often obtained using K = max x 0 xb zr m kf(x; z)k 1 The choice of K is where F(x; z) is the m m generalization of (9).
The Euler method in all cases can be written in the dimensionless form with y 0 = Y 0. y n+1 = y n + hf(x n ; y n ); n 0 It can be shown that if (10) is satised, and if Y(x) is twice-continuously dierentiable on [x 0 ; b], then max ky(x n) y n k 1 ch (11) x 0 xb for some c 0 and for all small values of h. In addition, we can show there is a vector function D(x) for which Y(x) y h (x) = D(x)h + O(h ); x 0 x n b for x = x 0 ; x 1 ; : : : ; b. Here y h (x) shows the dependence of the solution on h, and y h (x) = y n for x = x 0 + nh. This justies the use of Richardson extrapolation, leading to Y(x) y h (x) = y h (x) y h (x) + O(h )
NUMERICAL EXAMPLE. Consider solving the initial value problem Y 000 + Y 00 + Y 0 + Y = 4 sin(x); Y (0) = Y 0 (0) = 1; Y 00 (0) = 1 Reformulate it as (1) Y1 0 = Y Y 1 (0) = 1 Y 0 = Y Y (0) = 1 Y 0 1 Y Y 4 sin(x); Y (0) = 1 (1) The solution of (1) is Y (x) = cos(x) + sin(x), and the solution of (1) can be generated from it using Y 1 (x) = Y (x).
The results for Y 1 (x) = sin(x)+cos(x) are given in the following table, for stepsizes h = 0:1 and h = 0:05. The Richardson error estimate is quite accurate. x y(x) y(x) y h (x) y(x) y h (x) Ratio 0:4915 8:78E 4:5E :1 4 1:41045 1:9E 1 6:86E :0 6 0:68075 5:19E :49E :1 8 0:8486 1:56E 1 7:56E :1 10 1:809 8:9E 4:14E :0 x y(x) y(x) y h (x) y h (x) y h (x) 0:4915 4:5E 4:5E 4 1:41045 6:86E 7:05E 6 0:68075 :49E :70E 8 0:8486 7:56E 7:99E 10 1:809 4:14E 4:5E
OTHER METHODS Other numerical methods apply to systems in the same straightforward manner. by using the vector form Y 0 (x) = f (x; Y(x)) ; Y(0) = Y 0 (14) for a system, there is no apparent change in the numerical method. For example, the following Runge- Kutta method for solving a single dierential equation, y n+1 = y n + h [f(x n; y n )+f(x n+1 ; y n +hf(x n ; y n ))]; n 0, generalizes as follows for solving (14): y n+1 = y n + h [f(x n; y n )+f(x n+1 ; y n +hf(x n ; y n ))]; n 0. This can then be decomposed into components if needed. For a system of order, we have y j;n+1 = y j;n + h h fj (x n ; y 1;n ; y ;n ) for n 0 and j = 1;. +f j xn+1 ; y 1;n + hf 1 (x n ; y 1;n ; y ;n ); y ;n + hf (x n; y 1;n ; y ;n ) i