The Computable Differential Equation Lecture ... - Bruce E. Shapiro

The Computable Differential Equation Lecture ... - Bruce E. Shapiro The Computable Differential Equation Lecture ... - Bruce E. Shapiro

bruce.shapiro.com
from bruce.shapiro.com More from this publisher
21.04.2015 Views

164 CHAPTER 8. BOUNDARY VALUE PROBLEMS where A(t) = f y (t, y k (t)) and For the boundary condition we apply the chain rule where If we define then Writing y = y k+1 gives q(t) = f(t, y k (t)) − A(t)y k (t) (8.84) 0 = g + g u (y k (a), y k (b))∆y(a) + g v (y k (a), y k (b))∆y(b) (8.85) = g + B k a(y k+1 (a) − y k (a)) + B k b (yk+1 (b) − y k (b)) (8.86) B k a = ∂g ∂u (yk (a), y k (b)); B k b = ∂g ∂v (yk (a), y k (b)) (8.87) d = −g(y k (a), y k (b)) + B 0 y k (a) + B b y k (b) (8.88) B a y k+1 (a) + B b y k+1 (b) = d (8.89) y ′ = A(t)y + q(t) (8.90) B a y(a) + B b y(b) = d (8.91) Example 8.4. Calculate A(t) and q(t) for the linear example 8.1, where y ′ = d ( ) ( ) u v = dt v u/t 2 − v/t Solution. Since B a = ( 1 0 0 0 ( f(t, u, v) = ) ( 0 0 ; B b = 1 0 v u/t 2 − v/t the Jacobian is given by A(t) = df dy = ∂(f ( ) 1, f 2 ) ∂(u, v) = ∂f1 /∂u ∂f 1 /∂v = ∂f 2 /∂u ∂f 2 /∂v ) ) ( 0 1 1/t 2 −1/t ) (8.92) (8.93) (8.94) (8.95) where the f 1 and f 2 denote the first and second vector components of f. Similarly, as expected. q(t) = f k − Ay k (8.96) ( v = k ) ( ) ( ) 0 1 u k u k /t 2 − v k − /t 1/t 2 −1/t v k (8.97) ( ) 0 = (8.98) 0 Math 582B, Spring 2007 California State University Northridge c○2007, B.E.Shapiro Last revised: May 23, 2007

CHAPTER 8. BOUNDARY VALUE PROBLEMS 165 For equation 8.90, we have f(t, y) = A(t)Y + q, so that the midpoint method gives ( y n − y n−1 = f t h n−1/2 , 1 ) 2 (y n + y n−1 ) (8.99) = A ( t n−1/2 ) 1 2 (y n + y n−1 ) + q(t n−1/2 ) (8.100) B a y 0 + B b y N = d (8.101) which we can write as the sparse system (where each element of the matrix is really a matrix) where ⎛ ⎞ ⎛ S 1 R 1 0 . . . 0 . 0 S 2 R .. 2 . . ⎜ . .. . .. . .. 0 ⎟ ⎜ ⎝ 0 . . . 0 S N R N ⎠ ⎝ B a 0 . . . 0 B b y 0 y 1 . y N−1 B a ⎞ ⎛ = ⎟ ⎜ ⎠ ⎝ q(t 1/2 ) q(t 3/2 ) . q(t N−1/2 ) d ⎞ ⎟ ⎠ (8.102) S n = − 1 h I − 1 2 A(t n−1/2) (8.103) R n = 1 h I − 1 2 A(t n−1/2) (8.104) The quasilinearization algorithm using the midpoint method is summarized in algorithm 9.2. This method can be used for nonlinear problems as well as linear problems because we have quasilinearized the system and then used a linear approximation at each iteration. c○2007, B.E.Shapiro Last revised: May 23, 2007 Math 582B, Spring 2007 California State University Northridge

164 CHAPTER 8. BOUNDARY VALUE PROBLEMS<br />

where A(t) = f y (t, y k (t)) and<br />

For the boundary condition we apply the chain rule<br />

where<br />

If we define<br />

then<br />

Writing y = y k+1 gives<br />

q(t) = f(t, y k (t)) − A(t)y k (t) (8.84)<br />

0 = g + g u (y k (a), y k (b))∆y(a) + g v (y k (a), y k (b))∆y(b) (8.85)<br />

= g + B k a(y k+1 (a) − y k (a)) + B k b (yk+1 (b) − y k (b)) (8.86)<br />

B k a = ∂g<br />

∂u (yk (a), y k (b)); B k b = ∂g<br />

∂v (yk (a), y k (b)) (8.87)<br />

d = −g(y k (a), y k (b)) + B 0 y k (a) + B b y k (b) (8.88)<br />

B a y k+1 (a) + B b y k+1 (b) = d (8.89)<br />

y ′ = A(t)y + q(t) (8.90)<br />

B a y(a) + B b y(b) = d (8.91)<br />

Example 8.4. Calculate A(t) and q(t) for the linear example 8.1, where<br />

y ′ = d ( ) (<br />

)<br />

u v<br />

=<br />

dt v u/t 2 − v/t<br />

Solution. Since<br />

B a =<br />

( 1 0<br />

0 0<br />

(<br />

f(t, u, v) =<br />

) ( 0 0<br />

; B b =<br />

1 0<br />

v<br />

u/t 2 − v/t<br />

the Jacobian is given by<br />

A(t) = df<br />

dy = ∂(f ( )<br />

1, f 2 )<br />

∂(u, v) = ∂f1 /∂u ∂f 1 /∂v<br />

=<br />

∂f 2 /∂u ∂f 2 /∂v<br />

)<br />

)<br />

( 0 1<br />

1/t 2 −1/t<br />

)<br />

(8.92)<br />

(8.93)<br />

(8.94)<br />

(8.95)<br />

where the f 1 and f 2 denote the first and second vector components of f. Similarly,<br />

as expected.<br />

q(t) = f k − Ay k (8.96)<br />

(<br />

v<br />

=<br />

k ) ( ) ( )<br />

0 1 u<br />

k<br />

u k /t 2 − v k −<br />

/t 1/t 2 −1/t v k (8.97)<br />

( ) 0<br />

=<br />

(8.98)<br />

0<br />

Math 582B, Spring 2007<br />

California State University Northridge<br />

c○2007, B.E.<strong>Shapiro</strong><br />

Last revised: May 23, 2007

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!