@danielsimonjr/mathts-functions 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +435 -331
- package/dist/special/mathieu.d.ts +67 -0
- package/dist/special/mathieu.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mathieu functions: the characteristic values `a_n(q)` / `b_n(q)` and the
|
|
3
|
+
* `2π`-periodic angular functions `ce_n(x, q)` / `se_n(x, q)` of the Mathieu
|
|
4
|
+
* equation
|
|
5
|
+
*
|
|
6
|
+
* y'' + (a − 2q·cos 2x)·y = 0.
|
|
7
|
+
*
|
|
8
|
+
* Method — the symmetric tridiagonal eigenvalue problem. Expanding the periodic
|
|
9
|
+
* solutions in a Fourier series produces a three-term recurrence among the
|
|
10
|
+
* coefficients, which is a symmetric tridiagonal eigenproblem in each of the
|
|
11
|
+
* four parity classes (DLMF §28.4). The eigenvalues are the characteristic
|
|
12
|
+
* values; the eigenvectors are the Fourier coefficients. We build the truncated
|
|
13
|
+
* matrix and reuse the maintained symmetric eigensolver in
|
|
14
|
+
* `@danielsimonjr/mathts-matrix` (`eig`).
|
|
15
|
+
*
|
|
16
|
+
* Normalization / sign — the standard DLMF / Abramowitz & Stegun convention
|
|
17
|
+
* (identical to `mpmath`/`scipy`): `(1/π)∫₀^{2π} ce_n(x,q)² dx = 1` (so
|
|
18
|
+
* `ce_0(x,0) = 1/√2`, `ce_n(x,0) = cos nx`, `se_n(x,0) = sin nx` for `n ≥ 1`),
|
|
19
|
+
* with the global sign fixed so the dominant Fourier coefficient is positive.
|
|
20
|
+
* Oracle-pinned against `scipy.special` (the installed `mpmath` 1.3.0 lacks the
|
|
21
|
+
* Mathieu family) in `functions/tests/gap-special-mathieu-oracle.test.ts`.
|
|
22
|
+
*
|
|
23
|
+
* These follow the same plain-exported-function pattern as `wave-functions.ts`
|
|
24
|
+
* and `niche.ts` — pure real-valued `number`-in/`number`-out math.
|
|
25
|
+
*
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
*/
|
|
28
|
+
/** 64-bit float (default for decimals) */
|
|
29
|
+
type f64 = number;
|
|
30
|
+
/**
|
|
31
|
+
* Characteristic value `a_n(q)` for the even (cosine-elliptic `ce_n`) Mathieu
|
|
32
|
+
* solutions. As `q → 0`, `a_n → n²`.
|
|
33
|
+
*
|
|
34
|
+
* @param n - Nonnegative integer order.
|
|
35
|
+
* @param q - Mathieu parameter.
|
|
36
|
+
*/
|
|
37
|
+
export declare function mathieuA(n: number, q: f64): f64;
|
|
38
|
+
/**
|
|
39
|
+
* Characteristic value `b_n(q)` for the odd (sine-elliptic `se_n`) Mathieu
|
|
40
|
+
* solutions, `n ≥ 1`. As `q → 0`, `b_n → n²`.
|
|
41
|
+
*
|
|
42
|
+
* @param n - Integer order ≥ 1.
|
|
43
|
+
* @param q - Mathieu parameter.
|
|
44
|
+
*/
|
|
45
|
+
export declare function mathieuB(n: number, q: f64): f64;
|
|
46
|
+
/**
|
|
47
|
+
* Angular Mathieu function `ce_n(x, q)` (cosine-elliptic), summed from its
|
|
48
|
+
* Fourier coefficients. Normalized so `(1/π)∫₀^{2π} ce_n² = 1`; as `q → 0`,
|
|
49
|
+
* `ce_0 → 1/√2` and `ce_n → cos(nx)` for `n ≥ 1`.
|
|
50
|
+
*
|
|
51
|
+
* @param n - Nonnegative integer order.
|
|
52
|
+
* @param q - Mathieu parameter.
|
|
53
|
+
* @param x - Argument in radians.
|
|
54
|
+
*/
|
|
55
|
+
export declare function mathieuCe(n: number, q: f64, x: f64): f64;
|
|
56
|
+
/**
|
|
57
|
+
* Angular Mathieu function `se_n(x, q)` (sine-elliptic), `n ≥ 1`, summed from
|
|
58
|
+
* its Fourier coefficients. Normalized so `(1/π)∫₀^{2π} se_n² = 1`; as `q → 0`,
|
|
59
|
+
* `se_n → sin(nx)`.
|
|
60
|
+
*
|
|
61
|
+
* @param n - Integer order ≥ 1.
|
|
62
|
+
* @param q - Mathieu parameter.
|
|
63
|
+
* @param x - Argument in radians.
|
|
64
|
+
*/
|
|
65
|
+
export declare function mathieuSe(n: number, q: f64, x: f64): f64;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=mathieu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mathieu.d.ts","sourceRoot":"","sources":["../../src/special/mathieu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,0CAA0C;AAC1C,KAAK,GAAG,GAAG,MAAM,CAAC;AAiIlB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAK/C;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAK/C;AAUD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAKxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAKxD"}
|
package/package.json
CHANGED