正在加载图片...
760 Chapter 17.Two Point Boundary Value Problems 17.2 Shooting to a Fitting Point The shooting method described in 817.1 tacitly assumed that the "shots"would be able to traverse the entire domain of integration,even at the early stages of convergence to a correct solution.In some problems it can happen that,for very wrong starting conditions,an initial solution can't even get from I to x2 without encountering some incalculable,or catastrophic,result.For example,the argument of a square root might go negative,causing the numerical code to crash.Simple shooting would be stymied. 三 A different,but related,case is where the endpoints are both singular points of the set of ODEs.One frequently needs to use special methods to integrate near the singular points,analytic asymptotic expansions,for example.In such cases it is feasible to integrate in the direction away from a singular point,using the special w method to get through the first little bit and then reading off"initial"values for further numerical integration.However it is usually not feasible to integrate into a singular point,if only because one has not usually expended the same analytic effort to obtain expansions of"wrong"solutions near the singular point(those not satisfying the desired boundary condition). 9 The solution to the above mentioned difficulties is shooting to a fitting point. Instead of integrating from to z2,we integrate first from i to some point rf that is between i and x2;and second from x2 (in the opposite direction)to xf. If(as before)the number of boundary conditions imposed at x1 is n,and the number imposed at 2 is n2,then there are n2 freely specifiable starting values at 至飞么 9 1 and nI freely specifiable starting values at x2.(If you are confused by this,go back to $17.1.)We can therefore define an n2-vector V()of starting parameters at 1,and a prescription load1(x1,v1,y)for mapping V(1)into a y that satisfies 61 the boundary conditions at 1, (c1)=(z1;Va)1,,V1)n2)i=1,,N (17.2.1) Likewise we can define an ni-vector V(2)of starting parameters at x2,and a prescription load2(x2,v2,y)for mapping V(2)into a y that satisfies the boundary Numerica 10621 conditions at x2, i(r2)=h(r2;V21,,V2)n) i=1,.,N (17.2.2) (outside We thus have a total of N freely adjustable parameters in the combination of V()and V(2).The N conditions that must be satisfied are that there be agreement in N components of y at xf between the values obtained integrating from one side and from the other, (xf;V(1))=h(xf;V(2)i=1,,N (17.2.3) In some problems,the N matching conditions can be better described(physically mathematically,or numerically)by using N different functions F,i=1...N,each possibly depending on the N components y:.In those cases,(17.2.3)is replaced by F(xf;V(a)】=Fy(xf;V(2】i=1,,N (17.2.4)760 Chapter 17. Two Point Boundary Value Problems Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America). 17.2 Shooting to a Fitting Point The shooting method described in §17.1 tacitly assumed that the “shots” would be able to traverse the entire domain of integration, even at the early stages of convergence to a correct solution. In some problems it can happen that, for very wrong starting conditions, an initial solution can’t even get from x1 to x2 without encountering some incalculable, or catastrophic, result. For example, the argument of a square root might go negative, causing the numerical code to crash. Simple shooting would be stymied. A different, but related, case is where the endpoints are both singular points of the set of ODEs. One frequently needs to use special methods to integrate near the singular points, analytic asymptotic expansions, for example. In such cases it is feasible to integrate in the direction away from a singular point, using the special method to get through the first little bit and then reading off “initial” values for further numerical integration. However it is usually not feasible to integrate into a singular point, if only because one has not usually expended the same analytic effort to obtain expansions of “wrong” solutions near the singular point (those not satisfying the desired boundary condition). The solution to the above mentioned difficulties is shooting to a fitting point. Instead of integrating from x1 to x2, we integrate first from x1 to some point xf that is between x1 and x2; and second from x2 (in the opposite direction) to xf . If (as before) the number of boundary conditions imposed at x 1 is n1, and the number imposed at x2 is n2, then there are n2 freely specifiable starting values at x1 and n1 freely specifiable starting values at x2. (If you are confused by this, go back to §17.1.) We can therefore define an n2-vector V(1) of starting parameters at x1, and a prescription load1(x1,v1,y) for mapping V(1) into a y that satisfies the boundary conditions at x1, yi(x1) = yi(x1; V(1)1,...,V(1)n2 ) i = 1,...,N (17.2.1) Likewise we can define an n1-vector V(2) of starting parameters at x2, and a prescription load2(x2,v2,y) for mapping V(2) into a y that satisfies the boundary conditions at x2, yi(x2) = yi(x2; V(2)1,...,V(2)n1 ) i = 1,...,N (17.2.2) We thus have a total of N freely adjustable parameters in the combination of V(1) and V(2). The N conditions that must be satisfied are that there be agreement in N components of y at xf between the values obtained integrating from one side and from the other, yi(xf ; V(1)) = yi(xf ; V(2)) i = 1,...,N (17.2.3) In some problems, the N matching conditions can be better described (physically, mathematically, or numerically) by using N different functions Fi, i = 1 ...N, each possibly depending on the N components yi. In those cases, (17.2.3) is replaced by Fi[y(xf ; V(1))] = Fi[y(xf ; V(2))] i = 1,...,N (17.2.4)
向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有