1,742 research outputs found

    O(1) Computation of Legendre polynomials and Gauss-Legendre nodes and weights for parallel computing

    Get PDF
    A self-contained set of algorithms is proposed for the fast evaluation of Legendre polynomials of arbitrary degree and argument is an element of [-1, 1]. More specifically the time required to evaluate any Legendre polynomial, regardless of argument and degree, is bounded by a constant; i.e., the complexity is O(1). The proposed algorithm also immediately yields an O(1) algorithm for computing an arbitrary Gauss-Legendre quadrature node. Such a capability is crucial for efficiently performing certain parallel computations with high order Legendre polynomials, such as computing an integral in parallel by means of Gauss-Legendre quadrature and the parallel evaluation of Legendre series. In order to achieve the O(1) complexity, novel efficient asymptotic expansions are derived and used alongside known results. A C++ implementation is available from the authors that includes the evaluation routines of the Legendre polynomials and Gauss-Legendre quadrature rules

    On the numerical calculation of the roots of special functions satisfying second order ordinary differential equations

    Full text link
    We describe a method for calculating the roots of special functions satisfying second order linear ordinary differential equations. It exploits the recent observation that the solutions of a large class of such equations can be represented via nonoscillatory phase functions, even in the high-frequency regime. Our algorithm achieves near machine precision accuracy and the time required to compute one root of a solution is independent of the frequency of oscillations of that solution. Moreover, despite its great generality, our approach is competitive with specialized, state-of-the-art methods for the construction of Gaussian quadrature rules of large orders when it used in such a capacity. The performance of the scheme is illustrated with several numerical experiments and a Fortran implementation of our algorithm is available at the author's website

    Iteration-free computation of Gauss-Legendre quadrature nodes and weights

    Get PDF
    Gauss-Legendre quadrature rules are of considerable theoretical and practical interest because of their role in numerical integration and interpolation. In this paper, a series expansion for the zeros of the Legendre polynomials is constructed. In addition, a series expansion useful for the computation of the Gauss-Legendre weights is derived. Together, these two expansions provide a practical and fast iteration-free method to compute individual Gauss-Legendre node-weight pairs in O(1) complexity and with double precision accuracy. An expansion for the barycentric interpolation weights for the Gauss-Legendre nodes is also derived. A C++ implementation is available online

    A fast, simple, and stable Chebyshev-Legendre transform using an asymptotic formula

    Get PDF
    A fast, simple, and numerically stable transform for converting between Legendre and Chebyshev coefficients of a degree NN polynomial in O(N(logN)2/loglogN)O(N(\log N)^{2}/ \log \log N) operations is derived. The basis of the algorithm is to rewrite a well-known asymptotic formula for Legendre polynomials of large degree as a weighted linear combination of Chebyshev polynomials, which can then be evaluated by using the discrete cosine transform. Numerical results are provided to demonstrate the efficiency and numerical stability. Since the algorithm evaluates a Legendre expansion at an N+1N+1 Chebyshev grid as an intermediate step, it also provides a fast transform between Legendre coefficients and values on a Chebyshev grid

    A space-time pseudospectral discretization method for solving diffusion optimal control problems with two-sided fractional derivatives

    Full text link
    We propose a direct numerical method for the solution of an optimal control problem governed by a two-side space-fractional diffusion equation. The presented method contains two main steps. In the first step, the space variable is discretized by using the Jacobi-Gauss pseudospectral discretization and, in this way, the original problem is transformed into a classical integer-order optimal control problem. The main challenge, which we faced in this step, is to derive the left and right fractional differentiation matrices. In this respect, novel techniques for derivation of these matrices are presented. In the second step, the Legendre-Gauss-Radau pseudospectral method is employed. With these two steps, the original problem is converted into a convex quadratic optimization problem, which can be solved efficiently by available methods. Our approach can be easily implemented and extended to cover fractional optimal control problems with state constraints. Five test examples are provided to demonstrate the efficiency and validity of the presented method. The results show that our method reaches the solutions with good accuracy and a low CPU time.Comment: This is a preprint of a paper whose final and definite form is with 'Journal of Vibration and Control', available from [http://journals.sagepub.com/home/jvc]. Submitted 02-June-2018; Revised 03-Sept-2018; Accepted 12-Oct-201

    Non-iterative computation of Gauss-Jacobi quadrature

    Get PDF
    Asymptotic approximations to the zeros of Jacobi polynomials are given, with methods to obtain the coefficients in the expansions. These approximations can be used as standalone methods for the noniterative computation of the nodes of Gauss--Jacobi quadratures of high degree (n100n\ge 100). We also provide asymptotic approximations for functions related to the first-order derivative of Jacobi polynomials which are used for computing the weights of the Gauss--Jacobi quadrature. The performance of the asymptotic approximations is illustrated with numerical examples, and it is shown that nearly double precision relative accuracy is obtained for both the nodes and the weights when n100n\ge 100 and 1<α,β5-1< \alpha, \beta\le 5. For smaller degrees the approximations are also useful as they provide 101210^{-12} relative accuracy for the nodes when n20n\ge 20, and just one Newton step would be sufficient to guarantee double precision accuracy in that cases
    corecore