Post Reply 
The tanh-sinh quadrature
03-08-2017, 01:52 AM
Post: #16
RE: The tanh-sinh quadrature
Hi again.

I finally found the time to write an integration program for the wp34s that uses this tanh-sinh algorithm. I checked its behaviour against that of the built-in integrator (a Romberg based one). It is even better than I expected. When working in SCI2/ENG2 both algorithms are equally fast, but when working with more significant digits the tanh-sinh one gets much faster, sometimes even 10+x faster.

As a bonus, it behaves much better in such cases when the integrand goes to infinity at the interval ends (being it still integrable, of course) or when the derivative goes to infinity at the ends.

On the other side, given the way this algorithm works: using much less sample points and concentrating them at the interval edges, some functions are difficult for it, namely:
  • oscillatory functions (say, integrate cos(x) over 4.25 periods)
  • functions that go to zero very fast when departing from the middle (think on a narrow bell-shaped function)
Usually the Romberg method gets better results for these kinds of functions, but taking a longer time to get the computation, though.

In any case, it seems to me that this method is, no doubt, overall better than the usual Romberg one, so it will replace the built-in integration program on my wp34s machines soon.

In a few days I'll post the program listing (it is still in a primitive shape, not adequate to be seen by educated people), if someone is interested on it.

Regards.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
The tanh-sinh quadrature - emece67 - 01-31-2017, 03:19 PM
RE: The tanh-sinh quadrature - emece67 - 01-31-2017, 10:03 PM
RE: The tanh-sinh quadrature - Namir - 02-01-2017, 04:13 PM
RE: The tanh-sinh quadrature - Namir - 02-05-2017, 02:23 AM
RE: The tanh-sinh quadrature - emece67 - 02-05-2017, 09:25 AM
RE: The tanh-sinh quadrature - Namir - 02-05-2017, 01:35 PM
RE: The tanh-sinh quadrature - Pekis - 02-05-2017, 05:25 PM
RE: The tanh-sinh quadrature - Namir - 02-07-2017, 09:26 PM
RE: The tanh-sinh quadrature - emece67 - 02-07-2017, 10:59 PM
RE: The tanh-sinh quadrature - Namir - 02-07-2017, 11:18 PM
RE: The tanh-sinh quadrature - Namir - 02-07-2017, 11:48 PM
RE: The tanh-sinh quadrature - emece67 - 02-08-2017, 02:59 PM
RE: The tanh-sinh quadrature - Namir - 02-08-2017, 03:20 PM
RE: The tanh-sinh quadrature - Namir - 02-08-2017, 10:25 PM
RE: The tanh-sinh quadrature - Namir - 02-08-2017, 02:19 PM
RE: The tanh-sinh quadrature - emece67 - 03-08-2017 01:52 AM
RE: The tanh-sinh quadrature - Paul Dale - 03-08-2017, 02:42 AM
RE: The tanh-sinh quadrature - emece67 - 03-08-2017, 09:19 AM
RE: The tanh-sinh quadrature - emece67 - 03-09-2017, 11:30 AM
RE: The tanh-sinh quadrature - emece67 - 03-08-2017, 06:18 PM
RE: The tanh-sinh quadrature - Paul Dale - 03-09-2017, 02:32 AM



User(s) browsing this thread: 1 Guest(s)