A Fast Analysis-Based Discrete Hankel Transform Using Asymptotic Expansions
Total Page:16
File Type:pdf, Size:1020Kb
A Fast Analysis-Based Discrete Hankel Transform Using Asymptotic Expansions The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters. Citation Townsend, Alex. “A Fast Analysis-Based Discrete Hankel Transform Using Asymptotic Expansions.” SIAM J. Numer. Anal. 53, no. 4 (January 2015): 1897–1917. © 2015, Society for Industrial and Applied Mathematics As Published http://dx.doi.org/10.1137/151003106 Publisher Society for Industrial and Applied Mathematics Version Final published version Citable link http://hdl.handle.net/1721.1/100550 Terms of Use Article is made available in accordance with the publisher's policy and may be subject to US copyright law. Please refer to the publisher's site for terms of use. SIAM J. NUMER. ANAL. c 2015 Society for Industrial and Applied Mathematics Vol. 53, No. 4, pp. 1897–1917 A FAST ANALYSIS-BASED DISCRETE HANKEL TRANSFORM USING ASYMPTOTIC EXPANSIONS ∗ † ALEX TOWNSEND Abstract. A fast and numerically stable algorithm is described for computing the discrete Hankel transform of order 0 as well as evaluating Schl¨omilch and Fourier–Bessel expansions in O(N(log N)2/ loglog N) operations. The algorithm is based on an asymptotic expansion for Bessel functions of large arguments, the fast Fourier transform, and the Neumann addition formula. All the algorithmic parameters are selected from error bounds to achieve a near-optimal computational cost for any accuracy goal. Numerical results demonstrate theefficiency of the resulting algorithm. Key words. Hankel transform, Bessel functions, asymptotic expansions, fast Fourier transform AMS subject classifications. 65R10, 33C10 DOI. 10.1137/151003106 ν ≥ f , → 1. Introduction. The Hankel transform of order 0 of a function :[0 1] C is defined as [21, Chap. 9] 1 (1.1) Fν (ω)= f(r)Jν (rω)rdr, ω>0, 0 J ν ν where ν is the Bessel function of the first kind with parameter .When =0,(1.1) is essentially the two-dimensional Fourier transform of a radially symmetric function with support on the unit disc and appears in the Fourier–Hankel–Abel cycle [21, sect. 9.3]. Furthermore, the Hankel transform of integer order ν ≥ 1 is equivalent to the Fourier transform of functions of the form eiνθf(r), where θ ∈ [0, 2π). Throughout ν this paper we take to be an integer. Various semidiscrete and discrete variants of (1.1 ) are employed in optics [7], electromagnetics [17], medical imaging [13], and the numerical solution of partial differential equations [3]. At some stage these require the computation of the following sums: N (1.2) fk = cnJν (rkωn), 1 ≤ k ≤ N, n=1 where ν is an integer, 0 <ω1 < ··· <ωn < ∞,and0≤ r1 < ··· <rN ≤ 1. Special cases of (1.2) that are considered in this paper are (1) the evaluation of Schl¨omilch expansions at rk [23](ωn = nπ or ωn =(n+ν)π), (2) the evaluation of Fourier–Bessel expansions of order 0 at rk (ν =0andωn = j0,n,where j0,n is the nth positive root of J0), and (3) the discrete Hankel transform (DHT) of order 0 [15](ν =0,ωn = j0,n, and rk = j0,k/j0,N+1). For algorithms that rely on the fast Fourier transform (FFT), such as the algorithm described in this paper, tasks (1), (2), and (3) are incrementally more difficult. We consider them in turn in sections 4 , 5,and6, respectively. ∗Received by the editors January 8, 2015; accepted for publication (in revised form) May 26, Downloaded 12/22/15 to 18.51.1.3. Redistribution subject SIAM license or copyright; see http://www.siam.org/journals/ojsa.php 2015; published electronically August 6, 2015. http://www.siam.org/journals/sinum/53-4/100310.html †Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139-4307 ([email protected]). 1897 Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 1898 ALEX TOWNSEND J z Our algorithm is based on carefully replacing ν ( ) by an asymptotic expansion for large arguments that, up to a certain error, expresses Jν (z) as a weighted sum of trigonometric functions. This allows a significant proportion of the computation involved in (1.2) to be achieved by the discrete cosine transform of type I (DCT) and the discrete sine transform of type I (DST). These are O(N log N) FFT-based CI SI algorithms for computing matrix-vector products with the matrices N and N ,where (1.3) k − n − π knπ CI ( 1)( 1) , SI , ≤ k, n ≤ N. ( N )kn =cos N − ( N )kn =sin N 1 1 +1 Asymptotic expansions of special functions are notoriously tricky to use in prac- tice because it is often difficult to determine the precise regime for which they are accurate approximations. However, for transforms involving orthogonal polynomials, such as the Chebyshev–Legendre transform [8, 16], successful fast algorithms have been derived based on asymptotic expansions. At the point of evaluation, these algo- rithms are competitive with multipole-like approaches [1] but have the advantage of no precomputation. This allows for more adaptive algorithms such as a convolution algorithm for Chebyshev expansions [9]. In this paper we will use error bounds to determine the precise regime for which an asymptotic expansion of Bessel functions is an accurate approximation and from there derive all the algorithmic parameters to achieve a near-optimal computational cost for any accuracy goal (see Table 4). For each task (1)–(3) there are just two user- c ,...,c defined inputs: A vector of coefficients 1 N in (1.2) and a working accuracy N >0. The values of fk in (1.2) are then calculated to an accuracy of O( n=1 |cn|). 2 p The resulting algorithm has a complexity of O(N(log N ) log(1/) / loglog N), where p = 1 for task (1), p = 2 for task (2), and p = 3 for task (3). For the majority of this paper we state algorithmic complexities without the dependency on . Previous algorithms based on asymptotic expansions for computing (1.2)[4, 24] have either a poor accuracy or a dubious numerical stability [5]. Here, we find that once an asymptotic expansion of Bessel functions is carefully employed the resulting algorithm is numerically stable, can be adapted to any accuracy goal, and requires no precomputation. Moreover, we show how the equally spaced restriction, which is inherited from the reliance on DCTs and DSTs, can be alleviated. v ,...,v We use the following notation. A column vector with entries 1 N is denoted v v v ,...,v by , a row vector is denoted by , a diagonal matrix with diagonal entries 1 N is written as Dv,andtheN ×N matrix with (k, n)entry Jν (akn) is denoted by Jν (A), where A =(akn)1≤k,n≤N . The paper is organized as follows. In section 2 webriefly discuss existing methods for computing (1.2),andinsection3 we investigate the approximation power of three 3/2 expansions for Bessel functions. In section 4 we firstdescribe an O(N ) algorithm for evaluating Schl¨omilch expansions before deriving a faster O(N(log N)2/ loglog N) algorithm. In sections 5 and 6 we use the Neumannaddition formula to extend the algorithm to the evaluation of Fourier–Bessel expansions and the computation of the DHT. 2. Existing methods. We now give a brief description of some existing methods Downloaded 12/22/15 to 18.51.1.3. Redistribution subject SIAM license or copyright; see http://www.siam.org/journals/ojsa.php for evaluating (1.2) that roughly fall into four categories: (1) direct summation, (2) evaluation via an integral representation, (3) evaluation using asymptotic expansions, and (4) butterfly schemes. For other approaches see [5 ]. Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. A FAST DHT USING ASYMPTOTIC EXPANSIONS 1899 J r ω 2.1. Direct summation. One of the simplest ideas is to evaluate ν ( k n)for 1 ≤ k, n ≤ N and then naively compute the sums in (1.2). By using the Taylor series expansion in (3.3) for small z, the asymptotic expansion in (3.1) for large z, and Miller’s algorithm [18, sect. 3.6(vi)] (backward recursion with a three-term recurrence) otherwise, each evaluation of Jν (z)costsO(1) operations [2]. Therefore, this simple algorithm requires a total of O(N 2) operations and is very efficient for 2 small N (N ≤ 256). However, the O(N ) cost is prohibitive for large N. Note that in general there is no evaluation scheme for Jν (z) that is exact in infinite precision arithmetic. At some level a working accuracy of >0 must be introduced. Thus, even in the direct summation approach, the relaxation of the working accuracy that is necessary for deriving a faster algorithm has already been made. The sums in (1.2) are equivalent to the matrix-vector product Jν ( r ω )c.One reason that an O(N(log N)2/ loglog N) algorithm is possible is because the argument, r ω, is a rank 1 matrix, a fact that we will exploit several times. 2.2. Evaluation via an integral representation. When ν is an integer, Jν (z) can be replaced by its integral representation [18, (10.9.2)], −ν π −ν 2π i iz cos(θ) i iz cos(θ) Jν z e νθ dθ e νθ dθ, (2.1) ( )= cos( ) = cos( ) π 0 2π 0 √ where i = −1 is the imaginary unit and the last equality holds because eiz cos(θ) cos(νθ)isevenaboutt = π. The integrand in (2.1)is2 π-periodic and the integral K can be approximated by a -point trapezium rule. Substituting this approximation into (1.2) gives a double sum for f that can be evaluated with one FFT followed by an interpolation step in O(KN + N log N)operations[ 6].