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
| k | Node x_k | Weight w_k |
|---|---|---|
| -6 | -1 | 0 |
| -5 | -0.9999999889 | 0.0000001072 |
| -4 | -0.9999774772 | 0.0001331003 |
| -3 | -0.9975148565 | 0.0091715835 |
| -2 | -0.9513679641 | 0.1150111973 |
| -1 | -0.6742714922 | 0.4829882897 |
| 0 | 0 | 0.7853981634 |
| 1 | 0.6742714922 | 0.4829882897 |
| 2 | 0.9513679641 | 0.1150111973 |
| 3 | 0.9975148565 | 0.0091715835 |
| 4 | 0.9999774772 | 0.0001331003 |
| 5 | 0.9999999889 | 0.0000001072 |
| 6 | 1 | 0 |
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.
Related calculators
DE-Formula Integration over (a, ∞)
NumericalEnter f(x), a lower limit a, and the number of nodes to evaluate the half-infinite integral over (a, ∞) accurately with the double exponential (DE) formula.
Open calculator →DE Formula Half-Infinite Integral (Lower, −∞ to b)
NumericalNumerically evaluate a definite integral over the half-infinite interval (−∞, b) using the double-exponential (DE) formula. Just enter f(x), the upper limit b, and the number of nodes.
Open calculator →Gauss-Chebyshev (First Kind) Nodes and Weights
NumericalEnter the order n to list the Gauss-Chebyshev (first kind) quadrature nodes x_i = cos((2i−1)π/2n) and weights w_i = π/n.
Open calculator →Gauss-Jacobi Quadrature Nodes and Weights
NumericalCompute the nodes and weights of Gauss-Jacobi quadrature for the weight (1-x)^a (1+x)^b from the degree n and parameters a and b, shown in a table.
Open calculator →
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Tanh-Sinh Quadrature Nodes & Weights