收藏 分销(赏)

计算物理shooting-for-boundary-value-porblem--打靶法解决边界条件微分方程问题.doc

上传人:仙人****88 文档编号:9464452 上传时间:2025-03-27 格式:DOC 页数:11 大小:313KB
下载 相关 举报
计算物理shooting-for-boundary-value-porblem--打靶法解决边界条件微分方程问题.doc_第1页
第1页 / 共11页
计算物理shooting-for-boundary-value-porblem--打靶法解决边界条件微分方程问题.doc_第2页
第2页 / 共11页
点击查看更多>>
资源描述
3.6 Boundary- value and eigenvalue problems Another class of problems in physics requires knowledge of solutions to differential equations with values of physical quantities or their derivatives given at the boundaries of a specified region. This applies to the solution of the Poisson equation with a given charge distribution and known boundary values of the electrostatic potential or of the stationary Schrodinger equation with a given potential and boundary conditions A typical boundary- value problem in physics us usually given in a second- order differential equation (3.43) Where is a function of x, and are the first-order and second-order derivatives of with respect to x , and is a function of , , and x . Either u or is given at each boundary. Note that one can always choose a coordinate system so that the boundaries of the system are at x=0 and x=1 without losing any generality. For example,if the actual boundaries are at x= and for a given problem one call always bring them back to with a transformation (3.44) For problems in one dimension,one can have a total of four possible types of boundary conditions: (1) and (2) and (3) and (4) and The boundary-value problem is more difficult to solve than the similar initial—value problem with the same differential equation For example,if we want to solve , (3.45) with the initial conditions u(0)= and , we can first transform the differential equation into a set of first—order differential equations with a redefinition of the first order derivative into a new variable. The solution will follow if we adopt one of the algorithms discussed earlier in this chapter.However for the boundary-value problem,we know only or ,which is not sufficient to start any algorithms for the initial.value problems without ally further work. Typical eigenvalue problems are even more complicated because at least one more parameter ,that is.the eigenvalue is involved 1n the equation For example, with a set of given boundary conditions,defines an eigenvalue problem. Here the eigenvalue can have only some selected values in order to yield acceptable solutions of the equation under the given boundary conditions. Let us take the longitudinal vibrations along an elastic rod as an example here. The equation describing the stationary solution of elastic waves is given by where u(x)is the displacement from the equilibrium at z and the allowed values of the wavevector k are the eigenvalues of the problem The wavevector in the equation is related to the sound speed c along the rod and the allowed angular frequency by the dispersion relation If both ends (x=0 , x=1) of the rod are fixed,the boundary conditions are then If one end (x=O)is fixed and the other end (x=1) is free,the boundary conditions are then u(0)=0 and For this problem,one can obtain an analytical solution For example,if both ends off the rod are fixed,one will have the eigenfunctions (3 49) as possible-solutions of the differential equation. Here the eigenvalues are given by (3 50) where n= The complete solution of the longitudinal waves along the elastic rod is given by a linear combination of all the eigen-functions with their associated initial solutions, (3 51) Where are coefficients to be determined by the initial conditions We will come back to this problem in Chapter 6whenwe discuss the solutions of a partial differential equation 3.7 The shooting method A simple method for solving the boundary-value problem of Eq.(3.43) and the eigenvalue Problem of Eq.(3.46) with a set of given boundary conditions is the so-called shooting method. We will first discuss how it works for the boundary-value Problem and then generalize it to the eigenvalue problem. We first convert the second-order differential equation into two first-order differential equations by defining and ; that is, (3.52) (3.53) with a given set of boundary conditions. To illustrate the method, let us assume that the boundary conditions are and . Any other types of Boundary conditions can be solved in a similar manner. The key here is to make the problem look like an initial-value problem by introducing an adjustable parameter;the solution is then obtained by varying the parameter Since u(0) is given already ,we can make a guess for the first-0rder derivative at x=0, for example , . Here is the parameter to be adjusted. For a specific , we can integrate the equation to x=1 with any of the algorithms discussed earlier for the initial-value problem . Since the initial choice of can hardly be the actual derivative at x=0 , the value of the function (1), resulting from the integration with to x=1 , would not be the same as . The idea of the shooting method is to use one of the root search algorithms to find the appropriate that ensures within a given tolerance Let us take an actual numerical example to illustrate the scheme . Assume that we want to solve the following differential equation; (3.54) With the given boundary conditions and u(1)=1, we can define the new variables and ; then we have (3.55) r (3.56) Now assume that this equation set has the initial values and . Here is a parameter to be adjusted in order to have , with being the tolerance of the solution . We can combine the secant method for root search and the fourth-order Runge-Kutta method for the initial-value problem to solve the above equation .The following program is an implementation of such a combined approach to the boundary-value problem defined in Eq. (3.54) or Eqs. (3.55) and (3.56) with the given boundary conditions. C The boundary—value problem solved from the above program can also be solved exactly with all analytical solution (3 57) One can easily check that the above expression does satisfy the equation and the boundary conditions Here we plot both the numerical result obtained from the shooting method and the analytical solution in Fig 3.4 As one can see,the shooting method provides a very accurate solution of the boundary—value problem It is also a very general method for the boundary—value problem. Fig 3.4 Tire numerical solution of the boundary value problem of Eq.(3.54) by the Shooting method(+) compared with the analytical solution(solid line)of the same Problem Boundary value problems with other types of boundary conditions can be solved in a similar manner , For example,if and u(1)= are given, we can make a guess on and then integrate the equation set of and to x=1 the root to be sought is from Here is the numerical result of the equation with . If given,the equation , is solved Instead. One can apply the shooting method to solve the eigenvalue problem too. The parameter to be adjusted in the eigenvalue problem is no longer a parameter introduced but the eigenvalue of the problem. For example,if and are given,we can integrate the equation with with as a small quantity. Then we search for the root of . When ,we obtain an approximate eigenvalue and the corresponding eigenvector from the normalized solution of . The introduced parameter d is not relevant here because it will be automatically modified to be the first-order derivative here solution is normalized In other words,one can choose the first-order derivative at the boundary arbitrarily and it will not affect the results as long as the solutions are made orthonormal (orthogonal). 3.8 Linear equations and the Sturm-Liouville problem Many eigenvalue or boundary value problems are in the form of linear equations , (3.59) Where d(x), q (x), and s(x) are functions of x. Assume that the boundary conditions are and . If all d(x),q(x),and s(x)are smooth,one can solve the equation with the shooting method developed in the preceding section. In fact,one can show that an extensive search for the parameter from . 0 is not necessary in this case, because of the superposition principle of the linear equation. Any linear combination of the solutions is still a solution of the equation. one needs only two trial solutions and ,with and being two different parameters The correct solution of the equation is given by with a and b determined from u(0)= and u(1)=. Note that . So we have a+b=1 (36.0) (3.61) which can easily be solved to give (3.62) (3.63) With a and b given from the above equation,we have the solution of the differential equation from Eq(3 59). An important class of linear equations in physics is referred to as the Sturm-Liouville problem,defined by (3 64) which has the first-order derivative term combined with the second-order derivative term. P(x) , q(x) , and s(x) are the coefficient functions of x. For most actual problems,s(x)=0 and q(x)= ,with being the eigenvalue of the equation r(x)and w(x)are the redefined coefficient functions. The Legendre equation,the Bessel equation,and the related equations in physics are examples of the Sturm-Liouville problem. Our goal here is to construct an accurate algorithm that can integrate Sturm-Liouville equation,that is,Eq(3 64)In Chapter 2,we obtained the three-point (3.65) And (3.36) Now if we multiply Eq. (3 65) by and Eq(3 66) by and add them together, we have (3 67) If we replace the first term on the right-hand side with and drop the second term, we obtain the simplest numerical algorithm for the Sturm-LiouvlIle equation (3.68) which is accurate up to O. One has to be very careful with this apparent local accuracy in the algorithm. In reality, because of the repeated use of the three-point formula, the local accuracy delivered is usually lower than O. Before we discuss how to improve the accuracy of this algorithm,let us illustrate it with all example The Legendre equation is given by (3.69) With and x The solutions of the Legendre equation are the Legendre polynomials . Let us assume that we do not know the value of l but know the first two points of =x:then we can treat the problem as an eigenvalue problem. The following program is an implementation of the simplest algorithm for the Sturm-Liouville equation in combination with the bisection method for the root search to solve for the eigenvalue =1 of the Legendre equation The eigenvalue obtained from the above program is 1.000091, which contains an error of 9 in comparison with the exact result of . The error comes from both the rounding error and the inaccuracy of the algorithm. If we want to have higher accuracy in the algorithm for the Sturm-Liouvile Equation , we can differentiate the equation twice , Then we have , (3.70) Where on the right-hand side can be replaced with Which is the result of differentiating the Sturm-Liouville equation once . If we combine Eqs.(3.67) , (3.70) , and (3.71) , we obtain a better algorithm (3.72) where and are given by (3.73) (3.74) (3.75) (3.76) which can be evaluated easily if p(x),q(x),and s(x) are explicitly given In the case where some the derivatives that are needed are not easily obtained analytically,one can evaluate them numerically In order to maintain the high accuracy of the algorithm,one needs to use comparable numerical formulas. For the special case with p(x)=1,the above coefficients reduce to much simpler forms Without sacrificing the high accuracy of the algorithm,we can apply the three—point formulas to the first order and second order derivatives of q(x) and s(x) . Then we have (3.77) (3.78) (3.79) (3.80) which are slightly different from the Numerov algorithm which is an extremely accurate scheme for linear differential equations without the first-order derivative term, that is , Eq.(3.58) with d(x)=0 or the Sturm-Liouville equation with p(x)=1. Many equations in physics have this form , for example , the Poisson equation with Spherical symmetry or the one-dimensional Schrodinger equation. The Numerov algorithm is derived from the three-point formula for the second-Order derivative from Eq, (3.66) with the fourth-order derivative of u(x) from taking the second-order derivative of the differential equation. (3.81) If we apply the three-point formula to the above equation by keeping all the terms on the right-hand side together , then we obtain the Numerov algorithm (Koonin, 1986, pp. 50-1) with the recursion of Eq.(3.72) and the coefficients given by (3.82) (3.83) (3.84) (3.85) Note that even though the apparent local accuracy of the Numerov algorithm and the algorithm w4e derived earlier in this section for the Sturm-Liouville equation is O() , the actual global accuracy of the algorithm is only O() because of the repeated use of the three-point formulas . For more discussion on this issue , see Simos (1993). The algorithms discussed here can be applied to initial-value problems as well as to boundary-value or eigenvalue problems . The Numerov algorithm and the algorithm for the Sturm-Liouville equation usually have lover accuracy than the fourth-order Runge-Kutta algorithm when applied to the same problem , and this is different from what the apparent local accuracies imply . For more numerical examples of the Sturm-Liouville equation and the Numerov algorithm in the related problems , see Pryce(1993) and Onodera(1994)
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 教育专区 > 小学其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服