13.07.2015 Views

BVP of ODE

BVP of ODE

BVP of ODE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 1Boundary-Value Problems for OrdinaryDifferential EquationsNTNUTsung-Min HwangDecember 20, 2003Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21 – Mathematical Theories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 – Finite Difference Method For Linear Problems . . . . . . . . . . . . . . . . . 152.1 – The Finite Difference Formulation . . . . . . . . . . . . . . . . . . . . . . 152.2 – Convergence Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 – Shooting Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 3The two-point boundary-value problems (<strong>BVP</strong>) considered in this chapter involve asecond-order differential equation together with boundary condition in the following form:⎧⎨y ′′ = f(x, y, y ′ )⎩y(a) = α, y(b) = β(1)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 3The two-point boundary-value problems (<strong>BVP</strong>) considered in this chapter involve asecond-order differential equation together with boundary condition in the following form:⎧⎨y ′′ = f(x, y, y ′ )⎩y(a) = α, y(b) = β(1)The numerical procedures for finding approximate solutions to the initial-value problems cannot be adapted to the solution <strong>of</strong> this problem since the specification <strong>of</strong> conditions involvetwo different points, x = a and x = b.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 3The two-point boundary-value problems (<strong>BVP</strong>) considered in this chapter involve asecond-order differential equation together with boundary condition in the following form:⎧⎨y ′′ = f(x, y, y ′ )⎩y(a) = α, y(b) = β(1)The numerical procedures for finding approximate solutions to the initial-value problems cannot be adapted to the solution <strong>of</strong> this problem since the specification <strong>of</strong> conditions involvetwo different points, x = a and x = b. New techniques are introduced in this chapter forhandling problems (1) in which the conditions imposed are <strong>of</strong> a boundary-value rather thanan initial-value type.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 41 – Mathematical TheoriesBefore considering numerical methods, a few mathematical theories about the two-pointboundary-value problem (1), such as the existence and uniqueness <strong>of</strong> solution, shall bediscussed in this section.Theorem 1 Suppose that f in (1) is continuous on the setand that ∂f∂y1.D = {(x, y, y ′ )|a ≤ x ≤ b, −∞ < y < ∞, −∞ < y ′ < ∞} ,∂fand are also continuous on D. If∂y′∂f∂y (x, y, y′ ) > 0 for all (x, y, y ′ ) ∈ D, and∂f∣∂y ′ (x, y, y′ )∣ ≤ M , ∀ (x, y, y′ ) ∈ D,2. a constant M exists, withthen (1) has a unique solution.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 5When the function f(x, y, y ′ ) has the special formf(x, y, y ′ ) = p(x)y ′ + q(x)y + r(x),the differential equation become a so-called linear problem. The previous theorem can besimplified for this case.Corollary 1 If the linear two-point boundary-value problemsatisfies⎧⎨y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β1. p(x), q(x), and r(x) are continuous on [a, b], and2. q(x) > 0 on [a, b],then the problem has a unique solution.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 6Many theories and application models consider the boundary-value problem in a specialform as follows.⎧⎨y ′′ = f(x, y)⎩y(0) = 0, y(1) = 0We will show that this simple form can be derived from the original problem by simpletechniques such as changes <strong>of</strong> variables and linear transformation. To do this, we begin bychanging the variable. Suppose that the original problem is⎧⎨y ′′ = f(x, y)⎩y(a) = α,y(b) = βwhere y = y(x). Now let λ = b − a and define a new variablet = x − ab − a = 1 (x − a).λ(2)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 7That is, x = a + λt. Notice that t = 0 corresponds to x = a, and t = 1 corresponds tox = b. Then we definewith λ = b − a. This givesz(t) = y(a + λt) = y(x)z ′ (t) = d dt z(t) = d dt y(a + λt) = [ ddx y(x) ] [ ddt (a + λt) ]and, analogously,= λy ′ (x)z ′′ (t) = d dt z′ (t) = λ 2 y ′′ (x) = λ 2 f(x, y(x)) = λ 2 f(a + λt, z(t)).Likewise the boundary conditions are changed toz(0) = y(a) = α and z(1) = y(b) = β.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 9and the original equation is reduced toλ 2 f(a + λt, z) = 9 [ sin(1 + 3t)z + z 2] ,⎧⎨z ′′ (t) = 9 sin((1 + 3t)z) + 9z 2⎩z(0) = 3, z(1) = 7To reduce a two-point boundary-value problemto a homogeneous system, let⎧⎨z ′′ (t) = g(t, z)⎩z(0) = α, z(1) = βu(t) = z(t) − [α + (β − α)t]then u ′′ (t) = z ′′ (t), andu(0) = z(0) − α = 0 and u(1) = z(1) − β = 0Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 10Moreover,g(t, z) = g(t, u + α + (β − α)t) ≡ h(t, u).The system is now transformed intoExample 2 Reduce the system⎧⎨u ′′ (t) = h(t, u)⎩u(0) = 0, u(1) = 0⎧⎨z ′′ = [5z − 10t + 35 + sin(3z − 6t + 21)]e t⎩z(0) = −7, z(1) = −5to a homogeneous problem by linear transformation technique.Solution: Letu(t) = z(t) − [−7 + (−5 + 7)t] = z(t) − 2t + 7.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 11Then z(t) = u(t) + 2t − 7, andu ′′ = z ′′ = [5z − 10t + 35 + sin(3z − 6t + 21)]e t= [5(u + 2t − 7) − 10t + 35 + sin(3(u + 2t − 7) − 6t + 21)]e t= [5u + sin(3u)]e tThe system is transformed to⎧⎨u ′′ (t) = [5u + sin(3u)]e t⎩u(0) = u(1) = 0Example 3 Reduce the following two-point boundary-value problem⎧⎨y ′′ = y 2 + 3 − x 2 + xy⎩y(3) = 7, y(5) = 9to a homogeneous system.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 12Solution: In the original system, a = 3, b = 5, α = 7, β = 9. Let λ = b − a = 2 anddefine a new variablet = 1 (x − 3) =⇒ x = 2t + 3.2Let the function z(t) = y(x) = y(2t + 3). Thenz ′′ (t) = λ 2 y ′′ (2t + 3) = λ 2 f(2t + 3, u)The original problem is first transformed intoNext let= 4[z 2 + 3 − (2t + 3) 2 + (2t + 3)z]= 4[z 2 + 3z + 2tz − 4t 2 − 12t − 6]⎧⎨z ′′ (t) = 4[z 2 + 3z + 2tz − 4t 2 − 12t − 6]⎩z(0) = 7, z(1) = 9u(t) = z(t) − [7 + 2t], or equivalently, z(t) = u(t) + 2t + 7.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 13Thenu ′′ (t) = 4[(z + 2t + 7) 2 + 3(u + 2t + 7) + 2t(u + 2t + 7) − 4t 2 − 12t − 6]= 4[u 2 + 6tu + 17u + 4t 2 + 36t + 64].The original problem is transformed into the following homogeneous system⎧⎨u ′′ (t) = 4[u 2 + 6tu + 17u + 4t 2 + 36t + 64]⎩u(0) = u(1) = 0Theorem 2 The boundary-value problemhas a unique solution if ∂f∂y0 ≤ x ≤ 1 and −∞ < y < ∞.⎧⎨y ′′ = f(x, y)⎩y(0) = 0, y(1) = 0is continuous, non-negative, and bounded in the stripDepartment <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 14Theorem 3 If f is a continuous function <strong>of</strong> (s, t) in the domain 0 ≤ s ≤ 1 and−∞ < t < ∞ such that|f(s, t 1 ) − f(s, t 2 )| ≤ K|t 1 − t 2 |, (K < 8).Then the boundary-value problemhas a unique solution in C[0, 1].⎧⎨y ′′ = f(x, y)⎩y(0) = 0, y(1) = 0Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 152 – Finite Difference Method For Linear ProblemsWe consider finite difference method for solving the linear two-point boundary-value problem<strong>of</strong> the form⎧⎨ y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β.(4)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 152 – Finite Difference Method For Linear ProblemsWe consider finite difference method for solving the linear two-point boundary-value problem<strong>of</strong> the form⎧⎨ y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β.Methods involving finite differences for solving boundary-value problems replace each <strong>of</strong> thederivatives in the differential equation by an appropriate difference-quotient approximation.(4)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 152 – Finite Difference Method For Linear ProblemsWe consider finite difference method for solving the linear two-point boundary-value problem<strong>of</strong> the form⎧⎨ y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β.(4)Methods involving finite differences for solving boundary-value problems replace each <strong>of</strong> thederivatives in the differential equation by an appropriate difference-quotient approximation.2.1 – The Finite Difference FormulationDepartment <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 152 – Finite Difference Method For Linear ProblemsWe consider finite difference method for solving the linear two-point boundary-value problem<strong>of</strong> the form⎧⎨ y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β.(4)Methods involving finite differences for solving boundary-value problems replace each <strong>of</strong> thederivatives in the differential equation by an appropriate difference-quotient approximation.2.1 – The Finite Difference FormulationFirst, partition the interval [a, b] into n equally-spaced subintervals by pointsa = x 0 < x 1 < . . . < x n < x n = b.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 152 – Finite Difference Method For Linear ProblemsWe consider finite difference method for solving the linear two-point boundary-value problem<strong>of</strong> the form⎧⎨ y ′′ = p(x)y ′ + q(x)y + r(x)⎩y(a) = α, y(b) = β.(4)Methods involving finite differences for solving boundary-value problems replace each <strong>of</strong> thederivatives in the differential equation by an appropriate difference-quotient approximation.2.1 – The Finite Difference FormulationFirst, partition the interval [a, b] into n equally-spaced subintervals by pointsa = x 0 < x 1 < . . . < x n < x n = b. Each mesh point x i can be computed byx i = a + i ∗ h,i = 0, 1, . . . , n, with h = b − anwhere h is called the mesh size.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 16At the interior mesh points, x i , for i = 1, 2, . . . , n − 1, the differential equation to beapproximated satisfiesy ′′ (x i ) = p(x i )y ′ (x i ) + q(x i )y(x i ) + r(x i ). (5)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 16At the interior mesh points, x i , for i = 1, 2, . . . , n − 1, the differential equation to beapproximated satisfiesThe central finite difference formulaey ′′ (x i ) = p(x i )y ′ (x i ) + q(x i )y(x i ) + r(x i ). (5)y ′ (x i ) = y(x i+1) − y(x i−1 )2h− h26 y(3) (η i ), (6)for some η i in the interval (x i−1 , x i+1 ),Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 16At the interior mesh points, x i , for i = 1, 2, . . . , n − 1, the differential equation to beapproximated satisfiesThe central finite difference formulaey ′′ (x i ) = p(x i )y ′ (x i ) + q(x i )y(x i ) + r(x i ). (5)y ′ (x i ) = y(x i+1) − y(x i−1 )2h− h26 y(3) (η i ), (6)for some η i in the interval (x i−1 , x i+1 ), andy ′′ (x i ) = y(x i+1) − 2y(x i ) + y(x i−1 )h 2− h212 y(4) (ξ i ), (7)for some ξ i in the interval (x i−1 , x i+1 ), can be derived from Taylor’s theorem byexpanding y about x i .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 16At the interior mesh points, x i , for i = 1, 2, . . . , n − 1, the differential equation to beapproximated satisfiesThe central finite difference formulaey ′′ (x i ) = p(x i )y ′ (x i ) + q(x i )y(x i ) + r(x i ). (5)y ′ (x i ) = y(x i+1) − y(x i−1 )2h− h26 y(3) (η i ), (6)for some η i in the interval (x i−1 , x i+1 ), andy ′′ (x i ) = y(x i+1) − 2y(x i ) + y(x i−1 )h 2− h212 y(4) (ξ i ), (7)for some ξ i in the interval (x i−1 , x i+1 ), can be derived from Taylor’s theorem byexpanding y about x i .Let u i denote the approximate value <strong>of</strong> y i = y(x i ).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 16At the interior mesh points, x i , for i = 1, 2, . . . , n − 1, the differential equation to beapproximated satisfiesThe central finite difference formulaey ′′ (x i ) = p(x i )y ′ (x i ) + q(x i )y(x i ) + r(x i ). (5)y ′ (x i ) = y(x i+1) − y(x i−1 )2h− h26 y(3) (η i ), (6)for some η i in the interval (x i−1 , x i+1 ), andy ′′ (x i ) = y(x i+1) − 2y(x i ) + y(x i−1 )h 2− h212 y(4) (ξ i ), (7)for some ξ i in the interval (x i−1 , x i+1 ), can be derived from Taylor’s theorem byexpanding y about x i .Let u i denote the approximate value <strong>of</strong> y i = y(x i ). If y ∈ C 4 [a, b], then a finite differencemethod with truncation error <strong>of</strong> order O(h 2 ) can be obtained by using the approximationsDepartment <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12hfor y ′ (x i ) and y ′′ (x i ), respectively.andy ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12handfor y ′ (x i ) and y ′′ (x i ), respectively. Furthermore, lety ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2p i = p(x i ), q i = q(x i ), r i = r(x i ).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12handfor y ′ (x i ) and y ′′ (x i ), respectively. Furthermore, letThe discrete version <strong>of</strong> equation (4) is thenu i+1 − 2u i + u i−1h 2y ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2p i = p(x i ), q i = q(x i ), r i = r(x i ).= p iu i+1 − u i−12htogether with boundary conditions u 0 = α and u n = β.+ q i u i + r i , i = 1, 2, . . . , n − 1, (8)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12handfor y ′ (x i ) and y ′′ (x i ), respectively. Furthermore, letThe discrete version <strong>of</strong> equation (4) is thenu i+1 − 2u i + u i−1h 2y ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2p i = p(x i ), q i = q(x i ), r i = r(x i ).= p iu i+1 − u i−12h+ q i u i + r i , i = 1, 2, . . . , n − 1, (8)together with boundary conditions u 0 = α and u n = β. Equation (8) can be written in theform (1 + h )2 p i u i−1 − ( 2 + h 2 )q i ui +for i = 1, 2, . . . , n − 1.(1 − h )2 p i u i+1 = h 2 r i , (9)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12handfor y ′ (x i ) and y ′′ (x i ), respectively. Furthermore, letThe discrete version <strong>of</strong> equation (4) is thenu i+1 − 2u i + u i−1h 2y ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2p i = p(x i ), q i = q(x i ), r i = r(x i ).= p iu i+1 − u i−12h+ q i u i + r i , i = 1, 2, . . . , n − 1, (8)together with boundary conditions u 0 = α and u n = β. Equation (8) can be written in theform (1 + h )2 p i u i−1 − ( 2 + h 2 )q i ui +(1 − h )2 p i u i+1 = h 2 r i , (9)for i = 1, 2, . . . , n − 1. In (8), u 1 , u 2 , . . . , u n−1 are the unknown, and there are n − 1linear equations to be solved.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 17y ′ (x i ) ≈ u i+1 − u i−12handfor y ′ (x i ) and y ′′ (x i ), respectively. Furthermore, letThe discrete version <strong>of</strong> equation (4) is thenu i+1 − 2u i + u i−1h 2y ′′ (x i ) ≈ u i+1 − 2u i + u i−1h 2p i = p(x i ), q i = q(x i ), r i = r(x i ).= p iu i+1 − u i−12h+ q i u i + r i , i = 1, 2, . . . , n − 1, (8)together with boundary conditions u 0 = α and u n = β. Equation (8) can be written in theform (1 + h )2 p i u i−1 − ( 2 + h 2 )q i ui +(1 − h )2 p i u i+1 = h 2 r i , (9)for i = 1, 2, . . . , n − 1. In (8), u 1 , u 2 , . . . , u n−1 are the unknown, and there are n − 1linear equations to be solved. The resulting system <strong>of</strong> linear equations can be expressed inthe matrix formAu = f, (10)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 18whereA =⎡−2 − h 2 q 1 1 − h p 2 11 + h p 2 2 −2 − h 2 q 2 1 − h p 2 2⎢⎣. . .. . .. . .⎤,1 + h p 2 n−2 −2 − h 2 q n−2 1 − h p ⎥2 n−2 ⎦1 + h p 2 n−1 −2 − h 2 q n−1. . .. . .. . .u =⎡⎢⎣u 1u 2.u n−2u n−1⎤, ⎥⎦and f =⎡⎢⎣h 2 r 1 − ( 1 + h 2 p ⎤1)αh 2 r 2.h 2 r ⎥n−2h 2 r n−1 − ( ⎦1 − h 2 p )n−1 βDepartment <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 19Since the matrix A is tridiagonal, this system can be solved by a special Gaussianelimination in O(n 2 ) flops.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 19Since the matrix A is tridiagonal, this system can be solved by a special Gaussianelimination in O(n 2 ) flops.Theorem 4 Suppose that p(x), q(x), and r(x) in (4) are continuous on [a, b], andq(x) > 0 on [a, b]. Then (10) has a unique solution provided that h < 2/L, whereL = max a≤x≤b |p(x)|.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 19Since the matrix A is tridiagonal, this system can be solved by a special Gaussianelimination in O(n 2 ) flops.Theorem 4 Suppose that p(x), q(x), and r(x) in (4) are continuous on [a, b], andq(x) > 0 on [a, b]. Then (10) has a unique solution provided that h < 2/L, whereL = max a≤x≤b |p(x)|.2.2 – Convergence AnalysisWe shall analyze that when h converges to zero, the solution u i <strong>of</strong> the discrete problem (8)converges to the solution y i <strong>of</strong> the original continuous problem (5).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 19Since the matrix A is tridiagonal, this system can be solved by a special Gaussianelimination in O(n 2 ) flops.Theorem 4 Suppose that p(x), q(x), and r(x) in (4) are continuous on [a, b], andq(x) > 0 on [a, b]. Then (10) has a unique solution provided that h < 2/L, whereL = max a≤x≤b |p(x)|.2.2 – Convergence AnalysisWe shall analyze that when h converges to zero, the solution u i <strong>of</strong> the discrete problem (8)converges to the solution y i <strong>of</strong> the original continuous problem (5).y i satisfies the following system <strong>of</strong> equationsy i+1 − 2y i + y i−1h 2for i = 1, 2, . . . , n − 1.(− h2yi+1 − y i−112 y(4) (ξ i ) = p i2h)− h26 y(3) (η i )+ q i y i + r i ,(11)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 19Since the matrix A is tridiagonal, this system can be solved by a special Gaussianelimination in O(n 2 ) flops.Theorem 4 Suppose that p(x), q(x), and r(x) in (4) are continuous on [a, b], andq(x) > 0 on [a, b]. Then (10) has a unique solution provided that h < 2/L, whereL = max a≤x≤b |p(x)|.2.2 – Convergence AnalysisWe shall analyze that when h converges to zero, the solution u i <strong>of</strong> the discrete problem (8)converges to the solution y i <strong>of</strong> the original continuous problem (5).y i satisfies the following system <strong>of</strong> equationsy i+1 − 2y i + y i−1h 2(− h2yi+1 − y i−112 y(4) (ξ i ) = p i2h)− h26 y(3) (η i )for i = 1, 2, . . . , n − 1. Subtract (8) from (11) and let e i = y i − u i , the result is+ q i y i + r i ,(11)e i+1 − 2e i + e i−1h 2= p ie i+1 − e i−12h+ q i e i + h 2 g i , i = 1, 2, . . . , n − 1,Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 20whereg i = 112 y(4) (ξ i ) − 1 6 p iy (3) (η i ).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


where<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 20g i = 112 y(4) (ξ i ) − 1 6 p iy (3) (η i ).After collecting terms and multiplying by h 2 , we have(1 + h )2 p ie i−1 − ( 2 + h 2 q i)ei +(1 − h )2 p ie i+1 = h 4 g i , i = 1, 2, . . . , n − 1.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


where<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 20g i = 112 y(4) (ξ i ) − 1 6 p iy (3) (η i ).After collecting terms and multiplying by h 2 , we have(1 + h )2 p ie i−1 − ( 2 + h 2 q i)ei +(1 − h )2 p ie i+1 = h 4 g i , i = 1, 2, . . . , n − 1.Let e = [e 1 , e 2 , . . . , e n−1 ] T and |e k | = ‖e‖ ∞ .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


where<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 20g i = 112 y(4) (ξ i ) − 1 6 p iy (3) (η i ).After collecting terms and multiplying by h 2 , we have(1 + h )2 p ie i−1 − ( 2 + h 2 q i)ei +(1 − h )2 p ie i+1 = h 4 g i , i = 1, 2, . . . , n − 1.Let e = [e 1 , e 2 , . . . , e n−1 ] T and |e k | = ‖e‖ ∞ . Then((2 + h 2 )q k ek = 1 + h ) (2 p k e k−1 + 1 − h )2 p k e k+1 − h 4 g k ,Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


where<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 20g i = 112 y(4) (ξ i ) − 1 6 p iy (3) (η i ).After collecting terms and multiplying by h 2 , we have(1 + h )2 p ie i−1 − ( 2 + h 2 q i)ei +(1 − h )2 p ie i+1 = h 4 g i , i = 1, 2, . . . , n − 1.Let e = [e 1 , e 2 , . . . , e n−1 ] T and |e k | = ‖e‖ ∞ . Then((2 + h 2 )q k ek = 1 + h ) (2 p k e k−1 + 1 − h )2 p k e k+1 − h 4 g k ,and, hence∣ 2 + h 2 q k∣ ∣ |ek |≤≤∣ 1 + h 2 p k∣ |e k−1| +∣ 1 − h 2 p k∣ |e k+1| + h 4 |g k |∣ 1 + h 2 p k∣ ‖e‖ ∞ +∣ 1 − h 2 p k∣ ‖e‖ ∞ + h 4 ‖g‖ ∞Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21When q(x) > 0, ∀x ∈ [a, b] and h is chosen small enough so that | h 2 p i| < 1, ∀i, thenthe the above inequality inducesh 2 q k ‖e‖ ∞ ≤ h 4 ‖g‖ ∞ .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21When q(x) > 0, ∀x ∈ [a, b] and h is chosen small enough so that | h 2 p i| < 1, ∀i, thenthe the above inequality inducesh 2 q k ‖e‖ ∞ ≤ h 4 ‖g‖ ∞ .Therefore, we derive an upper bound for ‖e‖ ∞‖e‖ ∞ ≤ h 2 ( ‖g‖∞inf q(x)).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21When q(x) > 0, ∀x ∈ [a, b] and h is chosen small enough so that | h 2 p i| < 1, ∀i, thenthe the above inequality inducesh 2 q k ‖e‖ ∞ ≤ h 4 ‖g‖ ∞ .Therefore, we derive an upper bound for ‖e‖ ∞By the definition <strong>of</strong> g i , we have‖e‖ ∞ ≤ h 2 ( ‖g‖∞inf q(x)).‖g‖ ∞ ≤ 112 ‖y(4) (x)‖ ∞ + 1 6 ‖p(x)‖ ∞‖y (3) (x)‖ ∞ .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21When q(x) > 0, ∀x ∈ [a, b] and h is chosen small enough so that | h 2 p i| < 1, ∀i, thenthe the above inequality inducesh 2 q k ‖e‖ ∞ ≤ h 4 ‖g‖ ∞ .Therefore, we derive an upper bound for ‖e‖ ∞By the definition <strong>of</strong> g i , we have‖e‖ ∞ ≤ h 2 ( ‖g‖∞inf q(x)).‖g‖ ∞ ≤ 112 ‖y(4) (x)‖ ∞ + 1 6 ‖p(x)‖ ∞‖y (3) (x)‖ ∞ .Hence‖g‖ ∞inf q(x)is a bound independent <strong>of</strong> h.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 21When q(x) > 0, ∀x ∈ [a, b] and h is chosen small enough so that | h 2 p i| < 1, ∀i, thenthe the above inequality inducesh 2 q k ‖e‖ ∞ ≤ h 4 ‖g‖ ∞ .Therefore, we derive an upper bound for ‖e‖ ∞By the definition <strong>of</strong> g i , we have‖e‖ ∞ ≤ h 2 ( ‖g‖∞inf q(x)).‖g‖ ∞ ≤ 112 ‖y(4) (x)‖ ∞ + 1 6 ‖p(x)‖ ∞‖y (3) (x)‖ ∞ .Hence‖g‖ ∞inf q(x) is a bound independent <strong>of</strong> h. Thus we can conclude that ‖e‖ ∞ is O(h 2 ) ash → 0.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)The idea <strong>of</strong> shooting method for (12) is to solve a related initial-value problem with a guessfor y ′ (a), say z.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)The idea <strong>of</strong> shooting method for (12) is to solve a related initial-value problem with a guessfor y ′ (a), say z. The corresponding IVP⎧⎨ y ′′ = f(x, y, y ′ )⎩ y(a) = α, y ′ (a) = zcan then be solved by, for example, Runge-Kutta method.(13)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)The idea <strong>of</strong> shooting method for (12) is to solve a related initial-value problem with a guessfor y ′ (a), say z. The corresponding IVP⎧⎨ y ′′ = f(x, y, y ′ )⎩ y(a) = α, y ′ (a) = zcan then be solved by, for example, Runge-Kutta method. We denote this approximatesolution y z and hope y z (b) = β.(13)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)The idea <strong>of</strong> shooting method for (12) is to solve a related initial-value problem with a guessfor y ′ (a), say z. The corresponding IVP⎧⎨ y ′′ = f(x, y, y ′ )⎩ y(a) = α, y ′ (a) = zcan then be solved by, for example, Runge-Kutta method. We denote this approximatesolution y z and hope y z (b) = β. If not, we use another guess for y ′ (a), and try to solve analtered IVP (13) again.(13)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 223 – Shooting MethodsWe consider solving the following 2-point boundary-value problem:⎧⎨⎩y ′′ = f(x, y, y ′ )y(a) = α,y(b) = β(12)The idea <strong>of</strong> shooting method for (12) is to solve a related initial-value problem with a guessfor y ′ (a), say z. The corresponding IVP⎧⎨ y ′′ = f(x, y, y ′ )⎩ y(a) = α, y ′ (a) = zcan then be solved by, for example, Runge-Kutta method. We denote this approximatesolution y z and hope y z (b) = β. If not, we use another guess for y ′ (a), and try to solve analtered IVP (13) again. This process is repeated and can be done systematically.(13)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0. Hence secant method canbe used.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0. Hence secant method canbe used.☞ How to compute z?Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0. Hence secant method canbe used.☞ How to compute z?Suppose we have solutions y z1 , y z2 with guesses z 1 , z 2 and obtain φ(z 1 ) and φ(z 2 ).Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0. Hence secant method canbe used.☞ How to compute z?Suppose we have solutions y z1 , y z2 with guesses z 1 , z 2 and obtain φ(z 1 ) and φ(z 2 ).If these guesses can not generate satisfactory solutions, we can obtain another guessz 3 by the secant methodz 2 − z 1z 3 = z 2 − φ(z 2 )φ(z 2 ) − φ(z 1 ) .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 23☞ Objective: select z, so that y z (b) = β.Letφ(z) = y z (b) − β.Now our objective is simply to solve the equation φ(z) = 0. Hence secant method canbe used.☞ How to compute z?Suppose we have solutions y z1 , y z2 with guesses z 1 , z 2 and obtain φ(z 1 ) and φ(z 2 ).If these guesses can not generate satisfactory solutions, we can obtain another guessz 3 by the secant methodz 2 − z 1z 3 = z 2 − φ(z 2 )φ(z 2 ) − φ(z 1 ) .In generalz k − z k−1z k+1 = z k − φ(z k )φ(z k ) − φ(z k−1 ) .Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 24☞ Special <strong>BVP</strong>:⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α,y(b) = β(14)where u(x), v(x), w(x) are continuous in [a, b].Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 24☞ Special <strong>BVP</strong>:⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α,y(b) = β(14)where u(x), v(x), w(x) are continuous in [a, b].Suppose we have solved (14) twice with initial guesses z 1 and z 2 , and obtainapproximate solutions y 1 and y 2 ,Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 24☞ Special <strong>BVP</strong>:⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α,y(b) = β(14)where u(x), v(x), w(x) are continuous in [a, b].Suppose we have solved (14) twice with initial guesses z 1 and z 2 , and obtainapproximate solutions y 1 and y 2 , hence⎧⎨ y ′′ ′1 = u + vy 1 + wy 1⎩ y 1 (a) = α, y ′ and1 (a) = z 1⎧⎨⎩y 2 ′′ = u + vy 2 + wy 2′y 2 (a) = α, y 2 ′ (a) = z 2Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 24☞ Special <strong>BVP</strong>:⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α,y(b) = β(14)where u(x), v(x), w(x) are continuous in [a, b].Suppose we have solved (14) twice with initial guesses z 1 and z 2 , and obtainapproximate solutions y 1 and y 2 , hence⎧⎨ y ′′ ′1 = u + vy 1 + wy 1⎩ y 1 (a) = α, y ′ and1 (a) = z 1⎧⎨⎩y 2 ′′ = u + vy 2 + wy 2′y 2 (a) = α, y 2 ′ (a) = z 2Now lety(x) = λy 1 (x) + (1 − λ)y 2 (x)for some parameter λ,Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 24☞ Special <strong>BVP</strong>:⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α,y(b) = β(14)where u(x), v(x), w(x) are continuous in [a, b].Suppose we have solved (14) twice with initial guesses z 1 and z 2 , and obtainapproximate solutions y 1 and y 2 , hence⎧⎨ y ′′ ′1 = u + vy 1 + wy 1⎩ y 1 (a) = α, y ′ and1 (a) = z 1⎧⎨⎩y 2 ′′ = u + vy 2 + wy 2′y 2 (a) = α, y 2 ′ (a) = z 2Now lety(x) = λy 1 (x) + (1 − λ)y 2 (x)for some parameter λ, we can showy ′′ = u + vy + wy ′Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 25andy(a) = λy 1 (a) + (1 − λ)y 2 (a) = αDepartment <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 25andy(a) = λy 1 (a) + (1 − λ)y 2 (a) = αWe can select λ so that y(b) = β.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 25andy(a) = λy 1 (a) + (1 − λ)y 2 (a) = αWe can select λ so that y(b) = β.β = y(b) = λy 1 (b) + (1 − λ)y 2 (b)= λ(y 1 (b) − y 2 (b)) + y 2 (b)Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 25andy(a) = λy 1 (a) + (1 − λ)y 2 (a) = αWe can select λ so that y(b) = β.β = y(b) = λy 1 (b) + (1 − λ)y 2 (b)⇒ λ == λ(y 1 (b) − y 2 (b)) + y 2 (b)β − y 2 (b)(y 1 (b) − y 2 (b))Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 25andy(a) = λy 1 (a) + (1 − λ)y 2 (a) = αWe can select λ so that y(b) = β.β = y(b) = λy 1 (b) + (1 − λ)y 2 (b)⇒ λ == λ(y 1 (b) − y 2 (b)) + y 2 (b)β − y 2 (b)(y 1 (b) − y 2 (b))In practice, we can solve the following two IVPs (in parallel)⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α, y ′ (a) = 0and⎧⎨⎩y ′′ = u(x) + v(x)y + w(x)y ′y(a) = α, y ′ (a) = 1Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003


<strong>BVP</strong> <strong>of</strong> <strong>ODE</strong> 26i.e.,⎧⎪⎨⎪⎩y ′ 1 = y 3y 3 ′ = y 1 ′′ = u + vy 1 + wy 1 ′ = u + vy 1 + wy 3y 1 (a) = α, y 3 (a) = y 1 ′ (a) = 0and⎧⎪⎨⎪⎩y 2 ′ = y 4y 4 ′ = u + vy 2 + wy 4y 2 (a) = α, y 4 (a) = 1to obtain approximate solutions y 1 and y 2 , then compute λ and form the solution y.Department <strong>of</strong> Mathematics – NTNU Tsung-Min Hwang December 20, 2003

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

Saved successfully!

Ooh no, something went wrong!