keisoku

Tanh-Sinh Quadrature Nodes & Weights

List the abscissas x_k and weights w_k of Tanh-Sinh (double exponential) quadrature from a step size and node count. Enter an integrand to also get the approximate integral over (-1, 1).

Input

Enter a step size h and half-side node count n to list the Tanh-Sinh abscissas x_k and weights w_k. Provide an integrand f(x) to also approximate the integral over (-1, 1).

Grid spacing (0 < h ≤ 2). Smaller gives higher accuracy

k = -n … n (2n+1 nodes total, max 200)

e.g. 1/sqrt(1-x^2). Leave blank to show only nodes and weights

Result

Approximate integral ∫₋₁¹ f(x) dx

3.1415926717

Step size h

0.5

Node count

13

Weight sum Σw_k

2.0000067191

Nodes and weights

kNode x_kWeight w_k
-6-10
-5-0.99999998890.0000001072
-4-0.99997747720.0001331003
-3-0.99751485650.0091715835
-2-0.95136796410.1150111973
-1-0.67427149220.4829882897
000.7853981634
10.67427149220.4829882897
20.95136796410.1150111973
30.99751485650.0091715835
40.99997747720.0001331003
50.99999998890.0000001072
610

How it works

  • Tanh-Sinh quadrature (the double exponential, or DE, rule) integrates over the interval (-1, 1) using the substitution x = tanh((π/2)·sinh(t)) and an equally spaced grid t = k·h.
  • For a step size h and integer k, the abscissa is x_k = tanh((π/2)·sinh(kh)) and the weight is w_k = ((π/2)·h·cosh(kh)) / cosh²((π/2)·sinh(kh)).
  • With a half-side node count n, the rule uses 2n+1 nodes (k = -n … n). Weights decay double-exponentially toward the endpoints ±1, which makes the rule robust for integrands with endpoint singularities.
  • When an integrand f(x) is provided, the tool reports ∫_{-1}^{1} f(x) dx ≈ Σ_k w_k·f(x_k). For an integral over [a, b], change variables in advance, e.g. x = ((b-a)x' + (a+b))/2.
  • The expression syntax supports +, -, *, / and ^ (power), parentheses, unary minus, and implicit multiplication (e.g. 2x), with variable x, constants pi and e, and functions sin cos tan asin acos atan sinh cosh tanh exp log ln log10 sqrt cbrt abs.
  • All computation uses double-precision floating point, so very small h or large n may accumulate rounding error. Displayed digits are rounded approximations rather than exact values.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Tanh-Sinh Quadrature Nodes & Weights