Methods
Own
(static) aitken(s_n, n, a) → {Number}
Aitken transformation. Ported from the FORTRAN version in Ernst Joachim Weniger, "Nonlinear sequence transformations for the acceleration of convergence and the summation of divergent series", Computer Physics Reports Vol. 10, 189-371 (1989).
Parameters
| Name | Type | Description |
|---|---|---|
s_n |
Number | next value of sequence, i.e. n-th element of sequence |
n |
Number | index of s_n in the sequence |
a |
Array | One-dimensional array containing the extrapolation data. Has to be supplied by the calling routine. |
Returns
New estimate of the limit of the sequence.
- Type
- Number
Details
- Source
- math/extrapolate.js, line 131
(static) brezinski(s_n, n, a) → {Number}
Iterated Brezinski transformation. Ported from the FORTRAN version in Ernst Joachim Weniger, "Nonlinear sequence transformations for the acceleration of convergence and the summation of divergent series", Computer Physics Reports Vol. 10, 189-371 (1989).
Parameters
| Name | Type | Description |
|---|---|---|
s_n |
Number | next value of sequence, i.e. n-th element of sequence |
n |
Number | index of s_n in the sequence |
a |
Array | One-dimensional array containing the extrapolation data. Has to be supplied by the calling routine. |
Returns
New estimate of the limit of the sequence.
- Type
- Number
Details
- Source
- math/extrapolate.js, line 173
(static) iteration(x0, h0, f, method, step_type) → {Array}
Extrapolated iteration to approximate the value f(x_0).
Parameters
| Name | Type | Description |
|---|---|---|
x0 |
Number | Value for which the limit of f is to be determined. f(x0) may or may not exist. |
h0 |
Number | Initial (signed) distance from x0. |
f |
function | Function for which the limit at x0 is to be determined |
method |
String | String to choose the method. Available values: "wynnEps", "aitken", "brezinski" |
step_type |
Number | Approximation method. step_type = 0 uses the sequence x0 + h0/n; step_type = 1 uses the sequence x0 + h0 * 2^(-n) |
Returns
Array of length 3. Position 0: estimated value for f(x0), position 1: 'finite', 'infinite', or 'NaN'. Position 2: value between 0 and 1 judging the reliability of the result (1: high, 0: not successful).
- Type
- Array
Details
(static) levin(s_n, n, numer, denom)
Levin transformation. See Numerical Recipes, ed. 3. Not yet ready for use.
Parameters
| Name | Type | Description |
|---|---|---|
s_n |
Number | next value of sequence, i.e. n-th element of sequence |
n |
Number | index of s_n in the sequence |
numer |
Array | One-dimensional array containing the extrapolation data for the numerator. Has to be supplied by the calling routine. |
denom |
Array | One-dimensional array containing the extrapolation data for the denominator. Has to be supplied by the calling routine. |
Details
- Source
- math/extrapolate.js, line 274
(static) limit(x0, h0, f) → {Array}
Example
var f1 = (x) => Math.log(x),
f2 = (x) => Math.tan(x - Math.PI * 0.5),
f3 = (x) => 4 / x;
var x0 = 0.0000001;
var h = 0.1;
for (let f of [f1, f2, f3]) {
console.log("JSXGraph example: x0=", x0, f.toString());
console.log("JSXGraph example: ", JXG.Math.Extrapolate.limit(x0, h, f).join(', '));
}
// Output:
// JSXGraph example: x0= 1e-7 (x) => Math.log(x)
// JSXGraph example: -2237.727342885339, finite, 0
//
// JSXGraph example: x0= 1e-7 (x) => Math.tan(x - Math.PI * 0.5)
// JSXGraph example: -11056039.511692017, infinite, 0.5333333333333333
//
// JSXGraph example: x0= 1e-7 (x) => 4 / x
// JSXGraph example: 20000039.99939709, infinite, 0.9333333333333333
Parameters
| Name | Type | Description |
|---|---|---|
x0 |
Number | Value for which the limit of f is to be determined. f(x0) may or may not exist. |
h0 |
Number | Initial (signed) distance from x0. |
f |
function | Function for which the limit at x0 is to be determined |
Returns
Array of length 3. Position 0: estimated value for f(x0), position 1: 'finite', 'infinite', or 'NaN'. Position 2: value between 0 and 1 judging the reliability of the result (1: high, 0: not successful). In case that the extrapolation fails, position 1 and 2 contain 'direct' and 0.
- Type
- Array
Details
(static) wynnEps(s_n, n, e) → {Number}
Wynn's epsilon algorithm. Ported from the FORTRAN version in Ernst Joachim Weniger, "Nonlinear sequence transformations for the acceleration of convergence and the summation of divergent series", Computer Physics Reports Vol. 10, 189-371 (1989).
Parameters
| Name | Type | Description |
|---|---|---|
s_n |
Number | next value of sequence, i.e. n-th element of sequence |
n |
Number | index of s_n in the sequence |
e |
Array | One-dimensional array containing the extrapolation data. Has to be supplied by the calling routine. |
Returns
New estimate of the limit of the sequence.
- Type
- Number
Details
- Source
- math/extrapolate.js, line 58
Inherited
none