Abstract
We develop efficient numerical integration methods for computing an integral whose integrand is a product of a smooth function and the Gaussian function with a small standard deviation. Traditional numerical integration methods applied to the integral normally lead to poor accuracy due to the rapid change in high order derivatives of its integrand when the standard deviation is small. The proposed quadrature schemes are based on graded meshes designed according to the standard deviation so that the quadrature errors on the resulting subintervals are approximately equal. The integral in each subinterval is then computed by considering the Gaussian function as a weight function and interpolating the smooth factor of the integrand at the Chebyshev points of the first kind. For a finite order differentiable factor, we design a quadrature scheme having accuracy of a polynomial order and for an infinitely differentiable factor of the integrand, we design a quadrature scheme having accuracy of an exponential order. Numerical results are presented to confirm the accuracy of these proposed quadrature schemes.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
We consider in this paper developing efficient quadrature methods for an integral whose integrand is a product of a smooth function and the Gaussian function with a small standard deviation. Gaussian functions [2, 15, 23, 29, 30] arise in many areas of mathematics, physics and engineering, especially in the fields of statistics, probability theory [9, 10], image and signal processing [2, 11, 14, 20, 31]. Design of numerical quadrature formulas for the integral is important for numerical analysis for the aforementioned applications. When the standard deviation is small, high order derivatives of the Gaussian function oscillate dramatically near the position of the peak of the curve of the Gaussian function, and decay rapidly away from that position. Standard numerical quadratures of such an integral normally lead to poor accuracy due to the rapid change in the derivatives of its integrand when the standard deviation is small. We identified this computational challenge while we worked on a project of image processing whose results were presented in [20]. Computing integrals of this type requires special effort.
Quadrature schemes that we design for computing the integral is based on graded meshes constructed according to the standard deviation so that the resulting quadrature errors on the subintervals are approximately equal. The integral in each of the subintervals is then computed by considering the Gaussian function as a weight function and interpolating the smooth factor of the integrand at the Chebyshev points of the first kind. We establish accuracy of exponential and polynomial orders for the proposed quadrature schemes according to the regularity of the smooth factor of the integrand. We present numerical results to confirm the accuracy estimates.
In the literature, quadrature formulas for the integrals involved the Gaussian function were designed according to properties of the Gaussian function. The well-known Gauss–Hermite quadrature [1, 8] in numerical analysis was designed for the integrals with the Gaussian weight in an unbounded integration interval. The weights of the quadrature formulas can be computed exactly, which are integrals with the integrand defined by a product of a polynomial and the Gaussian function. We call these integrals the moments, and their computation in a bounded integration interval can be found in [27]. A numerical quadrature for higher dimensional integration with the Gaussian weight was developed in [19]. However, quadrature formulas for integrals involved the Gaussian function are inadequate in the literature for the case when the standard deviation of the Gaussian function is small. Such integrals require careful numerical treatment, since higher order derivatives of the Gaussian function have severe oscillation with large magnitude.
The purpose of this paper is to design efficient quadrature formulas for the integrals involved the Gaussian function for the case when the standard deviation is small. Motivated by the subdivision in nonuniform fashion for the singular integrals [3, 16, 25] and oscillatory integrals [21, 22], we shall divide the integration interval into subintervals according to the standard deviation of the Gaussian function, and approximate the integrals in each of the resulting subintervals by replacing the smooth factor of integrand by an interpolating polynomial. The interpolation nodes are chosen as the Chebyshev points of the first kind [5, 8, 26, 32]. The weights of the quadrature formulas are computed by utilizing the error function [1, 12, 18, 29]. The accuracy of these quadrature formulas increases as the standard deviation of the Gaussian function tends to zero and the computational complexity is independent of the standard deviation of the Gaussian function.
This paper is organized in six sections. We discuss in Sect. 2 properties of the Gaussian function to motivate the numerical integration for the integrals involved the Gaussian function with a small standard deviation. In Sect. 3, we establish a basic quadrature formula for computing the integrals involved the Gaussian function in a reference integration interval. We then propose in Sect. 4 two composite quadrature formulas based on dividing the integration interval into subintervals according to the standard deviation of the Gaussian function, and using the formula developed in the previous section to calculate the integrals in the subintervals. Orders of accuracy for the proposed quadrature formulas are presented in this section. A computation method of the weights for the quadrature formulas is provided in Sect. 5. We show in Sect. 6 numerical results to verify the theoretical accuracy estimate of the proposed quadrature formulas.
2 Integrals Involved the Gaussian Function
In this section, we first discuss intrinsic difficulties in numerical integration by using traditional quadrature schemes for an integral whose integrand is a product of a smooth function and the Gaussian function with a small standard deviation. This motivates us to design graded meshes of the integration interval according to the standard deviation of the Gaussian function.
We begin with recalling the definition of the Gaussian function. For three fixed real numbers \(c_0\), \(c_1\) and \(c_2\), a Gaussian function is of the form
where \(c_0>0\) is called the standard deviation, \(c_1>0\) is the maximum of G, and \(c_2\) is the position of the maximum of G occurring. The graph of G is a symmetric bell shaped curve. The parameter \(c_0\) controls the width of the bell, and \(c_1\) and \(c_2\) are respectively the height and the position of the peak of the bell. The Gaussian function with \(c_1:=1/(c_0\sqrt{2\pi })\) is the probability density function of a normally distributed random variable with expected value \(c_2\) and variance \(c_0^2\). Without loss of generality, we assume that \(c_1=1\). The behaviours of G and its derivatives are influenced by the standard deviation and the center of the peak in the graph of G. We simplify the parameters of G by
where \(\alpha >0\) and \(\beta \) is a real number. We let \(G_\alpha :=G_{\alpha ,0}\). Clearly, \(\alpha :=1/(\sqrt{2}c_0)\) is the \(1/\sqrt{2}\)-multiple of the reciprocal of the standard deviation of the Gaussian function. A small standard deviation corresponds to a large parameter \(\alpha \). Therefore, in the remaining part of this paper, we shall consider the integral involved \(G_{\alpha ,\beta }\) for a large \(\alpha \). Specifically, we shall study numerical integration for the integral having the form
where \(I:=[0,1]\), \(\alpha \gg 1\) and \(f\in C(I)\) is independent of \(\alpha \). The integrals involved \(G_{\alpha ,\beta }\) with \(\beta \ne 0\) may be treated by first splitting the integral interval into two subintervals, on each of which \(\beta \) is an end point, and then changing the integrals defined on the subintervals into the integrals defined on I having the form (2.2). The quadrature methods to be proposed for (2.2) can extend straightforward to the general case.
We first review properties of \(G_\alpha \) and its derivatives for \(\alpha >1\). Let \(\mathbb {N}:=\left\{ 1, 2,\ldots \right\} \) and \(\mathbb {N}_0:= \{0\}\cup \mathbb {N}\). For \(n\in \mathbb {N}_0\), we denote by \(H_n\) the Hermite polynomials [1]. For \(m\in \mathbb {N}_0\), the m-th derivative of \(G_\alpha \) is given by
We plot in Figs. 1, 2 and 3 the graphs of \(G^{(m)}_\alpha \) with \(\alpha =50\) for different m in the interval \([-\,0.1,0.1]\), with \(m=0\), 10, 15, 30, 35 and 50. From the graph of \(G_{\alpha }\) shown in Fig. 1a, we see that it looks like a bell, with the center of the bell being zero and the height of the bell being one. However, in Figs. 1b, 2 and 3, the graph of the derivatives of \(G_{\alpha }\) oscillates rapidly near zero when m becomes large and the maximum of the derivatives increases fast as m gets large. For the special case that \(m\in \mathbb {N}_0\) is even, by introducing the Hermite number [17] given by
we observe that the maximum of the derivatives of \(G_\alpha \) grows in an exponential order of \(\alpha \), since \(G^{(m)}_\alpha (0)=\alpha ^mH_m(0)\). Meanwhile, the tail of the graph of the derivatives of \(G_{\alpha }\) falls off quickly on the both sides and approaches the x-axis. The high order derivatives of the Gaussian function behave like oscillatory functions near the position of the peak of its curve when \(\alpha \) is large.
We now discuss difficulties in computing the integral (2.2) by using a traditional quadrature scheme. As an example, we calculate the integral \(\mathcal {I}_\alpha [f]\) with \(f(x):=1\), \(x\in I\), for different choices of \(\alpha \), by employing the composite trapezoidal rule with n equidistant nodes. One might expect that the trapezoidal rule would produce satisfactory numerical results since the Gaussian function is infinitely differentiable. However, we obtain rather disappointing numerical results. We plot in Fig. 4 the absolute error (AE) of the computed integral value for (a) \(n=100\) and (b) \(n=1000\). From Fig. 4, we see that for a fixed number of quadrature nodes, the accuracy of the quadrature formula decreases as \(\alpha \) increases. We then plot in Fig. 5 the absolute error of the computed integral value with fixed \(\alpha \) for (a) \(\alpha =100\), (b) \(\alpha =1000\) and (c) \(\alpha =10000\). We observe that in order to have certain order of accuracy, the number of quadrature nodes should increase proportional to the value of \(\alpha \).
The numerical phenomena shown in the above numerical example can be well explained by the error representation of the quadrature formula. We now recall the error of the composite quadratures \(\mathcal {I}_n^m[G_\alpha ]\), for computing \(\mathcal {I}_\alpha [f]\), where we subdivide I into n equal subintervals and use the closed Newton–Cotes formula with \(m+1\) quadrature nodes to calculate the integrals defined on each subinterval. From the error of the Newton–Cotes formula [13] together with (2.3), we see that there exists \(\xi \in I\) such that
where \(c_m\) are defined by
with
We introduce a complex number \(q_m:=(-\mathrm{i})^m2^m/\sqrt{\pi }\) and a complex-valued function by
where \(\mathrm{i}\) denotes the imaginary unit, see [1]. We then write
By the definition of \(G_\alpha \), we have that
Substituting the equation above into (2.4) yields
The error formula above shows that for the quadrature rule to converge, we have to choose n larger than \(\alpha \). This will result in large computation costs to compute the integral when \(\alpha \) is large. This explains the reason why the trapezoidal rule applied to computing the integral of the Gaussian function does not converge when \(\alpha \) is larger than n.
We conclude from the analysis above that using traditional quadrature formulas to calculate integrals involved the Gaussian function becomes expensive to obtain satisfactory numerical results if \(\alpha \) is large. One reason is that the maximum (which occurs near zero) of the high order derivative of \(G_\alpha \) is large. We are required to add more number of quadrature nodes in order to improve accuracy of the numerical integration. However, the values of the high order derivatives of \(G_\alpha \) decay rapidly when moving away from zero and have high oscillation near zero. Clearly, adding more quadrature nodes uniformly in the integral interval increases computational costs. It is therefore important to utilize the property of the Gaussian function to design efficient quadrature formulas for computing these integrals.
To close this section, we describe the main idea to be used in this paper in designing efficient quadrature formulas for computing (2.2). Inspired by the quadrature formulas proposed in [3, 4, 16, 25] for weakly singular integrals and in [21, 22] for highly oscillatory integrals, we shall develop quadrature formulas for (2.2) as follows. We fix a positive integer n, independent of the parameter \(\alpha \). Design a graded mesh of n subintervals according to \(\alpha \). Choose a basic quadrature formula to be used for integration on each of the subintervals associated with the graded mesh. The graded mesh is designed in the way that the resulting integration errors on all the subintervals are approximately equal. We shall show that the accuracy of the proposed quadrature formulas for (2.2) increases as \(\alpha \) increases and the number of functional evaluations of the integrand used in the quadrature formula is independent of \(\alpha \).
In the remaining sections of this paper, we shall complete the following three tasks:
-
(i)
Propose a quadrature formula for integrals involved \(G_{\alpha ,\beta }\) on the interval \([-\,1,1]\), where the Chebyshev points of the first kind are used as the quadrature nodes. This formula will serve as a basic quadrature formula for developing composite formulas for computing the integrals (2.2).
-
(ii)
Design a partition with a fixed number n of subintervals of the integral interval I, with the break-points of the partition being distributed according to both the parameter \(\alpha \) and the number n. Develop composite quadrature formulas for computing the integrals (2.2), one with accuracy of a polynomial order for a smooth factor f having differentiability of a finite order, and another with accuracy of an exponential order for f having infinite differentiability.
-
(iii)
Develop a method for computing exactly the moments of the basic quadrature formula with the help of the error function.
3 A Basic Quadrature Formula
We describe in this section a basic quadrature formula for computing the integral
with \(\hat{I}:=[-1,1]\), where \(f\in C(\hat{I})\) is independent of \(\alpha \) and \(G_{\alpha ,\beta }\) is defined by (2.1) for \(\alpha >1\). The quadrature formula is designed by interpolating f at the Chebyshev points of the first kind [5, 8, 26, 32] and calculating the weights of the resulting formula exactly. The advantage of interpolating at the Chebyshev points is to avoid the well-known Runge phenomenon. The quadrature formula will be used as a basic rule to design the composite quadrature formula for the integral \(\mathcal {I}_\alpha [f]\) defined by (2.2) in the following section.
The basic numerical quadrature formula for computing the integral (3.1) is derived by replacing the function f in the integral by its Lagrange interpolation polynomial. For a fixed positive integer \(m\in \mathbb {N}\), we denote by \(p_m\) the Lagrange interpolation polynomial of degree m, which interpolates f at the Chebyshev points of the first kind
By replacing the function f in the integral (3.1) with \(p_m\), we obtain the quadrature formula
for computing an approximate value of the integral (3.1). We now express the Lagrange polynomial \(p_m\) in terms of the Chebyshev polynomials of the first kind \(T_n\) for \(n\in \mathbb {N}_0\). Namely,
where the prime denotes a sum whose first term is halved and for \(j\in \mathbb {Z}_m\)
The formula (3.2) is rewritten as
Upon introducing the numbers
we have that
where \(\lfloor a \rfloor \) denotes the biggest integer not larger than a, see [24]. Let \(q_j(x):=x^j\), for \(x\in \hat{I}\), \(j\in \mathbb {Z}_{m}\). We introduce the moments
Formula (3.2) may be re-expressed in terms of the moments \(w_{\alpha ,\beta ,j}\) as
An approximate value of the integral may be computed according to formula (3.4) once the moments \(w_{\alpha ,\beta ,j}\) are available. We postpone the computation of the moments \(w_{\alpha ,\beta ,j}\) until Sect. 5. Formula (3.4) is the basic quadrature formula we shall use in each of the subintervals determined by the mesh to be proposed in the next section.
In the next lemma, we present an estimate of the error of the basic quadrature formula
We let \(\left\| \varphi \right\| _\infty :=\max \left\{ \left| \varphi (x)\right| : x\in \Omega \right\} \) for a bounded function \(\varphi \) defined in \(\Omega \).
Lemma 3.1
If \(f\in C^{m+1}(\hat{I})\) for some \(m\in \mathbb {N}\) and \(\alpha >1\), then
Proof
By the definition of the error \(\mathcal {E}^{\alpha ,\beta }_{m}[f]\), we observe that
with \(g(x):=1\) for \(x\in \hat{I}\). According to [12], we have that
We recall that the error of the Lagrange interpolating of degree \(m\in \mathbb {N}\) at the Chebyshev points of the first kind for a function \(f\in C^{m+1}(\hat{I})\) is bounded by
Substituting both (3.6) and (3.7) into the right hand side of (3.5) yields the desired estimate. \(\square \)
To close this section, we comment on the relationship between the parameter \(\alpha \) and \(\mathcal {I}_\alpha [f]\) defined by (2.2) for a bounded function f. From (3.6), we see that \(\mathcal {I}_\alpha [f]\) decays to zero not slower than \(\mathcal {O}(\alpha ^{-1})\) as \(\alpha \rightarrow \infty \). Hence, if we approximate the integral \(\mathcal {I}_\alpha [f]\) simply by the number zero, its error is bounded by \(\mathcal {O}(\alpha ^{-1})\). We may say that any approximation to \(\mathcal {I}_\alpha [f]\) is less accurate than simply using the number zero is useless. We are required to design quadrature formulas for computing \(\mathcal {I}_\alpha [f]\) with accuracy better than the zero.
4 Quadrature Formulas Based on the Graded Mesh
We develop in this section composite quadrature formulas for computing the integrals (2.2) for the case \(f\in C(I)\) is independent of \(\alpha \) and \(\alpha >1\) (that is, the standard deviation \(c_0\) of the Gaussian function is less than \(1/\sqrt{2}\)). The composite quadrature formulas are developed based on graded meshes determined by \(\alpha \) and the number n of the subintervals to be designed. Two types of composite quadrature formulas are proposed, one with accuracy of a polynomial order for a smooth factor f having smoothness of a finite order, and the other with accuracy of an exponential order for f having smoothness of the infinite order.
We first motivate the design of the graded mesh of the integral interval I. Ideally, the break-points of the graded mesh should be distributed so that the resulting quadrature formula has equal errors on all the subintervals determined by the mesh. Specifically, we let \(n\in \mathbb {N}\) and suppose that I is partitioned by \(0=x_0<x_1<\cdots < x_n=1\) with the break-points \(x_j\) to be determined. By \(E_j\) we denote the error of the quadrature formula on the subinterval \(I_j:=[x_{j-1}, x_j]\), \(j\in \mathbb {Z}_{n}^+:=\{1,2, \ldots , n\}\). That is,
where \(h_j:=x_{j}-x_{j-1}\) and \(p_m(x)\) is the Lagrange interpolation polynomial of degree \(m\in \mathbb {N}\) at the Chebyshev points of the first kind which approximates \(h_jf(h_jx/2+(x_j+x_{j+1})/2)/2\) for \(x\in \hat{I}\). The best choice of the break-points of the graded-mesh would ensure that the errors \(E_j\) are all equal. However, it is not possible to have the explicit form of \(x_j\). We then appeal to conservative upper bounds of \(E_j\). From (3.7) we obtain upper bounds of the error on all subintervals
One strategy to choose the break-points of the graded-mesh is to solve the following system of equations for \(x_j\)
Again, it is difficult to solve the system explicitly. Instead of solving (4.2) exactly, motivated by the idea proposed in [21, 22] for computing an oscillatory integral, we propose a strategy to partition the interval I. Specifically, for \(n\in \mathbb {N}\) with \(n>1\), we partition the interval I with the break-points defined by
This choice of the break-points ensures that Eq. (4.2) are approximately satisfied.
The proposed quadrature formulas are constructed by employing the graded-mesh (4.3) with a transformation mapping each of the subintervals \([x_{j-1}, x_{j}]\) onto \(\hat{I}:=[-\,1,1]\) and using the basic quadrature formula to compute the resulting integrals on \(\hat{I}\). Specifically, we use the affine transformation \(x\mapsto h_jx/2+(x_{j-1}+x_j)/2\) to map \([x_{j-1},x_j]\) onto \(\hat{I}\). Accordingly, the integral (2.2) may be written as
where for \(j\in \mathbb {Z}_n^+\),
and
Computing the integral (2.2) is then reduced to calculate the integrals \(\mathcal {I}_{\alpha _j,\beta _j}[f_j]\) for \(j\in \mathbb {Z}_n^+\) in (4.4), which have the form of (3.1). Approximate values of these integrals will be computed by using formula (3.2).
We now develop two composite quadrature formulas for computing the integral (4.4) by using the quadrature formula (3.2) to calculate the integrals \(\mathcal {I}_{\alpha _j,\beta _j}[f_j]\) for \(j\in \mathbb {Z}_n^+\). In the first method, we use the same number of quadrature nodes in all of the subintervals. Selecting a fixed positive integer m, we use \(\mathcal {Q}^{\alpha _j,\beta _j}_m[f_j]\) as defined in (3.2) to approximate the integral \(\mathcal {I}_{\alpha _j,\beta _j}[f_j]\) for \(j\in \mathbb {Z}_n^+\). The integral (4.4) is then approximated by
We next analyze the accuracy order of the quadrature formula (4.8). To this end, in the following lemma we estimate the error
Lemma 4.1
If \(f\in C^{m+1}(I)\) and \(\alpha >1\), then for \(j\in \mathbb {Z}_n^+\)
Proof
We prove this lemma by applying Lemma 3.1 to integral \(\mathcal {I}_{\alpha _j,\beta _j}[f_j]\). According to the definition (4.5) of \(\alpha _j\), we have for \(j\in \mathbb {Z}_n^+\) that
By the chain rule, we obtain for \(x\in \hat{I}\) that
where \(f_j\) is defined by (4.7). This together with the inequality above yields the desired estimate. \(\square \)
We are now ready to provide the error estimate for the quadrature formula (4.8). For m, \(n\in \mathbb {N}\) with \(n>1\), we define
and denote by \(\mathcal {N}(\mathcal {Q}^{\alpha }_{n,m}[f])\) the number of the quadrature nodes used in \(\mathcal {Q}^{\alpha }_{n,m}[f]\).
Theorem 4.2
For \(\alpha >1\) and \(n\in \mathbb {N}\) with \(n>1\), let \(\eta :=\max \left\{ 1/\alpha ,1-\alpha ^{-1/(n-1)}\right\} \). If \(f\in C^{m+1}(I)\) for some \(m\in \mathbb {N}\), then
and
Proof
The proof of this theorem is done by applying Lemma 4.1 on each of the subintervals. This leads to the estimate that for \(j\in \mathbb {Z}_n^+\)
Note that \(h_1=x_1-x_0=1/\alpha \le \eta ,\) and for \(j\in \mathbb {Z}_n^+\) with \(j>1\),
Substituting these bounds into the right-hand side of (4.9) and summing the resulting inequalities over \(j\in \mathbb {Z}_n^+\), we obtain the desired estimate for \(\mathcal {E}^{\alpha }_{n,m}[f]\).
It remains to estimate the number of the quadrature nodes used in the quadrature formula. According to the quadrature formula (4.8), we have that
proving the desired result. \(\square \)
We remark on the parameter \(\eta \) that appears in Theorem 4.2. When n is sufficiently large, for a fixed \(\alpha \), the number \(\alpha ^{-\frac{1}{n-1}}\) is close to 1 and thus, \(1-\alpha ^{-\frac{1}{n-1}}\le \frac{1}{\alpha }\). Hence \(\eta =\frac{1}{\alpha }\). Theorem 4.2 then ensures that when n is sufficiently large, the accuracy order of the quadrature formula (4.8) is \({\mathcal O}(1/\alpha ^{m+1})\).
We next develop the second method to approximate the integral (2.2) for f having smoothness of the infinite order. This method uses the same graded-mesh (4.3) for the interval I but variable numbers of quadrature points in the subintervals. The numbers of the quadrature nodes used in each of the subintervals are chosen to obtain the exponential order of accuracy for the resulting quadrature formulas. Specifically, for \(n\in \mathbb {N}\) with \(n>1\) and for the partition of I chosen as (4.3), we let
where \(\lceil a\rceil \) denotes the smallest integer not less than a. For each \(j\in \mathbb {Z}^{+}_{n}\), we use \(\mathcal {Q}^{\alpha _j,\beta _j}_{m_j}[f]\) to approximate \(\mathcal {I}_{\alpha _j,\beta _j}[f_j]\). Integral \(\mathcal {I}_\alpha [f]\) defined by (4.4) is then approximated by the quadrature formula
We next estimate the error
of the quadrature formula \(\mathcal {Q}^{\alpha }_{n}[f]\) defined by (4.11). To this end, we recall the inequality
which is obtained from the Stirling formula [1], and establish the following technical lemma.
Lemma 4.3
There exists a positive constant c such that for all \(\alpha >1\), for all \(n\in \mathbb {N}\) satisfying
and for all \(j\in \mathbb {Z}_n^+\) with \(j>1\), the inequality holds
Proof
Since \(\alpha >1\), condition (4.13) implies that \(n>1\). By inequality (4.12), there exists a positive constant c such that for all \(n\in \mathbb {N}\) with \(n>1\) and \(j\in \mathbb {Z}_n^+\) with \(j>1\),
By definition (4.10) of \(m_j\), we see that \(m_j+1\ge n+1\) for \(j>1\). Using this result in the right-hand side of the above inequality yields
Multiplying both sides of inequality (4.15) by \((\alpha ^{1/(n-1)}-1)^{m_j+1}\), we obtain that
Moreover, condition (4.13) is equivalent to that
Using this inequality in the right-hand side of (4.16), we find that there exists a positive constant c such that for all \(\alpha >1\), \(n\in \mathbb {N}\) satisfying (4.13) and \(j\in \mathbb {Z}_n^+\) with \(j>1\), the desired estimate (4.14) holds. \(\square \)
We are now ready to establish the estimate for \(\mathcal {E}^{\alpha }_{n}[f]\). For a function \(\phi \in C^{\infty }(\Omega )\), we define
Theorem 4.4
If \(f\in C^{\infty }(I)\), then there exists a positive constant c such that for all \(\alpha > 1\) and \(n\in \mathbb {N}\) satisfying (4.13),
For \(n\in \mathbb {N}\) with \(n>1\), there holds the estimate
Proof
We establish the error bound of this theorem by estimating the errors
for \(j\in \mathbb {Z}_{n}^+\), and then summing them over j. Applying Lemma 4.1 with \(m:=m_1\), we have that for \(j=1\)
For \(j>1\), by applying Lemma 4.1 with
we obtain that
Applying the estimate in Lemma 4.3 to the right hand side of (4.17) yields that there exists a positive constant c such that for all \(\alpha >1\), for \(n\in \mathbb {N}\) satisfying (4.13), and for \(j\in \mathbb {Z}_{n}^+\) with \(j>1\),
Note that for \(j\in \mathbb {Z}_{n}^+\) with \(j>1\),
Substituting this result into the right hand side of inequality (4.18), we obtain the estimate
Summing up the both sides of the above inequalities over \(j\in \mathbb {Z}_{n}^+\), we observe that there exists a positive constant c such that for all \(\alpha > 1\) and \(n\in \mathbb {N}\) satisfying (4.13)
Note that \(n/2^{n}<1\) for all \(n\in \mathbb {N}\). Using this in the last step of the above inequality leads to the first desired estimate.
It remains to estimate the number \(\mathcal {N}\left( \mathcal {Q}^{\alpha }_{n}[f]\right) \) of the quadrature nodes used in the quadrature formula (4.11). To this end, we note that
For \(n\in \mathbb {N}\), by using the following inequality in the above estimate
we have that
which completes the proof. \(\square \)
From Theorems 4.2 and 4.4, we see that the quadrature formula (4.8) has accuracy of a polynomial order (in terms of \(\alpha \)) and the quadrature formula (4.11) achieves accuracy of an exponential order (in terms of \(\alpha \)). The number of the quadrature nodes used in the quadrature formula (4.8) is linear in n and the number of the quadrature nodes used in the quadrature formula (4.11) is quadratic in n. Moreover, these numbers for both quadrature formulas are independent of \(\alpha \). Specifically, the number of quadrature nodes used in \(\mathcal {Q}^{\alpha }_{n,m}[f]\) is \((m+1)n\) for m and that in \(\mathcal {Q}^{\alpha }_{n}[f]\) is \(n+\sum _{j\in \mathbb {Z}_n^+}m_j\), where \(m_j\) for \(j\in \mathbb {Z}_n^+\) are defined by (4.10).
5 Computation of the Moments
In this section, we propose a method to compute the exact values of the moments \(w_{\alpha ,\beta ,k}\), for \(k\in \mathbb {Z}_{m}\), defined as in (3.3). For this purpose, we first re-express the moments in terms of integrals involved \(G_\alpha \). We then provide a method to calculate these integrals exactly.
We begin with considering the representation of the moments \(w_{\alpha ,\beta ,k}\). To this end, we let \(k\in \mathbb {N}_0\) and for \(j\in \mathbb {Z}_k\), \(\alpha >0\) and \(b>0\), we define
and recall the binomial coefficients
Proposition 5.1
Let \(k\in \mathbb {N}_0\). If \(\alpha >0\) and \(\beta \le 0\), then
Proof
We first derive forms of \(w_{\alpha ,\beta ,k}\) for different values of \(\beta \). By a change of variables \(x-\beta \mapsto x\) in (3.3), we obtain that
For \(-1<\beta \le 0\), we make a change of variables \(x\mapsto -x\) in the second term of the right hand side of Eq. (5.2), which yields that
For \(\beta \le -1\), from formula (5.2) we have that
Applying the binomial formula to \((x+\beta )^k\), \((x-\beta )^k\) in (5.3) and \((x+\beta )^k\) in (5.4), we attain the assertions of this proposition. \(\square \)
We next describe a method to compute \(\mathcal {M}_k[\alpha ,b]\) defined as in (5.1) for \(k\in \mathbb {N}_0\), \(\alpha >0\) and \(b>0\). We first show an auxiliary equality. To this end, we denote by \(\mathcal {D}_\alpha \) the differentiation operator with respect to \(\alpha \).
Lemma 5.2
If \(j\in \mathbb {N}_0\), then
Proof
Note that
for \(j\in \mathbb {N}_0\). Differentiating \(\mathcal {M}_j[\sqrt{\alpha },b]\) with respect to \(\alpha \), we obtain that
This together with (5.5) by replacing j with \(j+2\) yields the desired formula. \(\square \)
According to Lemma 5.2, the computation of \(\mathcal {M}_k[\alpha ,b]\) may be done by considering two separate cases when k is an even number and when k is an odd number. We shall use the Leibniz formula for the k-th derivative of the product of two functions for \(k\in \mathbb {N}\),
We first consider the case when k is an odd number.
Proposition 5.3
If \(k=2j+1\) for \(j\in \mathbb {N}_0\), then
Proof
We first derive the form of \(\mathcal {M}_{k}[\sqrt{\alpha },b]\) for \(k=2j+1\) with \(j\in \mathbb {N}_0\). Repeatedly using Lemma 5.2, we obtain that
We shall make use of the above formula by differentiating \(\mathcal {M}_1[\sqrt{\alpha },b]\) with respect to \(\alpha \). By a direct computation, we have that
Hence, we find that
Note that for \(l\in \mathbb {Z}_j^+\)\(\mathcal {D}_\alpha ^{l}(1-\mathrm{e}^{-b^2\alpha })=(-1)^{l-1}b^{2l}\mathrm{e}^{-b^2\alpha }\) and \(\mathcal {D}_\alpha ^{l}(1/\alpha )=(-1)^ll!\alpha ^{-l-1}.\) Applying the Leibniz formula (5.6) with these two derivative formulas, we obtain that
Substituting this equality into (5.7) yields that
In the above equation, we replace \(\sqrt{\alpha }\) by \(\alpha \) and obtain the desired result of this proposition. \(\square \)
We next consider the case when k is an even number. We shall use the notation of the error function [1] defined by
For more information about the error function, see for instance [18, 29]. We shall use \(\Gamma \) to denote the Gamma function and recall that for a constant \(c\in (-\,1,1)\) and \(n\in \mathbb {N}\),
In particular, for \(c=1/2\), we have that \(\Gamma (1/2)=\sqrt{\pi }.\)
Proposition 5.4
If \(k=2j\) for \(j\in \mathbb {N}_0\), then
Proof
The proof of this result is similar to that of Proposition 5.3. We first derive the form of \(\mathcal {M}_{k}[\sqrt{\alpha },b]\) for \(k=2j\) with \(j\in \mathbb {N}_0\). According to Lemma 5.2, we have that
A direct computation leads to
Differentiating the equation above j times with respect to \(\alpha \) yields that
Using definition (5.8), we have that
Note that
Using formula (5.10) with the Leibniz formula (5.6) and the equation above yields that for \(l\in \mathbb {Z}_j^+\)
Applying the Leibniz formula (5.6) with the equation above and (5.11), we obtain that
Substituting the equation above and \(\Gamma (\frac{1}{2})=\sqrt{\pi }\) into (5.9) gives that
In the equation above replacing \(\sqrt{\alpha }\) by \(\alpha \), we obtain the desired result of this proposition. \(\square \)
Combining formulas in Propositions 5.1, 5.3 and 5.4 provides a method to compute the exact values of the moments \(w_{\alpha ,\beta ,k}\).
6 Numerical Experiments
In this section, we carry out five numerical experiments to confirm the accuracy estimates, established in Sect. 4, of the two quadrature formulas for (2.2). Specifically, we verify the relative errors (RE) and the accuracy orders (Order) of these formulas.
The numerical results presented below were all obtained by using Matlab in a modest desktop (a Core 2 Quad with 4GB of Ram memory). The error function (5.8) was computed by using erf of Matlab. Numerical methods for calculating the error function may be found in [6, 7, 28].
We present in the first example the numerical results of the quadrature formula (4.8) which we denote by QuadP. The numerical accuracy order of QuadP is computed by using the formula
for m, \(n\in \mathbb {N}\) with \(n>1\).
Example 6.1
This example is to verify the accuracy of the quadrature formula \(\mathcal {Q}^{\alpha }_{n,m}[f]\) defined as in (4.8). We consider the function \(f(x):=x^2\) for \(x\in I\). The exact value of the corresponding integral is
We list in Table 1 the relative errors and the numerical accuracy orders of \(\mathcal {Q}^{\alpha }_{n,4}[f]\) for different values of \(\alpha \) and different choices of n. The relative errors of the quadrature formula \(\mathcal {Q}^{\alpha }_{n,4}[f]\) are depicted in Fig. 6a for fixed \(\alpha =50\) with n changing from 2 to 100 and in Fig. 6b for fixed \(n=20\) with \(\alpha \) changing from 10 to 500. Table 1 confirms the accuracy of the quadrature formula \(\mathcal {Q}^{\alpha }_{n,4}[f]\), since the accuracy orders of \(\mathcal {Q}^{\alpha }_{n,4}[f]\) are higher than the asymptotic order of the values of the integrals decaying to zero, which is \(\mathcal {O}(\alpha ^{-3})\) as \(\alpha \) tends to infinity. From Fig. 6, we observe that for a fixed \(\alpha \) the relative errors of the quadrature formula change modestly as n grows and for a fixed n they also change modestly as \(\alpha \) grows. This demonstrates that the quadrature formula (4.8) has accuracy of a high order.
In Table 2, we compare the relative errors of the formula \(\mathcal {Q}^{\alpha }_{n,2}[f]\) (Graded Mesh) with that of the standard composite formula (Uniform). The standard composite formula is constructed by subdividing the integration interval into n equal subintervals and using the Simpson rule to calculate the integrals on each of the resulting subintervals. We conclude that the accuracy order of \(\mathcal {Q}^{\alpha }_{n,2}[f]\) is much higher than the composite Simpson formula with a uniform partition.
We show in the next example the numerical results of the quadrature formula (4.11) which we denote by QuadE. As in the first example, we compute the numerical convergence order of QuadE by using the formula
for \(n\in \mathbb {N}\) with \(n>1\).
Example 6.2
We verify in this example the theoretical accuracy estimate presented in Theorem 4.4 for the quadrature formula \(\mathcal {Q}^{\alpha }_{n}[f]\) defined by (4.11). We consider the function \(f(x):=\exp \left\{ -x^2\right\} \) for \(x\in I\). The exact value of the corresponding integral is
Numerical results of this example are reported in Tables 3 and 4 and Fig. 7. Relative errors and accuracy orders of \(\mathcal {Q}^{\alpha }_{n}[f]\) for different values of \(\alpha \) and choices of \(n=3,4,5\) are listed in Table 3. We plot the relative errors of \(\mathcal {Q}^{\alpha }_{n}[f]\) for fixed \(\alpha =600\) in Fig. 7a with n ranging from 4 to 12. The absolute errors (AE) of \(\mathcal {Q}^{\alpha }_{n}[f]\) multiplied by \((2\alpha )^{n+1}\) are depicted in Fig. 7b for \(n=4\), where we choose \(\alpha \) ranging from 300 to 400. From Table 3 and Fig. 7a, we observe that for a fixed \(\alpha \), the accuracy of the quadrature formula improves as n grows and for a fixed n, it also improves as \(\alpha \) grows. From Fig. 7b we see that the asymptotic order of accuracy of \(\mathcal {Q}^{\alpha }_{n}[f]\) is \(\mathcal {O}((2\alpha )^{-5})\) for \(n=4\), which concurs with the theoretical estimate given in Theorem 4.4. In Table 4, we compare the RE of the formula \(\mathcal {Q}^{\alpha }_{n}[f]\) (Graded Mesh) with that of the composite Simpson formulas (Uniform) having n uniform subintervals. We see that the RE of \(\mathcal {Q}^{\alpha }_{n}[f]\) is much smaller (with fewer quadrature nodes) than that of the composite Simpson rule. The formulas defined by (4.11) enhance the approximation accuracy and as well as reduce the computational complexity.
In the next two examples we test the accuracy of the quadrature formulas (4.8) and (4.11) for functions of less smoothness.
Example 6.3
We consider in this example the function
The exact value of the corresponding integral is
We list in Table 5 relative errors and accuracy orders of the quadrature formula \(\mathcal {Q}^{\alpha }_{n,4}[f]\), and in Table 6 those of the quadrature formula \(\mathcal {Q}^{\alpha }_{n}[f]\). According to the results reported in Tables 5 and 6, we confirm that the quadrature formulas proposed in this paper are highly accurate for the integrals defined as in (2.2), which is a piecewise continuous function, even though the standard deviation is very small.
Example 6.4
We consider in this example the function \(f(x):=x^{5/2}\) for \(x\in I\). The “true” values of the integral is evaluated by using the Matlab symbolic toolbox. Note that the function f is less smooth, with a singular third order derivative.
Numerical results of this example are presented in Tables 7, 8 and 9. In Table 7, we compare relative errors of the formula \(\mathcal {Q}^{\alpha }_{n,2}[f]\) with those of the standard composite Simpson’s formula for different n and \(\alpha \). We list in Table 8 relative errors and accuracy orders of the quadrature formula \(\mathcal {Q}^{\alpha }_{n,m}[f]\) for \(m=1, 4\), and in Table 9 those of the quadrature formula \(\mathcal {Q}^{\alpha }_{n}[f]\). From Table 7 we find that the formula \(\mathcal {Q}^{\alpha }_{n,2}[f]\) produces much more accurate results than the standard composite Simpson’s formula, when the same number of quadrature nodes are used in these two quadrature formulas. From Tables 7 and 8, we observe that the accuracy of the formula \(\mathcal {Q}^{\alpha }_{n,1}[f]\) is higher than that of the standard composite Simpson’s formula, and the asymptotic order of accuracy for \(\mathcal {Q}^{\alpha }_{n,1}[f]\) is higher than 3, which concurs with the theoretical estimate given in Theorem 4.2. The accuracy of the formula \(\mathcal {Q}^{\alpha }_{n,m}[f]\) improves as the number of the quadrature nodes increases. We conclude from Table 9 that the formula \(\mathcal {Q}^{\alpha }_{n}[f]\) is accurate for the less smooth function whose third order derivative has a singularity.
In the last example, we compare the performance of the proposed quadrature formulas with that of the treatment described in [20], where we first identified the computational challenge of computing integrals involved the Gaussian function with a small standard deviation. To this end, we recall the numerical treatment described in [20], where we treated integrals of this type as a weakly singular integral and employed the computational strategy proposed in [16]. Let \(\varepsilon >0\) be a given fixed number and n be a positive integer. Choosing \(\gamma \in (0,1)\), we introduce a partition of I with the nodes \(s_0:=0\) and \(s_j:=\gamma ^{n-j}\), for \(j\in \mathbb {Z}_{n}^+\). Let \(m_j:=\lfloor (j-1)\varepsilon \rfloor +1, ~ \text {for }~j\in \mathbb {Z}_{n}^+\), where \(\lfloor a\rfloor \) is the largest integer less than or equal to a. The quadrature formula for computing \(\mathcal {I}_\alpha [f]\) is designed by using the Gauss–Legendre quadrature with \(m_j\) nodes to approximate the integrals on the subinterval \([s_{j-1},s_{j}]\) for \(j\in \mathbb {Z}_{n}^+\). We denote this formula by \(\mathcal {P}_{n,\alpha }^{\gamma ,\varepsilon }[f]\).
Example 6.5
In this example, we compare accuracy of the quadrature formula \(\mathcal {Q}^{\alpha }_{n}[f]\) defined by (4.11) with that of \(\mathcal {P}_{n,\alpha }^{\gamma ,\varepsilon }[f]\) described above. We consider two functions
where \(f_1\) has smoothness of a finite order and \(f_2\) has smoothness of the infinite order. The true values of the integral with \(f_1\) is evaluated by using the Matlab symbolic toolbox, and that of the integral with \(f_2\) is given by (6.1).
We report in Table 10 relative errors for \(f_1\) of the two quadrature formulas \(\mathcal {Q}^{\alpha }_{n}[f_1]\) and \(\mathcal {P}_{n,\alpha }^{\gamma ,\varepsilon }[f_1]\) for different n and \(\alpha \), where the parameters in \(\mathcal {P}_{n,\alpha }^{\gamma ,\varepsilon }[f_1]\) are \(\gamma =0.2\) and \(\varepsilon =6\). We see from Table 10 that relative errors of \(\mathcal {Q}^{\alpha }_{n}[f_1]\) are smaller than those of \(\mathcal {P}_{n,\alpha }^{0.2,6}[f_1]\) for fixed n when \(\alpha \) is large.
Relative errors for \(f_2\) are listed in Table 11, where the parameters in \(\mathcal {P}_{n,\alpha }^{\gamma ,\varepsilon }[f]\) are \(\gamma =0.02\) and \(\varepsilon =6\). From Table 11, we confirm that \(\mathcal {Q}^{\alpha }_{n}[f_2]\) is more accuracy than \(\mathcal {P}_{n,\alpha }^{0.02,6}[f_2]\). Notice that the quadrature nodes used in \(\mathcal {Q}^{\alpha }_{n}[f_2]\) is less than that in \(\mathcal {P}_{n,\alpha }^{0.02,6}[f_2]\) for fixed n.
We finally remark the quadrature formulas proposed in this paper are robust, easy to implement and computationally inexpensive, when \(\alpha \) is large.
References
Abramowitz, M., Stegun, I.A.: Handbook of Mathematical Functions with Formulas, Graphs and Mathematical Tables. Dover, New York (1965)
Arfken, G.B., Weber, H.J., Harris, F.E.: Mathematical Methods for Physicists, 7th edn. Academic, Waltham (2013)
Chen, Z., Wu, B., Xu, Y.: Error control strategies for numerical integrations in fast collocation methods. Northeast. Math. J. 21(2), 233–252 (2005)
Chen, Z., Micchelli, C.A., Xu, Y.: Multiscale Methods for Fredholm Integral Equations. Cambridge University Press, Cambridge (2015)
Cheney, E.W.: Introduction to Approximation Theory. McGraw-Hill, New York (1966)
Chevillard, S.: The functions erf and erfc computed with arbitrary precision and explicit error bounds. Inf. Comput. 216, 72–95 (2012)
Cody, W.J.: Rational Chebyshev approximations for the error function. Math. Comput. 23, 631–637 (1969)
Davis, P.J., Rabinowitz, P.: Methods of Numerical Integration, 2nd edn. Academic, New York (1984)
Feller, W.: An Introduction to Probability Theory and Its Applications, vol. 1, 3rd edn. Wiley, New York (1968)
Feller, W.: An Introduction to Probability Theory and Its Applications, vol. 2, 3rd edn. Wiley, New York (1971)
Gonzalez, R.C., Woods, R.E.: Digital Image Processing. Addison-Wesley, Boston (1993)
Gradshteyn, I.S., Ryzhik, I.M.: Table of Integrals, Series, and Products. Academic, New York (1994)
Isaacson, E., Keller, M.: Analysis of Numerical Methods. Wiley, New York (1966)
Ito, K., Xiong, K.: Gaussian filters for nonlinear filtering problems. IEEE Trans. Autom. Control 45, 910–927 (2000)
John, F.: Partial Differential Equations, volume 1 of Applied Mathematical Sciences. Springer, New York (1982)
Kaneko, H., Xu, Y.: Gauss-type quadratures for weakly singular integrals and their application to Fredholm integral equations of the second kind. Math. Comput. 62, 739–753 (1994)
Kim, D.S., Kim, T., Rim, S.H., Lee, S.H.: Hermite polynomials and their applications associated with Bernoulli and Euler numbers. Discrete Dyn. Nat. Soc. 2012, Article ID 974632
Lebedev, N.N.: Special Functions and their Applications. Prentice Hall, Englewood Cliffs (1965)
Lu, J., Darmofal, D.L.: Higher-dimensional integration with Gaussian weight for applications in probabilistic design. SIAM J. Sci. Comput. 26, 613–624 (2004)
Lu, Y., Shen, L., Xu, Y.: Integral equation models for image restoration: high accuracy methods and fast algorithm. Inverse Probl. 26, 045006 (2010)
Ma, Y., Xu, Y.: Computing oscillatory integrals: partition of the integration interval based on the singularity and the wave number of the integrand (in Chinese). Sci. Sin. Math. 45, 1133–1152 (2015)
Ma, Y., Xu, Y.: Computing highly oscillatory integrals. Math. Comput. 87, 309–345 (2018)
Mandl, F.: Statistical Physics. The Manchester Physics Series, 2nd edn. Wiley, Chichester (1988)
Poularikas, A.D.: The Handbook of Formulas and Tables for Signal Processing. CRC Press, Boca Raton (1998)
Schwab, C.: Variable order composite quadratures for singular and nearly singular integrals. Computing 53, 173–194 (1994)
Shen, J., Tang, T., Wang, L.L.: Spectral Methods: Algorithms, Analysis and Applications. Springer, Berlin (2011)
Steen, N.M., Byrne, G.D., Gelbard, E.M.: Gaussian quadratures for the integrals \(\int _0^\infty \exp {(-x^2)}f(x){\rm d}x\) and \(\int _0^b\exp {(-x^2)}f(x){\rm d}x\). Math. Comput. 23, 661–671 (1969)
Strecok, A.: On the calculation of the inverse of the error function. Math. Comput. 22, 144–158 (1968)
Temme, N.M.: Special Functions: An Introduction to the Classical Functions of Mathematical Physics. Wiley, New York (1996)
Thambynayagam, R.M.: The Diffusion Handbook: Applied Solutions for Engineers. McGraw-Hill, New York (2011)
Walter, G.G.: Wavelets and Other Orthogonal Systems with Applications. CRC Press, Boca Raton (1994)
Xu, K.: The Chebyshev points of the first kind. Appl. Numer. Math. 102, 17–30 (2016)
Author information
Authors and Affiliations
Corresponding author
Additional information
This research was supported in part by the Ministry of Science and Technology of China under Grant 2016YFB0200602, by the Natural Science Foundation of China under Grants 11471013 and 11771464, by Research startup funds of DGUT (GC300502-1), and by the US National Science Foundation under Grant DMS-1522332.
Rights and permissions
About this article
Cite this article
Ma, Y., Xu, Y. Computing Integrals Involved the Gaussian Function with a Small Standard Deviation. J Sci Comput 78, 1744–1767 (2019). https://doi.org/10.1007/s10915-018-0825-4
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10915-018-0825-4