Numerical Integration With Tanh-Sinh Quadrature v 5.0

Graeme Dennes has updated his Tanh-Sinh Quadrature spreadsheet to V 5.0. The new version (including full open source code) may be downloaded from:

Tanh-Sinh Quadrature

Graeme’s summary of the new features in the spreadsheet:

The Tanh-Sinh quadrature workbook has been enhanced as follows:

The Tanh-Sinh integrator in the workbook is the fastest and simplest finite-interval integrator on the planet!! It’s the new benchmark for Tanh-Sinh integrator performance!

The speed of the Tanh-Sinh, DE1, DE2 and DE3 programs has been increased through using recent (2017) programs provided by César Rodríguez. The programs are simpler and faster than those used previously. The state-of-the-art in Tanh-Sinh integration has been moved forward.

A fast finite interval program TINT has been added. It runs at over twice the speed of the Gauss-Kronrod program.

The speed of the Gauss-Kronrod program has been improved through modifications developed by Berntsen, Espelid and Sorevik.

The Romberg integrator, written by the author, may be the fastest and most accurate Romberg integrator on the planet!!

Now includes over 1200 test integrals with true results. This may be the largest set of diverse test integrals available at no cost. It includes several of the “standard” sets of test integrals in wide use.

The Plotter worksheet now shows two plots: the plot of the selected function over the finite interval (a,b), and the plot of the selected function after being transformed by the Tanh-Sinh function.

My on-sheet demonstration of the workings of the Tanh-Sinh code has now also been added to the spreadsheet (see Numerical integration with on-sheet calculations for background and sample screen-shots).

The WP 34s version of the code by César Rodríguez is available from :

https://www.hpmuseum.org/forum/thread-8021-page-2.html

See the Copyright tab of the download spreadsheet for many other links.

Update: 7th Nov 2020:

Graeme has made a minor correction to the double-exponential limit constant (now set to 6.56) in the 2 x T-S and 3 x DE programs. This is the figure for which exp(exp(6.56)) remains (just) under the 1.79 x 10^308 max figure as set by IEEE 754.

The version number is now 5.01, and the new version may be downloaded from the link at the top of this post.

This entry was posted in Excel, Maths, Newton, Numerical integration, UDFs, VBA and tagged , , , , . Bookmark the permalink.

13 Responses to Numerical Integration With Tanh-Sinh Quadrature v 5.0

  1. Bernard Gourion says:

    Hello,
    I just tested your spreadsheet. That is a great work but i encounter difficulty to make it run properly because it seems the VBA code doesn’t compilate on my version of Excel office 2016 32 bits

    Like

  2. John Maddock says:

    Hi there, I can’t find a direct contact for Graeme, but I wonder if we might have permission to use your list of test functions in the Boost C++ software project (www.boost.org) for testing against our DE integrators (https://www.boost.org/doc/libs/master/libs/math/doc/html/math_toolkit/double_exponential/de_tanh_sinh.html). We would obviously give full attribution, but unfortunately we are NOT able to use the GPL licence, it has to be this one: https://www.boost.org/LICENSE_1_0.txt. If you’re able to put me in touch with whoever can agree or not to this that would be wonderful.

    Many thanks for your help in this.

    Like

  3. Graeme Dennes says:

    Hello John,
    Thank you very much for your interest in my Tanh-Sinh spreadsheet and for your professional courtesy.

    The spreadsheet is protected under the GNU General Public Licence to ensure its programs, source codes and test suites always remain free and open, for access and use for personal education and research only. This was the driver: to provide the spreadsheet as an open learning tool for private individuals. The current licence meets this goal. The licence conditions also extend to derivative products and components based on or drawn from the spreadsheet.

    Thus, in answer to your message, as the licence provides for personal usage only, then unfortunately, your organisation would not be authorised to use the test functions from the spreadsheet. I’m very sorry.

    I wish you well with your project. It appears most interesting.
    Thank you John and thank you Doug.
    Graeme Dennes

    Like

    • John Maddock says:

      Many thanks for the prompt response – much appreciated.

      On reflection, there’s no particular need for the Boost end user to see any of this, so I’ve put the C++ translation of your test cases in their own GPL licenced repository here: https://github.com/jzmaddock/tanhsinh-test-cases.

      I’m hoping to get around to adding more test cases to cover various special functions, I’ll be in touch if I do in case you want to add additional cases to your speadsheet.

      Regards, John Maddock.

      Like

  4. John Maddock says:

    Not sure if this is the correct place to report bugs, but test case 189 ((x^2-x)^2/(x^3-3*x+1)^2
    ) has the expected result given as 0.103416050831920, but the correct value appears to be 0.10267032259697719985493258, see https://www.wolframalpha.com/input/?i=integrate+%28x%5E2-x%29%5E2%2F%28x%5E3-3*x%2B1%29%5E2+for+x+%3D+-100+to+-10

    Like

    • John Maddock says:

      Test case 220 is also out, the expected result of PI is only valid if the bounds are [-INF,INF], for the given bounds of [-10,10] the expected result should be 3.140901252819141519498772949864160483941484030830

      Like

  5. Graeme Dennes says:

    Hi John,
    Thank you for your keen eye and for your interest in the Tanh-Sinh method.
    It indeed appears the expected results shown in the spreadsheet for test cases 189 and 220 are incorrect so I will correct these and send the revised spreadsheet to Doug.
    Thank you very much for taking the time to bring these errors to my attention.
    Regards,
    Graeme Dennes

    Like

  6. Pingback: Tanh-Sinh Quadrature v. 5.3 | Newton Excel Bach, not (just) an Excel Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.