Skip to main content
Log in

Computing Fresnel integrals via modified trapezium rules

  • Published:
Numerische Mathematik Aims and scope Submit manuscript

Abstract

In this paper we propose methods for computing Fresnel integrals based on truncated trapezium rule approximations to integrals on the real line, these trapezium rules modified to take into account poles of the integrand near the real axis. Our starting point is a method for computation of the error function of complex argument due to Matta and Reichel (J Math Phys 34:298–307, 1956) and Hunter and Regan (Math Comp 26:539–541, 1972). We construct approximations which we prove are exponentially convergent as a function of \(N\), the number of quadrature points, obtaining explicit error bounds which show that accuracies of \(10^{-15}\) uniformly on the real line are achieved with \(N=12\), this confirmed by computations. The approximations we obtain are attractive, additionally, in that they maintain small relative errors for small and large argument, are analytic on the real axis (echoing the analyticity of the Fresnel integrals), and are straightforward to implement.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Digital Library of Mathematical Functions. National Institute of Standards and Technology, from http://dlmf.nist.gov/, release date: 2010-05-07 (2010)

  2. Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions. Dover, New York (1964)

    MATH  Google Scholar 

  3. Arens, T., Sandfort, K., Schmitt, S., Lechleiter, A.: Analysing Ewald’s method for the evaluation of Green’s functions for periodic media. IMA J. Appl. Math. 78, 405–431 (2013)

    Article  MATH  MathSciNet  Google Scholar 

  4. Bialecki, B.: A modified sinc quadrature rule for functions with poles near the arc of integration. BIT 29, 464–476 (1989)

    Article  MATH  MathSciNet  Google Scholar 

  5. Bowman, J.J., Senior, T.B.A., Uslenghi, P.L.E.: Electromagnetic and Acoustic Scattering by Simple Shapes. North-Holland, Amsterdam (1969)

    Google Scholar 

  6. Chandler-Wilde, S.N., Hewett, D.P., Langdon, S., Twigger, A.: A high frequency boundary element method for scattering by a class of nonconvex obstacles. University of Reading, Department of Mathematics and Statistics. Preprint MPS-2012-04 Numer. Math. (2012) (to appear)

  7. Chandler-Wilde, S.N., Hothersall, D.C.: Efficient calculation of the Green function for acoustic propagation above a homogeneous impedance plane. J. Sound Vib. 180, 705–724 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  8. Chiarella, C., Reichel, A.: On the evaluation of integrals related to the error function. Math. Comp. 22, 137–143 (1968)

    Article  MATH  MathSciNet  Google Scholar 

  9. Cody, W.J.: Chebyshev approximations for the Fresnel integrals, Math. Comp. 22, 450–453 + s1–s18 (1968)

    Google Scholar 

  10. Crouch, E.A.C., Spiegelman, D.: The evaluation of integrals of the form \(\int _{-\infty }^{+\infty } f(t)\exp (-t^2) dt\): application to logistic-normal models. J. Am. Stat. Assoc. 85, 464–469 (1990)

    MATH  MathSciNet  Google Scholar 

  11. Durán, M., Hein, R., Nédélec, J.-C.: Computing numerically the Green’s function of the half-plane Helmholtz operator with impedance boundary conditions. Numer. Math. 107, 295–314 (2007)

    Article  MATH  MathSciNet  Google Scholar 

  12. Fettis, H.E., Caslin, J.C., Cramer, K.R.: Complex zeros of the error function and of the complementary error function. Math. Comp. 27, 401–407 (1973)

    Article  MATH  MathSciNet  Google Scholar 

  13. Gautschi, W.: Efficient computation of the complex error function. SIAM J. Numer. Anal. 7, 187–198 (1970)

    Article  MATH  MathSciNet  Google Scholar 

  14. Goodwin, E.T.: The evaluation of integrals of the form \(\int _{-\infty }^ {\infty } f(x)e^{{-x}^2} dx\). Proc. Camb. Phil. Soc. 45, 241–245 (1949)

  15. Heald, M.A.: Rational approximations for the Fresnel integrals. Math. Comp. 44, 459–461 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  16. Hunter, D.B., Regan, T.: A note on evaluation of the complementary error function. Math. Comp. 26, 539–541 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  17. Hunter, D.B.: The numerical evaluation of definite integrals affected by singularities near the interval of integration. In: Numerical Integration, NATO Advanced Science Institutes Series C Mathematical and Physical Sciences, vol 357, pp. 111–120. Kluwer Academy, Dordrecht (1992)

  18. Kythe, P.M., Schäferkotter, M.R.: Handbook of Computational Methods for Integration. Chapman and Hall/CRC, Boca Raton (2005)

    MATH  Google Scholar 

  19. La Porte, S.: Modified Trapezium Rule Methods for the Effcient Evaluation of Green’s Functions in Acoustics. PhD Thesis, Brunel University, UK (2007)

  20. Matta, F., Reichel, A.: Uniform computation of the error function and other related functions. J. Math. Phys. 34, 298–307 (1956)

    Google Scholar 

  21. Mori, M.: A method for evaluation of the error function of real and complex variable with high relative accuracy. Publ. RIMS Kyoto Univ. 19, 1081–1094 (1983)

    Article  MATH  Google Scholar 

  22. O’Neil, M., Greengard, L., Pataki, A.: On the efficient representation of the half-space impedance Green’s function for the Helmholtz equation. Wave Motion 51, 1–13 (2014)

    Google Scholar 

  23. Poppe, G.P., Wijers, C.M.: More efficient computation of the complex error function. ACM Trans. Math. Softw. 16, 38–46 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  24. Poppe, G.P., Wijers, C.M.: Algorithm 680: evaluation of the complex error functon. ACM Trans. Math. Softw. 16, 47–47 (1990)

    Article  MATH  MathSciNet  Google Scholar 

  25. Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes 3rd Edition: The Art of Scientific Computing. Cambridge University Press (2007)

  26. Rudin, W.: Real and Complex Analysis, 3rd edn. Mc-Graw Hill, Madison (1987)

  27. Salzer, H.: Formulas for computing the error function of a complex variable. MTAC 5, 67–70 (1951)

    MATH  MathSciNet  Google Scholar 

  28. Strand, O.: A method for the computation of the error function of a complex variable. Math. Comp. 19, 127–129 (1965)

    Article  MATH  MathSciNet  Google Scholar 

  29. Turing, A.M.: A method for the calculation of the zeta-function. Proc. Lond. Math. Soc. s2–48, 180–197 (1945)

    Google Scholar 

  30. Weideman, J.A.C.: Computation of the complex error function. SIAM J. Numer. Anal. 5, 1497–1518 (1994)

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgments

This paper is dedicated to David Hunter, formerly of the University of Bradford, UK, who celebrated his 80th birthday in April 2013. Sadly David passed away on 15 August 2013. David was a kind and gentle man and a fine mathematician and teacher and the second author acknowledges his gratitude for David’s contribution to his education as a numerical analyst at Bradford in the 80s. We also acknowledge the very helpful and thorough comments of the two anonymous referees.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Simon N. Chandler-Wilde.

Additional information

Dedicated to David Hunter on the occasion of his 80th birthday.

Appendix: bounds on \(\mathrm {erfc}\)

Appendix: bounds on \(\mathrm {erfc}\)

In this appendix we prove Theorem 4 as a corollary of bounds on \(\mathrm {erfc}\) in the right hand complex plane contained in Theorem 6 below. In particular (51) follows immediately from (4) and the first bound in (73), while (52) follows from (4), (20), and the second of the bounds (73). The bounds in Theorem 6 are well-known in the case \(z\ge 0\) [1, (7.8.2–7.8.3)], and the second bound (equivalent by (4) to the bound \(|w(z)| \le 1\) for \(\mathrm {Im}(z) \ge 0\)) is recently proved by an alternative argument on p. 413 of [3].

Theorem 6

For \(z=x+{\mathrm {i}}y\) with \(x\ge 0\), \(y\in \mathbb {R}\), we have that

$$\begin{aligned} |\mathrm {erfc}(z)|\ge \frac{{\mathrm {e}}^{y^2-x^2}}{\sqrt{(1+\sqrt{\pi }\,x)^2 + \pi y^2}}\ge \frac{{\mathrm {e}}^{y^2-x^2}}{1+\sqrt{\pi }\,|z|} \; \text{ and } \; |\mathrm {erfc}(z)| \le {\mathrm {e}}^{y^2-x^2}. \end{aligned}$$
(73)

Proof

The first of the bounds (73) is equivalent to the bound

$$\begin{aligned} |\mathcal {G}(z)| \ge 1, \quad \text{ for } \; \mathrm {Re}(z) \ge 0, \end{aligned}$$
(74)

where \(\mathcal {G}(z) = (1+\sqrt{\pi }\, z) {\mathrm {e}}^{z^2}\mathrm {erfc}(z)\) is an entire function which has the properties that \(\mathcal {G}(0)=1\) and \(\mathcal {G}(z)\rightarrow 1\) as \(|z|\rightarrow \infty \) in the right hand plane, uniformly in \(\arg (z)\) [2, (7.1.23)]. (These properties imply that the first of the bounds (73) is sharp for \(z=0\) and in the limit \(|z|\rightarrow \infty \).) We will show (74) by showing that (74) holds for all \(z\) in the right hand plane if it holds on the imaginary axis, and then showing that (74) holds on the imaginary axis.

To see that it is enough to prove that (74) holds for imaginary \(z\), observe that, since \(\mathrm {erfc}(z)\) has no zeros in the right hand complex plane [12, 28] [or on the imaginary axis where \({\mathrm {Re}}(\mathrm {erfc}(z)) = 1\), see (76)], the function \(\mathcal H(z) := 1/\mathcal {G}(z)\) is also analytic in the right hand complex plane and is continuous up to the imaginary axis. Moreover, \(\mathcal {H}(z)\) is bounded in the right hand plane since, as observed above, \(\mathcal {G}(z)\rightarrow 1\) as \(|z|\rightarrow \infty \) in the right hand plane (uniformly in \(\arg (z)\)). Since \(\mathcal {H}(z)\) is bounded in the right hand plane, it follows from the maximum principle that

$$\begin{aligned} \sup _{\mathrm {Re}(z) \ge 0} |\mathcal {H}(z)| = \sup _{\mathrm {Re}(z) = 0} |\mathcal {H}(z)|. \end{aligned}$$
(75)

To see this, note that this equality holds for \(\mathcal {H}_\alpha (z) := 1/\mathcal {G}_\alpha (z)\), with \(\alpha >1\), where \(\mathcal {G}_\alpha (z) := (1+\sqrt{\pi }\, z)^\alpha {\mathrm {e}}^{z^2}\mathrm {erfc}(z)\) with the branch cut taken as the negative real axis. This is clear since \(\mathcal {H}_\alpha (z)\) is analytic in the right half-plane, continuous up to the imaginary axis, and vanishes at infinity, so that the standard maximum principle implies that \(\mathcal {H}_\alpha (z)\) takes its maximum value on the imaginary axis. But then (75) follows by taking the limit \(\alpha \rightarrow 1^+\).

In view of (75), to establish (74) we need only show that it holds for \(z={\mathrm {i}}y\) with \(y\in \mathbb {R}\); indeed, establishing this bound for \(y\ge 0\) is sufficient since \(\mathrm {erfc}(-{\mathrm {i}}y)=\overline{\mathrm {erfc}({\mathrm {i}}y)}\). Now, for \(z={\mathrm {i}}y\) with \(y\ge 0\), using [1, (7.5.1)], which implies

$$\begin{aligned} {\mathrm {e}}^{z^2}\mathrm {erfc}(z)= {\mathrm {e}}^{-y^2}\left( 1 -\frac{2{\mathrm {i}}}{\sqrt{\pi }}\int _0^y {\mathrm {e}}^{t^2} \mathrm {d}t\right) \end{aligned}$$
(76)

we see that

$$\begin{aligned} |\mathcal {G}({\mathrm {i}}y)|^2&= (1+\pi y^2) {\mathrm {e}}^{-2y^2}\left( 1 + \frac{4}{\pi }\left( \int _0^y {\mathrm {e}}^{t^2} \mathrm {d}t\right) ^2\right) \\&\ge (1+\pi y^2) {\mathrm {e}}^{-2y^2}\left( 1 +\frac{4}{\pi }y^2\right) \nonumber \\&= \left( 1+ \left( \pi + \frac{4}{\pi }\right) y^2 + 4 y^4\right) {\mathrm {e}}^{-2y^2}.\nonumber \end{aligned}$$
(77)

It is an easy calculus exercise to show the right hand side takes its minimum value on \([0,1]\) at either 0 or 1, and hence that \(|\mathcal {G}({\mathrm {i}}y)| \ge 1\), for \(0\le y \le 1\), since \(|\mathcal {G}({\mathrm {i}})|^2 > (5+\pi )/{\mathrm {e}}^2>8/2.8^2>1\). Further, (77) implies that

$$\begin{aligned} |\mathcal {G}({\mathrm {i}}y)| \ge 2 y {\mathrm {e}}^{-y^2}\int _0^y {\mathrm {e}}^{t^2} \mathrm {d}t \end{aligned}$$

and, for \(y\ge 1\), it follows on integrating by parts that

$$\begin{aligned} \int _0^y {\mathrm {e}}^{t^2} \mathrm {d}t = \int _0^1 {\mathrm {e}}^{t^2} \mathrm {d}t + \int _1^y e^{t^2} \mathrm {d}t&= \int _0^1{\mathrm {e}}^{t^2}\mathrm {d}t + \frac{{\mathrm {e}}^{y^2}}{2y} - \frac{{\mathrm {e}}}{2} + \int _1^y \frac{{\mathrm {e}}^{t^2}}{2t^2}\mathrm {d}t\\&> \int _0^1(1+t^2 + \tfrac{1}{2}t^4)\mathrm {d}t + \frac{ {\mathrm {e}}^{y^2}}{2y} - \frac{{\mathrm {e}}}{2} > \frac{{\mathrm {e}}^{y^2}}{2y}, \end{aligned}$$

since \({\mathrm {e}}< 2.8 < 2(1+1/3+1/10)\). Thus \(|\mathcal {G}({\mathrm {i}}y)|\ge 1\) on \([1,\infty )\) and the bound (74) is proved.

Similarly,

$$\begin{aligned} \sup _{\mathrm {Re}(z) \ge 0} |{\mathrm {e}}^{-z^2}\mathrm {erfc}(z)| = \sup _{\mathrm {Re}(z) = 0} |{\mathrm {e}}^{-z^2}\mathrm {erfc}(z)| = \sup _{y\ge 0} |{\mathrm {e}}^{-y^2}\mathrm {erfc}({\mathrm {i}}y)|. \end{aligned}$$
(78)

Further, (76) implies that, for \(y\ge 0\),

$$\begin{aligned} |\mathrm {erfc}({\mathrm {i}}y)|^2-1&= \frac{4}{\pi }\left( \int _0^y {\mathrm {e}}^{t^2} \mathrm {d}t\right) ^2 = \frac{4y^2}{\pi }\left( \sum _{n=0}^\infty \frac{y^{2n}}{n!(2n+1)}\right) ^2 \\&= \frac{2y^2}{\pi } \sum _{n=0}^\infty a_n y^{2n} \le \frac{2}{\pi }\left( {\mathrm {e}}^{2y^2}-1\right) \end{aligned}$$

where

$$\begin{aligned} a_n \!=\! \sum _{m=0}^n \frac{2}{m!(n-m)!(2m+1)(2(n-m)+1)} \!\le \! \frac{2}{n+1}\sum _{m=0}^n\frac{1}{m!(n-m)!} \!=\! \frac{2^{n+1}}{(n+1)!}. \end{aligned}$$

Thus, for \(y\ge 0\),

$$\begin{aligned} |{\mathrm {e}}^{-y^2}\mathrm {erfc}({\mathrm {i}}y)|^2 \le \frac{2}{\pi } + \left( 1-\frac{2}{\pi }\right) {\mathrm {e}}^{-2y^2} \le 1. \end{aligned}$$

Combining this with (78) we see that the second of the bounds (73) holds. \(\square \)

Rights and permissions

Reprints and permissions

About this article

Cite this article

Alazah, M., Chandler-Wilde, S.N. & La Porte, S. Computing Fresnel integrals via modified trapezium rules. Numer. Math. 128, 635–661 (2014). https://doi.org/10.1007/s00211-014-0627-z

Download citation

  • Received:

  • Revised:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00211-014-0627-z

Mathematics Subject Classification (2000)

Navigation