c數(shù)值算法程序大全c18-1_第1頁
c數(shù)值算法程序大全c18-1_第2頁
c數(shù)值算法程序大全c18-1_第3頁
c數(shù)值算法程序大全c18-1_第4頁
c數(shù)值算法程序大全c18-1_第5頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、18.1Fredholm Equations of the Second Kind 791special quadrature rules, but they are also sometimes blessings in disguise, since they can spoil a kernelssmoothing and make problems well-conditioned.In §§18.418.7we face up to the issues of inverse problems. §18.4is an introduction to th

2、is large subject.We should note here that wavelet transforms, already discussed in §13.10, are applicable not only to data compression and signal processing, but can also be used to transform some classes of integral equations into sparse linear problems that allow fast solution. You may wish t

3、o review §13.10as part of reading this chapter.Some subjects, such as integro-differential equations , we must simply declare to be beyond our scope. For a review of methods for integro-differential equations, see Brunner 4.It should go without saying that this one short chapter can only barely

4、 touch on a few of the most basic methods involved in this complicated subject.CITED REFERENCES AND FURTHER READING:Delves, L.M., and Mohamed, J.L. 1985, Computational Methods for Integral Equations (Cam-bridge, U.K.:Cambridge University Press. 1Linz, P . 1985, Analytical and Numerical Methods for V

5、olterra Equations (Philadelphia:S.I.A.M.2Atkinson, K.E. 1976, A Survey of Numerical Methods for the Solution of Fredholm IntegralEquations of the Second Kind (Philadelphia:S.I.A.M. 3Brunner, H. 1988, in Numerical Analysis 1987, Pitman Research Notes in Mathematics vol. 170,D.F . Grifthsand G.A. Wats

6、on, eds. (Harlow,Essex, U.K.:Longman Scienticand T ech-nical, pp. 1838.4Smithies, F . 1958, Integral Equations (Cambridge,U.K.:Cambridge University Press. Kanwal, R.P . 1971, Linear Integral Equations (NewYork:Academic Press.Green, C.D. 1969, Integral Equation Methods (NewYork:Barnes &Noble.18.1

7、Fredholm Equations of the Second KindWe desire a numerical solution for f (t in the equationbf (t =K (t, s f (s ds +g (t (18.1.1aThe method we describe, a very basic one, is called the Nystrom method . It requires the choice of some approximate quadrature rule :by (s ds = Nw j y (s j (18.1.2a j =1He

8、re the set w j are the weights of the quadrature rule, while the N points s j are the abscissas.What quadrature rule should we use? It is certainly possible to solve integral equations with low-order quadrature rules like the repeated trapezoidal or Simpsonsvisit website or call 1-800-872-7423 (Nort

9、h America only, readable files (including this one to any server c o r send email to tradecup.cam.ac.uk (outside North America.omputer, is strictly prohibited. To order Numerical Recipes books, d iskettes, or CDROMsPermission is granted for internet users to make one paper copy for their own persona

10、l use. Further reproduction, or any copying of machine-Copyright (C 1988-1992 by Cambridge University Press. P rograms Copyright (C 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5792Chapter 18. Integral Equations a

11、nd Inverse Theoryrules. We will see, however, that the solution method involves O (N 3 operations, and so the most efcientmethods tend to use high-order quadrature rules to keep N as small as possible. For smooth, nonsingular problems, nothing beats Gaussian quadrature (e.g.,Gauss-Legendre quadratur

12、e, §4.5. (Fornon-smooth or singular kernels, see §18.3.Delves and Mohamed 1investigated methods more complicated than the Nystrom method. For straightforward Fredholm equations of the second kind, they concluded “. the clear winner of this contest has been the Nystrom routine . with the N

13、-point Gauss-Legendre rule. This routine is extremely simple . . Such results are enough to make a numerical analyst weep.”If we apply the quadrature rule (18.1.2to equation (18.1.1,we getf (t N=w j K (t, s j f (s j +g (t (18.1.3j =1Evaluate equation (18.1.3at the quadrature points:f (t i = Nw j K (

14、t i , s j f (s j +g (t i (18.1.4j =1Let f i be the vector f (t i , g i the vector g (t i , K ij the matrix K (t i , s j , and deneK ij =K ij w j (18.1.5Then in matrix notation equation (18.1.4becomes(1K ·f =g (18.1.6This is a set of N linear algebraic equations in N unknowns that can be solved

15、by standard triangular decomposition techniques (§2.3 that is where the O (N 3 operations count comes in. The solution is usually well-conditioned, unless is very close to an eigenvalue.Having obtained the solution at the quadrature points t isolution at some other point t ? You do not simply u

16、se polynomial , how do interpolation. you get the This destroys all the accuracy you have worked so hard to achieve. Nystromskey observation was that you should use equation (18.1.3as an interpolatory formula, maintaining the accuracy of the solution.We here give two routines for use with linear Fre

17、dholm equations of the second kind. The routine fred2sets up equation (18.1.6and then solves it by LU decomposition with calls to the routines ludcmp and lubksb . The Gauss-Legendre quadrature is implemented by rstgetting the weights and abscissas with a call to gauleg . Routine fred2requires that y

18、ou provide an external function that returns g (t and another that returns Kij . It then returns the solution f at the quadrature points. It also returns the quadrature points and weights. These are used by the second routine fredin to carry out the Nystrom interpolation of equation (18.1.3and retur

19、n the value of f at any point in the interval a, b . visit website or call 1-800-872-7423 (North America only, readable files (including this one to any server c o r send email to tradecup.cam.ac.uk (outside North America.omputer, is strictly prohibited. To order Numerical Recipes books, d iskettes,

20、 or CDROMsPermission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine-Copyright (C 1988-1992 by Cambridge University Press. P rograms Copyright (C 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIP

21、ES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-518.1Fredholm Equations of the Second Kind 793#include"nrutil.h"void fred2(intn, float a, float b, float t,float f,float w,float (*g(float,float (*ak(float,floatSolves a linear Fredholm equation of the second kind. On input, a and

22、b are the limits of integration, and n is the number of points to use in the Gaussian quadrature. g and ak are user-supplied external functions that respectively return g (t and K(t, s . The routine returns arrays t1.nand f1.ncontaining the abscissas tarray w1.ni of the Gaussian quadrature and theso

23、lution f at these abscissas. Also returned is the of Gaussian weights for use with the Nystrom interpolation routine fredin .void gauleg(floatx1, float x2, float x,float w,int n;void lubksb(float*a,int n, int *indx,float b;void ludcmp(float*a,int n, int *indx,float *d;int i,j,*indx;float d,*omk;indx

24、=ivector(1,n;omk=matrix(1,n,1,n;gauleg(a,b,t,w,n;Replace gauleg with another routine if not using for (i=1;i<=n;i+Gauss-Legendrefor (j=1;j<=n;j+Form 1K quadrature.omkij=(float(i=j-(*ak(ti,tj*wj;fi=(*g(ti;ludcmp(omk,n,indx,&d;Solve linear equations.lubksb(omk,n,indx,f;free_matrix(omk,1,n,1,

25、n;free_ivector(indx,1,n;float fredin(floatx, int n, float a, float b, float t,float f,float w,float (*g(float,float (*ak(float,floatGiven arrays t1.nand w1.ncontaining the abscissas and weights of the Gaussian quadrature, and given the solution array f1.nfrom fred2, this function returns the value o

26、f f at x using the Nystrom interpolation formula. On input, a and b are the limits of integration, and n is the number of points used in the Gaussian quadrature. g and ak are user-supplied external functions that respectively return g (t and K(t, s .int i;float sum=0.0;for (i=1;i<=n;i+sum +=(*ak(

27、x,ti*wi*fi;return (*g(x+sum;One disadvantage of a method based on Gaussian quadrature is that there is no simple way to obtain an estimate of the error in the result. The best practical method is to increase N by 50%,say, and treat the difference between the two estimates as a conservative estimate

28、of the error in the result obtained with the larger value of N .Turn now to solutions of the homogeneous equation. If we set =1/and g =0, then equation (18.1.6becomes a standard eigenvalue equationK ·f =f (18.1.7which we can solve with any convenient matrix eigenvalue routine (seeChapter11. Not

29、e that if our original problem had a symmetric kernel, then the matrix K visit website or call 1-800-872-7423 (North America only, readable files (including this one to any server c o r send email to tradecup.cam.ac.uk (outside North America.omputer, is strictly prohibited. To order Numerical Recipe

30、s books, d iskettes, or CDROMsPermission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine-Copyright (C 1988-1992 by Cambridge University Press. P rograms Copyright (C 1988-1992 by Numerical Recipes Software. Sample page

31、from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5794Chapter 18. Integral Equations and Inverse Theory is symmetric. However,rules, the matrix K since the weights w j are not equal for most quadrature(equation18.1.5 is not symmetric. The matrix eigenvalueproblem is much

32、 easier for symmetric matrices, and so we should restore the symmetry if possible. Provided the weights are positive (whichthey are for Gaussian quadrature, weD 1/2=diag (can denethe diagonal matrix D =diag (w j and its square root,w j . Then equation (18.1.7becomesK ·D ·f =fMultiplying by

33、 D 1/2, we getD 1/2·K ·D 1/2 ·h =h (18.1.8where h =D 1/2problem. ·f . Equation (18.1.8is now in the form of a symmetric eigenvalueSolution of equations (18.1.7or (18.1.8will in general give N eigenvalues, where N is the number of quadrature points used. For square-integrable kern

34、els, these will provide good approximations to the lowest N eigenvalues of the integral equation. Kernels of niterank (alsocalled degenerate or separable kernels have only a nitenumber of nonzero eigenvalues (possiblynone. You can diagnose this situation by a cluster of eigenvalues that are zero to

35、machine precision. The number of nonzero eigenvalues will stay constant as you increase N to improve their accuracy. Some care is required here:A nondegenerate kernel can have an innitenumber of eigenvalues that have an accumulation point at =0. You distinguish the two cases by the behavior of the solution as you increase N . If you suspect a degenerate kernel, you will usually be able to solve the problem by analytic techniques described in all the textbooks.CITED REFERENCES AND FURTHER READING:Delves, L.M., and

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論