正在加载图片...
18.3 Integral Equations with Singular Kernels 801 Worked Example:A Diagonally Singular Kernel As a particular example,consider the integral equation f(x)+ K(x,y)f(y)dy sin x (18.3.13) with the (arbitrarily chosen)nasty kernel K(x,)=cosxcosy× ∫-ln(e-)y<x (18.3.14) Ivy-t y≥x which has a logarithmic singularity on the left of the diagonal,combined with a square-root discontinuity on the right. The first step is to do (analytically,in this case)the required moment integrals over the singular part of the kernel,equation (18.3.12).Since these integrals are done at a fixed value of x,we can use as the lower limit.For any specified value of y,the required indefinite integral is then either Fm(y:) s"(s-)112ds= (x+t)mt2dt ify>x (18.3.15) from NUMERICAL RECIPES I 18881892 (Nort server 令 Fm(y;x)=- s"M In(x-s)ds (x-t)"Intdt ify<x (18.3.16) America computer, make one paper University Press. THE (where a change of variable has been made in the second equality in each case).Doing these integrals analytically (actually,we used a symbolic integration package!),we package the ART resulting formulas in the following routine.Note that (j+1)returns F(y;). 9 Programs #include <math.h> extern double x; Defined in quadmx. 兰 void kermom(double w,double y,int m) Returns in w[1..m]the first m indefinite-integral moments of one row of the singular part of the kernel.(For this example,m is hard-wired to be 4.)The input variable y labels the column, while the global variable x is the row.We can take x as the lower limit of integration.Thus, we return the moment integrals either purely to the left or purely to the right of the diagonal. double d,df,clog,x2,x3,x4,y2; if (y >=x){ d=y-x; df=2.0*sgrt(d)*d; 和6 1988-1992 by Numerical Recipes OF SCIENTIFIC COMPUTING (ISBN 0-521 w[1]=df/3.0; Further reproduction,or -431085 w[2]=df*(x/3.0+d/5.0); w[3]=df*((x/3.0+0.4*d)*x+d*d/7.0): w[4]=df*(((x/3.0+0.6*d)*x+3.0*d*d/7.0)*x+d*d*d/9.0); else x3=(x2=x*x)*x; X4=X2*X2; y2=y*y; (outside North America). Software. d=x-yi w[1]=d*((c1og=1og(d))-1.0); w[2]=-0.25*(3.0*x+y-2.0*c1og*(x+y)*d; w[3]=(-11.0*x3+y*(6.0*x2+y*(3.0*x+2.0*y)) +6.0*c1og*(x3-y*y2))/18.0; w[4]=(-25.0*x4+y*(12.0*x3+y*(6.0*x2+y* (4.0*x+3.0*y))+12.0*c1og*(x4-(y2*y2))/48.0; 218.3 Integral Equations with Singular Kernels 801 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). Worked Example: A Diagonally Singular Kernel As a particular example, consider the integral equation f(x) +  π 0 K(x, y)f(y)dy = sin x (18.3.13) with the (arbitrarily chosen) nasty kernel K(x, y) = cos x cos y ×  − √ ln(x − y) y<x y − x y ≥ x (18.3.14) which has a logarithmic singularity on the left of the diagonal, combined with a square-root discontinuity on the right. The first step is to do (analytically, in this case) the required moment integrals over the singular part of the kernel, equation (18.3.12). Since these integrals are done at a fixed value of x, we can use x as the lower limit. For any specified value of y, the required indefinite integral is then either Fm(y; x) =  y x s m(s − x) 1/2 ds =  y−x 0 (x + t) mt 1/2 dt if y>x (18.3.15) or Fm(y; x) = −  y x sm ln(x − s)ds =  x−y 0 (x − t) m ln t dt if y<x (18.3.16) (where a change of variable has been made in the second equality in each case). Doing these integrals analytically (actually, we used a symbolic integration package!), we package the resulting formulas in the following routine. Note that w(j + 1) returns Fj (y; x). #include <math.h> extern double x; Defined in quadmx. void kermom(double w[], double y, int m) Returns in w[1..m] the first m indefinite-integral moments of one row of the singular part of the kernel. (For this example, m is hard-wired to be 4.) The input variable y labels the column, while the global variable x is the row. We can take x as the lower limit of integration. Thus, we return the moment integrals either purely to the left or purely to the right of the diagonal. { double d,df,clog,x2,x3,x4,y2; if (y >= x) { d=y-x; df=2.0*sqrt(d)*d; w[1]=df/3.0; w[2]=df*(x/3.0+d/5.0); w[3]=df*((x/3.0 + 0.4*d)*x + d*d/7.0); w[4]=df*(((x/3.0 + 0.6*d)*x + 3.0*d*d/7.0)*x+d*d*d/9.0); } else { x3=(x2=x*x)*x; x4=x2*x2; y2=y*y; d=x-y; w[1]=d*((clog=log(d))-1.0); w[2] = -0.25*(3.0*x+y-2.0*clog*(x+y))*d; w[3]=(-11.0*x3+y*(6.0*x2+y*(3.0*x+2.0*y)) +6.0*clog*(x3-y*y2))/18.0; w[4]=(-25.0*x4+y*(12.0*x3+y*(6.0*x2+y* (4.0*x+3.0*y)))+12.0*clog*(x4-(y2*y2)))/48.0; } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有