Numerical Integration

Total Page:16

File Type:pdf, Size:1020Kb

Numerical Integration Numerical Integration Thomas Hahn Max-Planck-Institut für Physik München T. Hahn, Numerical Integration – p.1 Restrictions Integration is a wide field. We will concentrate here on Riemann integrals of the form 1 I f := ddx f (~x ) w(~x ) . Z0 The Weight Function w(~x ) is generally known analytically and is used to absorb characteristics of the integrand which are difficult to treat otherwise, e.g. peaks or oscillatory behaviour. For the purposes of numerical integration, we assume that f (~x ) is given as a function/subroutine that can be sampled at arbitrary points ~x [0, 1]d. i ∈ T. Hahn, Numerical Integration – p.2 Quadrature Formulas Task: Find a Quadrature Formula n Qn f := ∑ wi f (~xi) i=1 with Nodes (sampling points) ~xi and Weights wi. Qn f should approximate I f for a large class of functions with as small an Error En f as possible: I f = Qn f + En f , En f “small.” But: For a given Qn, it is always possible to construct an f such that En f becomes arbitrarily large! T. Hahn, Numerical Integration – p.3 Terminology A Quadrature Rule is the vector of nodes and weights, ~x1 ~xn Rn = ,..., ( w1! wn!) and of course completely specifies Qn. Open Rule = all ~x lie strictly inside the unit hypercube. • i Closed Rule = some ~x lie on the boundary. • i Positive Rule = all wi are positive. • (Weights with alternating sign are generally considered inferior because numerical cancellations may occur when adding up.) T. Hahn, Numerical Integration – p.4 Interpolatory Formulas (1 D) (n 1) Idea: Approximate f by a polynomial p − and integrate the latter. Works as far as f is well approximated by polynomials. (n 1) We impose that p − interpolates f at n given points xi: (n 1) ! p − (xi) = f (xi) , i = 1,..., n . The polynomial thus specified is unique and can explicitly be given in terms of Lagrange Polynomials `n 1,i: − n x x (n 1) = (n 1) (n 1) = j p − (x) ∑ f (xi)`i − (x) , where `i − (x) ∏ − . i=1 j=i xi xj 6 − (n 1) = By construction, `i − (xj) δi j . T. Hahn, Numerical Integration – p.5 Interpolatory Formulas (1 D) Weights: 1 (n 1) (n 1) I p − = dx w(x) p − (x) Z0 n 1 = (n 1) ∑ f (xi) dx w(x) `i − (x) . i=1 Z0 wi From the practical point of view,| the weight{z function} w(x) must be chosen such that these integrals can be computed. The Degree of Qn is the degree of the highest polynomial integrated exactly by Qn. T. Hahn, Numerical Integration – p.6 Newton–Cotes (Rectangle) Rules (1 D) The simplest case: take equidistant xi. For w(x) = 1 the lowest-order rules are: = i Closed rules: = i−1 , e.g. Open rules: xi n+1 , e.g. xi n−1 Q = 1 , Q = 1 + 1 f f ( 2 ) 2 f 2 f (0) f (1) , Q = 1 1 + 2 , Q = 1 + 1 + 2 f 2 f ( 3 ) f ( 3 ) 3 f 6 f (0) 4 f ( 2) f (1) , Q f = 1 2 f ( 1 ) f ( 1 ) + 2 f ( 3 ) . Q f = 1 f (0) + 3 f ( 1 ) + 3 f ( 2 ) + f (1) . 3 3 4 − 2 4 4 8 3 3 By construction, deg Q > n 1, but cannot generally be n − expected to be larger than n 1 because the x are prescribed − i and only the n wi have been determined. The Newton–Cotes rules by themselves are not nearly as powerful as the Gauss rules, but they have the advantage that they can be compounded easily, e.g. in Romberg Rules. T. Hahn, Numerical Integration – p.7 Gauss Rules (1 D) Choose the xi such that Qn has the highest possible degree. With 2n degrees of freedom (n xi and n wi), we ought to achieve deg Q = 2n 1. n − By Euclid’s GCD algorithm we write n (2n 1) (n) (n 1) (n 1) (n) p − (x) = q (x) r − (x) + s − (x) , q (x) = ∏(x xi) i=1 − 1 1 (2n 1) (n) (n 1) (n 1) I p − = dx w(x) q (x) r − (x) + dx w(x) s − (x) Z0 Z0 n n (n) (n 1) (n 1) (2n 1) = ∑ wi q (xi) r − (xi) + ∑ wi s − (xi) + En p − i=1 i=1 =0 If the boxed term were zero, the error term would vanish! | {z } T. Hahn, Numerical Integration – p.8 Gauss Rules (1 D) 1 (n) (n 1) dx w(x) q (x) r − (x) = Z0 (n) (n 1) (n) (n 1) q r − = 0 q r − h | i ⇔ ⊥ Choose Orthogonal Polynomials for the q(n), then n 1 (n 1) − (i) (n 1) (i) (n) (n 1) r − = ∑ q r − q and q r − = 0 i= h | i h | i 0 because q(n) q(i<n) = 0 . h | i (n) n Since q (x) = ∏ = (x x ), the x are just the zeros of the i 1 − i i orthogonal polynomials q(n) ! T. Hahn, Numerical Integration – p.9 Gauss Rules (1 D) Gauss rules for particular weight functions have special names, hinting at the orthogonal polynomials used: w(x) = 1 Gauss–Legendre Rules w(x) = 1/√1 x2 Gauss–Chebychev Rules − α x w(x) = x e− Gauss–Laguerre Rules x2 w(x) = e− Gauss–Hermite Rules w(x) = (1 x)α(1 + x)β Gauss–Jacobi Rules − T. Hahn, Numerical Integration – p.10 Error Estimate and Embedded Rules (1D) So far we have no error estimate for our integration rule. Idea: Compare the results of two rules, Qn and Qn+m. Use Embedded Rules with x n x n+m for economy. { i}i=1 ⊂{ i}i=1 But: e.g. Gauss rules of different n have no common xi. Seek to add new points xn+1,..., xn+m such that Qn+m is exact for polynomial of maximum degree expectable from #df, (n+2m 1) p − . This leads to 1 (n) (m) (m 1) dx w(x) v (x) q (x) r − (x) = 0 Z0 (n) n (m) m with v (x) = ∏ = (x x ) , q (x) = ∏ = (x x + ) . i 1 − i i 1 − n i Not all w(x) have solutions since a scalar product with weight function w(x) v(n)(x) cannot in general be defined. T. Hahn, Numerical Integration – p.11 Embedded Rules and Null Rules Some common Embedded Rules in d = 1 are: Gauss–Kronrod Rules add one point between every two • points of a Gauss rule R so that R R + + , e.g. n n ⊂ n n 1 0 1 Patterson Rules add points on top of the Gauss–Kronrod • rules, e.g. there exists a set of rules R R R R R R R R R . 1 ⊂ 3 ⊂ 5 ⊂ 7 ⊂ 15 ⊂ 31 ⊂ 63 ⊂ 127 ⊂ 255 A Null Rule Nm is associated with an integration rule Qn (usually m < n) and is engineered to give zero for all functions that are integrated exactly by Qn. Nm measures the “higher terms” of the integrand that are not exactly integrated by Qn and is also used for error estimation. T. Hahn, Numerical Integration – p.12 Adaptive Algorithms With an error estimate available, adaptiveness can easily be implemented: 1. Integrate the entire region: I E . tot ± tot 2. while Etot > max(εrel Itot, εabs) 3. Find the region r with the largest error. 4. Bisect (or otherwise cut up) r. 5. Integrate each subregion of r separately. = ∑ = ∑ 2 6. Itot Ii, Etot Ei . 7. end while q Examples: QUADPACK’s QAG, CUBA’s Cuhre, Suave. T. Hahn, Numerical Integration – p.13 Extrapolation Extrapolation can be used to accelerate convergence if the functional behaviour of the error term is known. Example: for the Newton–Cotes formulas the error can be shown to vary with the spacing h of the nodes as 1 Q f I f = c h2 + c h4 + ..., h = . n − 2 4 n Idea: Compute Qn f for different h and extrapolate to h = 0. Use Richardson’s Extrapolation to eliminate k powers of h: T0 k k 1 k 1 1 & 4 T − T 0 1 k m+1 m− 0 T2 → T1 T := − , T := Q m−1 f . & & m k m 2 0 1 2 4 1 T3 → T2 → T1 . & & − . .. These are known as Romberg Formulas. T. Hahn, Numerical Integration – p.14 Curse of Dimension Imagine computing the volume of the d-dim. sphere Sd by integrating its characteristic func- χ = 1 tion χ = θ(1 x 2) inside the surrounding − k k d hypercube Cd = [ 1, 1] . − χ = 0 The following table gives the ratio of the volumes: d 2 5 10 50 100 Vol Sd 28 70 .785 .164 .0025 1.5 10− 1.9 10− Vol Cd × × This ratio can in a sense be thought of as the chance that a general-purpose integrator will find the sphere at all! T. Hahn, Numerical Integration – p.15 Product Formulas Easiest method: Iterate one-dimensional rules, e.g. 1 nx ny nz 3 = (x) (y) (z) (x) (y) (z) d x f (~x ) ∑ ∑ ∑ wi wj wk f (xi , xj , xk ) . Z0 i=1 j=1 k=1 d d But: the number of samples increases as N = ∏ = n n . i 1 i ∼ Consider e.g. the Newton–Cotes rules, where the error term is (h2) = (n 2). Convergence is thus: O O − 2/d Q f I f = (N− ) . n − O Even for moderate dimensions (say d & 5), this convergence rate is usually too slow to be useful. T. Hahn, Numerical Integration – p.16 Construction of Polynomial Rules Select orthogonal basis of functions b ,..., b (usually { 1 m} monomials) with which most f can (hopefully) be approximated sufficiently and impose that each bi be integrated exactly by Qn: n 1 ! I b = Q b ∑ w b (~x ) = ddx w(~x ) b (~x ) .
Recommended publications
  • Fortran Resources 1
    Fortran Resources 1 Ian D Chivers Jane Sleightholme May 7, 2021 1The original basis for this document was Mike Metcalf’s Fortran Information File. The next input came from people on comp-fortran-90. Details of how to subscribe or browse this list can be found in this document. If you have any corrections, additions, suggestions etc to make please contact us and we will endeavor to include your comments in later versions. Thanks to all the people who have contributed. Revision history The most recent version can be found at https://www.fortranplus.co.uk/fortran-information/ and the files section of the comp-fortran-90 list. https://www.jiscmail.ac.uk/cgi-bin/webadmin?A0=comp-fortran-90 • May 2021. Major update to the Intel entry. Also changes to the editors and IDE section, the graphics section, and the parallel programming section. • October 2020. Added an entry for Nvidia to the compiler section. Nvidia has integrated the PGI compiler suite into their NVIDIA HPC SDK product. Nvidia are also contributing to the LLVM Flang project. Updated the ’Additional Compiler Information’ entry in the compiler section. The Polyhedron benchmarks discuss automatic parallelisation. The fortranplus entry covers the diagnostic capability of the Cray, gfortran, Intel, Nag, Oracle and Nvidia compilers. Updated one entry and removed three others from the software tools section. Added ’Fortran Discourse’ to the e-lists section. We have also made changes to the Latex style sheet. • September 2020. Added a computer arithmetic and IEEE formats section. • June 2020. Updated the compiler entry with details of standard conformance.
    [Show full text]
  • Evolving Software Repositories
    1 Evolving Software Rep ositories http://www.netli b.org/utk/pro ject s/esr/ Jack Dongarra UniversityofTennessee and Oak Ridge National Lab oratory Ron Boisvert National Institute of Standards and Technology Eric Grosse AT&T Bell Lab oratories 2 Pro ject Fo cus Areas NHSE Overview Resource Cataloging and Distribution System RCDS Safe execution environments for mobile co de Application-l evel and content-oriented to ols Rep ository interop erabili ty Distributed, semantic-based searching 3 NHSE National HPCC Software Exchange NASA plus other agencies funded CRPC pro ject Center for ResearchonParallel Computation CRPC { Argonne National Lab oratory { California Institute of Technology { Rice University { Syracuse University { UniversityofTennessee Uniform interface to distributed HPCC software rep ositories Facilitation of cross-agency and interdisciplinary software reuse Material from ASTA, HPCS, and I ITA comp onents of the HPCC program http://www.netlib.org/nhse/ 4 Goals: Capture, preserve and makeavailable all software and software- related artifacts pro duced by the federal HPCC program. Soft- ware related artifacts include algorithms, sp eci cations, designs, do cumentation, rep ort, ... Promote formation, growth, and interop eration of discipline-oriented rep ositories that organize, evaluate, and add value to individual contributions. Employ and develop where necessary state-of-the-art technologies for assisting users in nding, understanding, and using HPCC software and technologies. 5 Bene ts: 1. Faster development of high-quality software so that scientists can sp end less time writing and debugging programs and more time on research problems. 2. Less duplication of software development e ort by sharing of soft- ware mo dules.
    [Show full text]
  • Scipy 1.0: Fundamental Algorithms for Scientific Computing in Python
    PERSPECTIVE https://doi.org/10.1038/s41592-019-0686-2 SciPy 1.0: fundamental algorithms for scientific computing in Python Pauli Virtanen1, Ralf Gommers 2*, Travis E. Oliphant2,3,4,5,6, Matt Haberland 7,8, Tyler Reddy 9, David Cournapeau10, Evgeni Burovski11, Pearu Peterson12,13, Warren Weckesser14, Jonathan Bright15, Stéfan J. van der Walt 14, Matthew Brett16, Joshua Wilson17, K. Jarrod Millman 14,18, Nikolay Mayorov19, Andrew R. J. Nelson 20, Eric Jones5, Robert Kern5, Eric Larson21, C J Carey22, İlhan Polat23, Yu Feng24, Eric W. Moore25, Jake VanderPlas26, Denis Laxalde 27, Josef Perktold28, Robert Cimrman29, Ian Henriksen6,30,31, E. A. Quintero32, Charles R. Harris33,34, Anne M. Archibald35, Antônio H. Ribeiro 36, Fabian Pedregosa37, Paul van Mulbregt 38 and SciPy 1.0 Contributors39 SciPy is an open-source scientific computing library for the Python programming language. Since its initial release in 2001, SciPy has become a de facto standard for leveraging scientific algorithms in Python, with over 600 unique code contributors, thou- sands of dependent packages, over 100,000 dependent repositories and millions of downloads per year. In this work, we provide an overview of the capabilities and development practices of SciPy 1.0 and highlight some recent technical developments. ciPy is a library of numerical routines for the Python program- has become the standard others follow and has seen extensive adop- ming language that provides fundamental building blocks tion in research and industry. Sfor modeling and solving scientific problems. SciPy includes SciPy’s arrival at this point is surprising and somewhat anoma- algorithms for optimization, integration, interpolation, eigenvalue lous.
    [Show full text]
  • Section “Creating R Packages” in Writing R Extensions
    Writing R Extensions Version 3.0.0 RC (2013-03-28) R Core Team Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the R Core Team. Copyright c 1999{2013 R Core Team i Table of Contents Acknowledgements ::::::::::::::::::::::::::::::::: 1 1 Creating R packages:::::::::::::::::::::::::::: 2 1.1 Package structure :::::::::::::::::::::::::::::::::::::::::::::: 3 1.1.1 The `DESCRIPTION' file :::::::::::::::::::::::::::::::::::: 4 1.1.2 Licensing:::::::::::::::::::::::::::::::::::::::::::::::::: 9 1.1.3 The `INDEX' file :::::::::::::::::::::::::::::::::::::::::: 10 1.1.4 Package subdirectories:::::::::::::::::::::::::::::::::::: 11 1.1.5 Data in packages ::::::::::::::::::::::::::::::::::::::::: 14 1.1.6 Non-R scripts in packages :::::::::::::::::::::::::::::::: 15 1.2 Configure and cleanup :::::::::::::::::::::::::::::::::::::::: 16 1.2.1 Using `Makevars'::::::::::::::::::::::::::::::::::::::::: 19 1.2.1.1 OpenMP support:::::::::::::::::::::::::::::::::::: 22 1.2.1.2
    [Show full text]
  • A. an Introduction to Scientific Computing with Python
    August 30, 2013 Time: 06:43pm appendixa.tex A. An Introduction to Scientific Computing with Python “The world’s a book, writ by the eternal art – Of the great author printed in man’s heart, ’Tis falsely printed, though divinely penned, And all the errata will appear at the end.” (Francis Quarles) n this appendix we aim to give a brief introduction to the Python language1 and Iits use in scientific computing. It is intended for users who are familiar with programming in another language such as IDL, MATLAB, C, C++, or Java. It is beyond the scope of this book to give a complete treatment of the Python language or the many tools available in the modules listed below. The number of tools available is large, and growing every day. For this reason, no single resource can be complete, and even experienced scientific Python programmers regularly reference documentation when using familiar tools or seeking new ones. For that reason, this appendix will emphasize the best ways to access documentation both on the web and within the code itself. We will begin with a brief history of Python and efforts to enable scientific computing in the language, before summarizing its main features. Next we will discuss some of the packages which enable efficient scientific computation: NumPy, SciPy, Matplotlib, and IPython. Finally, we will provide some tips on writing efficient Python code. Some recommended resources are listed in §A.10. A.1. A brief history of Python Python is an open-source, interactive, object-oriented programming language, cre- ated by Guido Van Rossum in the late 1980s.
    [Show full text]
  • GNU Octave a High-Level Interactive Language for Numerical Computations Edition 3 for Octave Version 3.0.1 July 2007
    GNU Octave A high-level interactive language for numerical computations Edition 3 for Octave version 3.0.1 July 2007 John W. Eaton David Bateman Søren Hauberg Copyright c 1996, 1997, 1999, 2000, 2001, 2002, 2005, 2006, 2007 John W. Eaton. This is the third edition of the Octave documentation, and is consistent with version 3.0.1 of Octave. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the con- ditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another lan- guage, under the same conditions as for modified versions. Portions of this document have been adapted from the gawk, readline, gcc, and C library manuals, published by the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301{1307, USA. i Table of Contents Preface :::::::::::::::::::::::::::::::::::::::::::::: 1 Acknowledgements :::::::::::::::::::::::::::::::::::::::::::::::::: 1 How You Can Contribute to Octave ::::::::::::::::::::::::::::::::: 4 Distribution ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1 A Brief Introduction to Octave :::::::::::::::: 5 1.1 Running Octave:::::::::::::::::::::::::::::::::::::::::::::::: 5 1.2 Simple Examples :::::::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Fortran Optimizing Compiler 6
    Numerical Libraries for General Interest Seminars 2015 Scientific Computing April 1, 2015 Ge Baolai SHARCNET Faculty of Science Western University Topics . Numerical libraries for scientific computing . Numerical libraries at SHARCNET . Examples – Linear algebra – FFTW – ODE solvers – Optimization – GSL – Multiprecision with MPFUN – PETSc (PDE solvers) . Q&A Overview Numerical Libraries SEMINARS 2015 Numerical Computing . Linear algebra . Nonlinear equations . Optimization . Interpolation/Approximation . Integration and differentiation . Solving ODEs . Solving PDEs . FFT . Random numbers and stochastic simulations . Special functions Copyright © 2001-2015 Western University Seminar Series on Scientific and High Performance Computing, London, Ontario, 2015 Numerical Libraries SEMINARS 2015 More fundamental problems: . Linear algebra . Nonlinear equations . Numerical integration . ODE . FFT . Random numbers . Special functions Copyright © 2001-2015 Western University Seminar Series on Scientific and High Performance Computing, London, Ontario, 2015 Numerical Libraries SEMINARS 2015 Top Ten Algorithms for Science (Jack Dongarra 2000) 1. Metropolis Algorithm for Monte Carlo 2. Simplex Method for Linear Programming 3. Krylov Subspace Iteration Methods 4. The Decompositional Approach to Matrix Computations 5. The Fortran Optimizing Compiler 6. QR Algorithm for Computing Eigenvalues 7. Quicksort Algorithm for Sorting 8. Fast Fourier Transform 9. Integer Relation Detection 10. Fast Multipole Method Copyright © 2001-2015 Western University Seminar
    [Show full text]
  • Numerical and Scientific Computing in Python
    Numerical and Scientific Computing in Python v0.1 Spring 2019 Research Computing Services IS & T Running Python for the Tutorial . If you have an SCC account, log on and use Python there. Run: module load python/3.6.2 spyder & unzip /projectnb/scv/python/NumSciPythonCode_v0.1.zip . Note that the spyder program takes a while to load! Links on the Rm 107 Terminals . On the Desktop open the folder: Tutorial Files RCS_Tutorials Tutorial Files . Copy the whole Numerical and Scientific Computing in Python folder to the desktop or to a flash drive. When you log out the desktop copy will be deleted! Run Spyder . Click on the Start Menu in the bottom left corner and type: spyder . After a second or two it will be found. Click to run it. Be patient…it takes a while to start. Outline . Python lists . The numpy library . Speeding up numpy: numba and numexpr . Libraries: scipy and opencv . Alternatives to Python Python’s strengths . Python is a general purpose language. Unlike R or Matlab which started out as specialized languages . Python lends itself to implementing complex or specialized algorithms for solving computational problems. It is a highly productive language to work with that’s been applied to hundreds of subject areas. Extending its Capabilities . However…for number crunching some aspects of the language are not optimal: . Runtime type checks . No compiler to analyze a whole program for optimizations . General purpose built-in data structures are not optimal for numeric calculations . “regular” Python code is not competitive with compiled languages (C, C++, Fortran) for numeric computing.
    [Show full text]
  • A MATLAB Toolbox for Infinite Integrals of Product of Bessel Functions
    A IIPBF: a MATLAB toolbox for infinite integrals of product of Bessel functions J. TILAK RATNANATHER, Johns Hopkins University JUNG H. KIM, Johns Hopkins University SIRONG ZHANG, Beihang University ANTHONY M. J. DAVIS, University of California San Diego STEPHEN K. LUCAS, James Madison University A MATLAB toolbox, IIPBF, for calculating infinite integrals involving a product of two Bessel functions Ja(ρx)Jb(τx),Ja(ρx)Yb(τx) and Ya(ρx)Yb(τx), for non-negative integers a, b, and a well behaved function f(x), is described. Based on the Lucas algorithm previously developed for Ja(ρx)Jb(τx) only, IIPBF recasts each product as the sum of two functions whose oscillatory behavior is exploited in the three step procedure of adaptive integration, summation and extrapolation. The toolbox uses customised QUADPACK and IMSL func- tions from a MATLAB conversion of the SLATEC library. In addition, MATLAB’s own quadgk function for adaptive Gauss-Kronrod quadrature results in a significant speed up compared with the original algorithm. Usage of IIPBF is described and thirteen test cases illustrate the robustness of the toolbox. The first five of these and five additional cases are used to compare IIPBF with the BESSELINT code for rational and exponential forms of f(x) with Ja(ρx)Jb(τx). An appendix shows a novel derivation of formulae for three cases. Categories and Subject Descriptors: G.1.4 [Numerical Analysis]: Quadrature and Numerical Differentia- tion; G.4 [Mathematics of Computing]: Mathematical Software General Terms: Bessel Function, Quadrature Additional Key Words and Phrases: extrapolation, adaptive quadrature, summation ACM Reference Format: Ratnanather, J.
    [Show full text]
  • Package 'Pracma'
    Package ‘pracma’ January 23, 2021 Type Package Version 2.3.3 Date 2021-01-22 Title Practical Numerical Math Functions Depends R (>= 3.1.0) Imports graphics, grDevices, stats, utils Suggests NlcOptim, quadprog Description Provides a large number of functions from numerical analysis and linear algebra, numerical optimization, differential equations, time series, plus some well-known special mathematical functions. Uses 'MATLAB' function names where appropriate to simplify porting. License GPL (>= 3) ByteCompile true LazyData yes Author Hans W. Borchers [aut, cre] Maintainer Hans W. Borchers <[email protected]> Repository CRAN Repository/R-Forge/Project optimist Repository/R-Forge/Revision 495 Repository/R-Forge/DateTimeStamp 2021-01-22 18:52:59 Date/Publication 2021-01-23 10:10:02 UTC NeedsCompilation no R topics documented: pracma-package . .8 abm3pc . 11 accumarray . 12 agmean . 14 aitken . 16 1 2 R topics documented: akimaInterp . 17 and, or . 19 andrewsplot . 20 angle . 21 anms............................................. 22 approx_entropy . 23 arclength . 25 arnoldi . 28 barylag . 29 barylag2d . 30 bernoulli . 32 bernstein . 34 bisect . 35 bits.............................................. 37 blanks . 38 blkdiag . 38 brentDekker . 39 brown72 . 40 broyden . 41 bsxfun . 43 bulirsch-stoer . 44 bvp ............................................. 46 cart2sph . 47 cd, pwd, what . 48 ceil.............................................. 49 charpoly . 50 chebApprox . 51 chebCoeff . 52 chebPoly . 53 circlefit . 54 clear, who(s), ver . 56 clenshaw_curtis . 57 combs . 58 compan . 58 complexstep . 59 cond............................................. 61 conv............................................. 62 cot,csc,sec, etc. 63 cotes . 64 coth,csch,sech, etc. 65 cranknic . 66 cross . 68 crossn . 69 cubicspline . 70 curvefit . 71 cutpoints . 73 dblquad . 74 deconv . 76 R topics documented: 3 deeve ............................................ 77 deg2rad . 78 detrend . 78 deval............................................
    [Show full text]
  • INTEGRALS and DERIVATIVES #------# Chapter 5 of the Book
    #--------------------------- # INTEGRALS and DERIVATIVES #--------------------------- # Chapter 5 of the book # Some YouTube videos about integrals # https://www.youtube.com/watch?v=eis11j_iGMs # https://www.youtube.com/watch?v=4grhQ5Y_MWo # SciPy page about integrals # https://docs.scipy.org/doc/scipy/reference/tutorial/integrate.html # SINGLE INTEGRAL: area under a curve # DOUBLE INTEGRAL: volume under a surface #--------------------------- # SCIPY #--------------------------- # We can do derivatives and integrals using SCIPY # # Page with explanantions about SciPy # https://www.southampton.ac.uk/~fangohr/teaching/python/book/html/16- scipy.html # # Numpy module: vectors, matrices and linear algebra tools. # Matplotlib package: plots and visualisations. # Scipy package: a multitude of numerical algorithms. # # Many of the numerical algorithms available through scipy and numpy are # provided by established compiled libraries which are often written # in Fortran or C. They will thus execute much faster than pure Python code. # As a rule of thumb, we expect compiled code to be two orders of magnitude # faster than pure Python code. # Scipy is built on numpy. # All functionality from numpy seems to be available in scipy as well. import numpy as np x = np.arange(0, 10, 1.) y = np.sin(x) print(y) import scipy as sp x = sp.arange(0, 10, 1.) y = sp.sin(x) print(y) #%% #--------------------------- # LAMBDA FUNCTION #--------------------------- print() # Lambda function is similar to a definition, # but # *) the lambda definition does not include
    [Show full text]
  • Netlib and NA-Net: Building a Scientific Computing Community
    Netlib and NA-Net: building a scientific computing community Jack Dongarra, Gene Golub, Eric Grosse, Cleve Moler, Keith Moore Abstract The Netlib software repository was created in 1984 to facilitate quick distribution of public domain software routines for use in scientific computation. The Numerical Analysis Net (or "NA Net") had its roots in the same period, beginning as a simple file of contact information for numerical analysts and evolving into an email forwarding service for that community. It soon evolved to support a regular electronic mail newsletter, and eventually an online directory service. Both of these services are still in operation and enjoy wide use today. While they are and always have been distinct services, Netlib and NA-Net's histories are intertwined. This document gives the system authors' perspective on how and why Netlib and NA-Net came to exist and impact on their user communities. Keywords: Mathematical Software, scientific computation, public domain, 1. Introduction With today's effortless access to open source software and data via a high-speed Internet and good search engines, it is hard to remember how different the life of computational scientists was in the seventies and early eighties. Computing was mostly done in a mainframe world, typically supported by one of the few commercial numerical libraries installed by computer center staff. Since this left large gaps, scientists wrote or borrowed additional software. There were a few exemplary libraries such as EISPACK in circulation, and a larger body of Fortran programs of variable quality. Getting them was a bothersome process involving personal contacts, government bureaucracies, negotiated legal agreements, and the expensive and unreliable shipping of 9-track magnetic tapes or punch card decks.
    [Show full text]