NETGeographicLib  1.50.1
EllipticFunction.h
Go to the documentation of this file.
1 /**
2  * \file NETGeographicLib/EllipticFunction.h
3  * \brief Header for NETGeographicLib::EllipticFunction class
4  *
5  * NETGeographicLib is copyright (c) Scott Heiman (2013)
6  * GeographicLib is Copyright (c) Charles Karney (2010-2012)
7  * <charles@karney.com> and licensed under the MIT/X11 License.
8  * For more information, see
9  * https://geographiclib.sourceforge.io/
10  **********************************************************************/
11 #pragma once
12 
13 namespace NETGeographicLib
14 {
15  /**
16  * \brief .NET wrapper for GeographicLib::EllipticFunction.
17  *
18  * This class allows .NET applications to access GeographicLib::EllipticFunction.
19  *
20  * This provides the elliptic functions and integrals needed for Ellipsoid,
21  * GeodesicExact, and TransverseMercatorExact. Two categories of function
22  * are provided:
23  * - \e static functions to compute symmetric elliptic integrals
24  * (https://dlmf.nist.gov/19.16.i)
25  * - \e member functions to compute Legrendre's elliptic
26  * integrals (https://dlmf.nist.gov/19.2.ii) and the
27  * Jacobi elliptic functions (https://dlmf.nist.gov/22.2).
28  * .
29  * In the latter case, an object is constructed giving the modulus \e k (and
30  * optionally the parameter &alpha;<sup>2</sup>). The modulus is always
31  * passed as its square <i>k</i><sup>2</sup> which allows \e k to be pure
32  * imaginary (<i>k</i><sup>2</sup> &lt; 0). (Confusingly, Abramowitz and
33  * Stegun call \e m = <i>k</i><sup>2</sup> the "parameter" and \e n =
34  * &alpha;<sup>2</sup> the "characteristic".)
35  *
36  * In geodesic applications, it is convenient to separate the incomplete
37  * integrals into secular and periodic components, e.g.,
38  * \f[
39  * E(\phi, k) = (2 E(\phi) / \pi) [ \phi + \delta E(\phi, k) ]
40  * \f]
41  * where &delta;\e E(&phi;, \e k) is an odd periodic function with period
42  * &pi;.
43  *
44  * The computation of the elliptic integrals uses the algorithms given in
45  * - B. C. Carlson,
46  * <a href="https://doi.org/10.1007/BF02198293"> Computation of real or
47  * complex elliptic integrals</a>, Numerical Algorithms 10, 13--26 (1995)
48  * .
49  * with the additional optimizations given in https://dlmf.nist.gov/19.36.i.
50  * The computation of the Jacobi elliptic functions uses the algorithm given
51  * in
52  * - R. Bulirsch,
53  * <a href="https://doi.org/10.1007/BF01397975"> Numerical Calculation of
54  * Elliptic Integrals and Elliptic Functions</a>, Numericshe Mathematik 7,
55  * 78--90 (1965).
56  * .
57  * The notation follows https://dlmf.nist.gov/19 and https://dlmf.nist.gov/22
58  *
59  * C# Example:
60  * \include example-EllipticFunction.cs
61  * Managed C++ Example:
62  * \include example-EllipticFunction.cpp
63  * Visual Basic Example:
64  * \include example-EllipticFunction.vb
65  *
66  * <B>INTERFACE DIFFERENCES:</B><BR>
67  * The k2, kp2, alpha2, and alphap2 functions are implemented as properties.
68  **********************************************************************/
69  public ref class EllipticFunction
70  {
71  private:
72  // a pointer to the unmanaged GeographicLib::EllipticFunction.
73  GeographicLib::EllipticFunction* m_pEllipticFunction;
74 
75  // The finalizer frees the unmanaged memory.
77  public:
78  /** \name Constructor
79  **********************************************************************/
80  ///@{
81  /**
82  * Constructor specifying the modulus and parameter.
83  *
84  * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>.
85  * <i>k</i><sup>2</sup> must lie in (-&infin;, 1). (No checking is
86  * done.)
87  * @param[in] alpha2 the parameter &alpha;<sup>2</sup>.
88  * &alpha;<sup>2</sup> must lie in (-&infin;, 1). (No checking is done.)
89  *
90  * If only elliptic integrals of the first and second kinds are needed,
91  * then set &alpha;<sup>2</sup> = 0 (the default value); in this case, we
92  * have &Pi;(&phi;, 0, \e k) = \e F(&phi;, \e k), \e G(&phi;, 0, \e k) = \e
93  * E(&phi;, \e k), and \e H(&phi;, 0, \e k) = \e F(&phi;, \e k) - \e
94  * D(&phi;, \e k).
95  **********************************************************************/
96  EllipticFunction(double k2, double alpha2 );
97 
98  /**
99  * Constructor specifying the modulus and parameter and their complements.
100  *
101  * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>.
102  * <i>k</i><sup>2</sup> must lie in (-&infin;, 1). (No checking is
103  * done.)
104  * @param[in] alpha2 the parameter &alpha;<sup>2</sup>.
105  * &alpha;<sup>2</sup> must lie in (-&infin;, 1). (No checking is done.)
106  * @param[in] kp2 the complementary modulus squared <i>k'</i><sup>2</sup> =
107  * 1 &minus; <i>k</i><sup>2</sup>.
108  * @param[in] alphap2 the complementary parameter &alpha;'<sup>2</sup> = 1
109  * &minus; &alpha;<sup>2</sup>.
110  *
111  * The arguments must satisfy \e k2 + \e kp2 = 1 and \e alpha2 + \e alphap2
112  * = 1. (No checking is done that these conditions are met.) This
113  * constructor is provided to enable accuracy to be maintained, e.g., when
114  * \e k is very close to unity.
115  **********************************************************************/
116  EllipticFunction(double k2, double alpha2, double kp2, double alphap2);
117 
118  /**
119  * Destructor calls the finalizer.
120  **********************************************************************/
122  { this->!EllipticFunction(); }
123 
124  /**
125  * Reset the modulus and parameter.
126  *
127  * @param[in] k2 the new value of square of the modulus
128  * <i>k</i><sup>2</sup> which must lie in (-&infin;, 1). (No checking is
129  * done.)
130  * @param[in] alpha2 the new value of parameter &alpha;<sup>2</sup>.
131  * &alpha;<sup>2</sup> must lie in (-&infin;, 1). (No checking is done.)
132  **********************************************************************/
133  void Reset(double k2, double alpha2 );
134 
135  /**
136  * Reset the modulus and parameter supplying also their complements.
137  *
138  * @param[in] k2 the square of the modulus <i>k</i><sup>2</sup>.
139  * <i>k</i><sup>2</sup> must lie in (-&infin;, 1). (No checking is
140  * done.)
141  * @param[in] alpha2 the parameter &alpha;<sup>2</sup>.
142  * &alpha;<sup>2</sup> must lie in (-&infin;, 1). (No checking is done.)
143  * @param[in] kp2 the complementary modulus squared <i>k'</i><sup>2</sup> =
144  * 1 &minus; <i>k</i><sup>2</sup>.
145  * @param[in] alphap2 the complementary parameter &alpha;'<sup>2</sup> = 1
146  * &minus; &alpha;<sup>2</sup>.
147  *
148  * The arguments must satisfy \e k2 + \e kp2 = 1 and \e alpha2 + \e alphap2
149  * = 1. (No checking is done that these conditions are met.) This
150  * constructor is provided to enable accuracy to be maintained, e.g., when
151  * is very small.
152  **********************************************************************/
153  void Reset(double k2, double alpha2, double kp2, double alphap2);
154 
155  ///@}
156 
157  /** \name Inspector functions.
158  **********************************************************************/
159  ///@{
160  /**
161  * @return the square of the modulus <i>k</i><sup>2</sup>.
162  **********************************************************************/
163  property double k2 { double get(); }
164 
165  /**
166  * @return the square of the complementary modulus <i>k'</i><sup>2</sup> =
167  * 1 &minus; <i>k</i><sup>2</sup>.
168  **********************************************************************/
169  property double kp2 { double get(); }
170 
171  /**
172  * @return the parameter &alpha;<sup>2</sup>.
173  **********************************************************************/
174  property double alpha2 { double get(); }
175 
176  /**
177  * @return the complementary parameter &alpha;'<sup>2</sup> = 1 &minus;
178  * &alpha;<sup>2</sup>.
179  **********************************************************************/
180  property double alphap2 { double get(); }
181  ///@}
182 
183  /** \name Complete elliptic integrals.
184  **********************************************************************/
185  ///@{
186  /**
187  * The complete integral of the first kind.
188  *
189  * @return \e K(\e k).
190  *
191  * \e K(\e k) is defined in https://dlmf.nist.gov/19.2.E4
192  * \f[
193  * K(k) = \int_0^{\pi/2} \frac1{\sqrt{1-k^2\sin^2\phi}}\,d\phi.
194  * \f]
195  **********************************************************************/
196  double K();
197 
198  /**
199  * The complete integral of the second kind.
200  *
201  * @return \e E(\e k)
202  *
203  * \e E(\e k) is defined in https://dlmf.nist.gov/19.2.E5
204  * \f[
205  * E(k) = \int_0^{\pi/2} \sqrt{1-k^2\sin^2\phi}\,d\phi.
206  * \f]
207  **********************************************************************/
208  double E();
209 
210  /**
211  * Jahnke's complete integral.
212  *
213  * @return \e D(\e k).
214  *
215  * \e D(\e k) is defined in https://dlmf.nist.gov/19.2.E6
216  * \f[
217  * D(k) = \int_0^{\pi/2} \frac{\sin^2\phi}{\sqrt{1-k^2\sin^2\phi}}\,d\phi.
218  * \f]
219  **********************************************************************/
220  double D();
221 
222  /**
223  * The difference between the complete integrals of the first and second
224  * kinds.
225  *
226  * @return \e K(\e k) &minus; \e E(\e k).
227  **********************************************************************/
228  double KE();
229 
230  /**
231  * The complete integral of the third kind.
232  *
233  * @return &Pi;(&alpha;<sup>2</sup>, \e k)
234  *
235  * &Pi;(&alpha;<sup>2</sup>, \e k) is defined in
236  * https://dlmf.nist.gov/19.2.E7
237  * \f[
238  * \Pi(\alpha^2, k) = \int_0^{\pi/2}
239  * \frac1{\sqrt{1-k^2\sin^2\phi}(1 - \alpha^2\sin^2\phi_)}\,d\phi.
240  * \f]
241  **********************************************************************/
242  double Pi();
243 
244  /**
245  * Legendre's complete geodesic longitude integral.
246  *
247  * @return \e G(&alpha;<sup>2</sup>, \e k)
248  *
249  * \e G(&alpha;<sup>2</sup>, \e k) is given by
250  * \f[
251  * G(\alpha^2, k) = \int_0^{\pi/2}
252  * \frac{\sqrt{1-k^2\sin^2\phi}}{1 - \alpha^2\sin^2\phi}\,d\phi.
253  * \f]
254  **********************************************************************/
255  double G();
256 
257  /**
258  * Cayley's complete geodesic longitude difference integral.
259  *
260  * @return \e H(&alpha;<sup>2</sup>, \e k)
261  *
262  * \e H(&alpha;<sup>2</sup>, \e k) is given by
263  * \f[
264  * H(\alpha^2, k) = \int_0^{\pi/2}
265  * \frac{\cos^2\phi}{(1-\alpha^2\sin^2\phi)\sqrt{1-k^2\sin^2\phi}}
266  * \,d\phi.
267  * \f]
268  **********************************************************************/
269  double H();
270  ///@}
271 
272  /** \name Incomplete elliptic integrals.
273  **********************************************************************/
274  ///@{
275  /**
276  * The incomplete integral of the first kind.
277  *
278  * @param[in] phi
279  * @return \e F(&phi;, \e k).
280  *
281  * \e F(&phi;, \e k) is defined in https://dlmf.nist.gov/19.2.E4
282  * \f[
283  * F(\phi, k) = \int_0^\phi \frac1{\sqrt{1-k^2\sin^2\theta}}\,d\theta.
284  * \f]
285  **********************************************************************/
286  double F(double phi);
287 
288  /**
289  * The incomplete integral of the second kind.
290  *
291  * @param[in] phi
292  * @return \e E(&phi;, \e k).
293  *
294  * \e E(&phi;, \e k) is defined in https://dlmf.nist.gov/19.2.E5
295  * \f[
296  * E(\phi, k) = \int_0^\phi \sqrt{1-k^2\sin^2\theta}\,d\theta.
297  * \f]
298  **********************************************************************/
299  double E(double phi);
300 
301  /**
302  * The incomplete integral of the second kind with the argument given in
303  * degrees.
304  *
305  * @param[in] ang in <i>degrees</i>.
306  * @return \e E(&pi; <i>ang</i>/180, \e k).
307  **********************************************************************/
308  double Ed(double ang);
309 
310  /**
311  * The inverse of the incomplete integral of the second kind.
312  *
313  * @param[in] x
314  * @return &phi; = <i>E</i><sup>&minus;1</sup>(\e x, \e k); i.e., the
315  * solution of such that \e E(&phi;, \e k) = \e x.
316  **********************************************************************/
317  double Einv(double x);
318 
319  /**
320  * The incomplete integral of the third kind.
321  *
322  * @param[in] phi
323  * @return &Pi;(&phi;, &alpha;<sup>2</sup>, \e k).
324  *
325  * &Pi;(&phi;, &alpha;<sup>2</sup>, \e k) is defined in
326  * https://dlmf.nist.gov/19.2.E7
327  * \f[
328  * \Pi(\phi, \alpha^2, k) = \int_0^\phi
329  * \frac1{\sqrt{1-k^2\sin^2\theta}(1 - \alpha^2\sin^2\theta_)}\,d\theta.
330  * \f]
331  **********************************************************************/
332  double Pi(double phi);
333 
334  /**
335  * Jahnke's incomplete elliptic integral.
336  *
337  * @param[in] phi
338  * @return \e D(&phi;, \e k).
339  *
340  * \e D(&phi;, \e k) is defined in https://dlmf.nist.gov/19.2.E4
341  * \f[
342  * D(\phi, k) = \int_0^\phi
343  * \frac{\sin^2\theta}{\sqrt{1-k^2\sin^2\theta}}\,d\theta.
344  * \f]
345  **********************************************************************/
346  double D(double phi);
347 
348  /**
349  * Legendre's geodesic longitude integral.
350  *
351  * @param[in] phi
352  * @return \e G(&phi;, &alpha;<sup>2</sup>, \e k).
353  *
354  * \e G(&phi;, &alpha;<sup>2</sup>, \e k) is defined by
355  * \f[
356  * \begin{aligned}
357  * G(\phi, \alpha^2, k) &=
358  * \frac{k^2}{\alpha^2} F(\phi, k) +
359  * \biggl(1 - \frac{k^2}{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\
360  * &= \int_0^\phi
361  * \frac{\sqrt{1-k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta.
362  * \end{aligned}
363  * \f]
364  *
365  * Legendre expresses the longitude of a point on the geodesic in terms of
366  * this combination of elliptic integrals in Exercices de Calcul
367  * Int&eacute;gral, Vol. 1 (1811), p. 181,
368  * https://books.google.com/books?id=riIOAAAAQAAJ&pg=PA181.
369  *
370  * See \ref geodellip for the expression for the longitude in terms of this
371  * function.
372  **********************************************************************/
373  double G(double phi);
374 
375  /**
376  * Cayley's geodesic longitude difference integral.
377  *
378  * @param[in] phi
379  * @return \e H(&phi;, &alpha;<sup>2</sup>, \e k).
380  *
381  * \e H(&phi;, &alpha;<sup>2</sup>, \e k) is defined by
382  * \f[
383  * \begin{aligned}
384  * H(\phi, \alpha^2, k) &=
385  * \frac1{\alpha^2} F(\phi, k) +
386  * \biggl(1 - \frac1{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k) \\
387  * &= \int_0^\phi
388  * \frac{\cos^2\theta}{(1-\alpha^2\sin^2\theta)\sqrt{1-k^2\sin^2\theta}}
389  * \,d\theta.
390  * \end{aligned}
391  * \f]
392  *
393  * Cayley expresses the longitude difference of a point on the geodesic in
394  * terms of this combination of elliptic integrals in Phil. Mag. <b>40</b>
395  * (1870), p. 333, https://books.google.com/books?id=Zk0wAAAAIAAJ&pg=PA333.
396  *
397  * See \ref geodellip for the expression for the longitude in terms of this
398  * function.
399  **********************************************************************/
400  double H(double phi);
401  ///@}
402 
403  /** \name Incomplete integrals in terms of Jacobi elliptic functions.
404  **********************************************************************/
405  /**
406  * The incomplete integral of the first kind in terms of Jacobi elliptic
407  * functions.
408  *
409  * @param[in] sn = sin&phi;
410  * @param[in] cn = cos&phi;
411  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
412  * sin<sup>2</sup>&phi;)
413  * @return \e F(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
414  **********************************************************************/
415  double F(double sn, double cn, double dn);
416 
417  /**
418  * The incomplete integral of the second kind in terms of Jacobi elliptic
419  * functions.
420  *
421  * @param[in] sn = sin&phi;
422  * @param[in] cn = cos&phi;
423  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
424  * sin<sup>2</sup>&phi;)
425  * @return \e E(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
426  **********************************************************************/
427  double E(double sn, double cn, double dn);
428 
429  /**
430  * The incomplete integral of the third kind in terms of Jacobi elliptic
431  * functions.
432  *
433  * @param[in] sn = sin&phi;
434  * @param[in] cn = cos&phi;
435  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
436  * sin<sup>2</sup>&phi;)
437  * @return &Pi;(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
438  * (&minus;&pi;, &pi;].
439  **********************************************************************/
440  double Pi(double sn, double cn, double dn);
441 
442  /**
443  * Jahnke's incomplete elliptic integral in terms of Jacobi elliptic
444  * functions.
445  *
446  * @param[in] sn = sin&phi;
447  * @param[in] cn = cos&phi;
448  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
449  * sin<sup>2</sup>&phi;)
450  * @return \e D(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
451  **********************************************************************/
452  double D(double sn, double cn, double dn);
453 
454  /**
455  * Legendre's geodesic longitude integral in terms of Jacobi elliptic
456  * functions.
457  *
458  * @param[in] sn = sin&phi;
459  * @param[in] cn = cos&phi;
460  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
461  * sin<sup>2</sup>&phi;)
462  * @return \e G(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
463  * (&minus;&pi;, &pi;].
464  **********************************************************************/
465  double G(double sn, double cn, double dn);
466 
467  /**
468  * Cayley's geodesic longitude difference integral in terms of Jacobi
469  * elliptic functions.
470  *
471  * @param[in] sn = sin&phi;
472  * @param[in] cn = cos&phi;
473  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
474  * sin<sup>2</sup>&phi;)
475  * @return \e H(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
476  * (&minus;&pi;, &pi;].
477  **********************************************************************/
478  double H(double sn, double cn, double dn);
479  ///@}
480 
481  /** \name Periodic versions of incomplete elliptic integrals.
482  **********************************************************************/
483  ///@{
484  /**
485  * The periodic incomplete integral of the first kind.
486  *
487  * @param[in] sn = sin&phi;
488  * @param[in] cn = cos&phi;
489  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
490  * sin<sup>2</sup>&phi;)
491  * @return the periodic function &pi; \e F(&phi;, \e k) / (2 \e K(\e k)) -
492  * &phi;
493  **********************************************************************/
494  double deltaF(double sn, double cn, double dn);
495 
496  /**
497  * The periodic incomplete integral of the second kind.
498  *
499  * @param[in] sn = sin&phi;
500  * @param[in] cn = cos&phi;
501  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
502  * sin<sup>2</sup>&phi;)
503  * @return the periodic function &pi; \e E(&phi;, \e k) / (2 \e E(\e k)) -
504  * &phi;
505  **********************************************************************/
506  double deltaE(double sn, double cn, double dn);
507 
508  /**
509  * The periodic inverse of the incomplete integral of the second kind.
510  *
511  * @param[in] stau = sin&tau;
512  * @param[in] ctau = sin&tau;
513  * @return the periodic function <i>E</i><sup>&minus;1</sup>(&tau; (2 \e
514  * E(\e k)/&pi;), \e k) - &tau;
515  **********************************************************************/
516  double deltaEinv(double stau, double ctau);
517 
518  /**
519  * The periodic incomplete integral of the third kind.
520  *
521  * @param[in] sn = sin&phi;
522  * @param[in] cn = cos&phi;
523  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
524  * sin<sup>2</sup>&phi;)
525  * @return the periodic function &pi; &Pi;(&phi;, \e k) / (2 &Pi;(\e k)) -
526  * &phi;
527  **********************************************************************/
528  double deltaPi(double sn, double cn, double dn);
529 
530  /**
531  * The periodic Jahnke's incomplete elliptic integral.
532  *
533  * @param[in] sn = sin&phi;
534  * @param[in] cn = cos&phi;
535  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
536  * sin<sup>2</sup>&phi;)
537  * @return the periodic function &pi; \e D(&phi;, \e k) / (2 \e D(\e k)) -
538  * &phi;
539  **********************************************************************/
540  double deltaD(double sn, double cn, double dn);
541 
542  /**
543  * Legendre's periodic geodesic longitude integral.
544  *
545  * @param[in] sn = sin&phi;
546  * @param[in] cn = cos&phi;
547  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
548  * sin<sup>2</sup>&phi;)
549  * @return the periodic function &pi; \e G(&phi;, \e k) / (2 \e G(\e k)) -
550  * &phi;
551  **********************************************************************/
552  double deltaG(double sn, double cn, double dn);
553 
554  /**
555  * Cayley's periodic geodesic longitude difference integral.
556  *
557  * @param[in] sn = sin&phi;
558  * @param[in] cn = cos&phi;
559  * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
560  * sin<sup>2</sup>&phi;)
561  * @return the periodic function &pi; \e H(&phi;, \e k) / (2 \e H(\e k)) -
562  * &phi;
563  **********************************************************************/
564  double deltaH(double sn, double cn, double dn);
565  ///@}
566 
567  /** \name Elliptic functions.
568  **********************************************************************/
569  ///@{
570  /**
571  * The Jacobi elliptic functions.
572  *
573  * @param[in] x the argument.
574  * @param[out] sn sn(\e x, \e k).
575  * @param[out] cn cn(\e x, \e k).
576  * @param[out] dn dn(\e x, \e k).
577  **********************************************************************/
578  void sncndn(double x,
579  [System::Runtime::InteropServices::Out] double% sn,
580  [System::Runtime::InteropServices::Out] double% cn,
581  [System::Runtime::InteropServices::Out] double% dn);
582 
583  /**
584  * The &Delta; amplitude function.
585  *
586  * @param[in] sn sin&phi;
587  * @param[in] cn cos&phi;
588  * @return &Delta; = sqrt(1 &minus; <i>k</i><sup>2</sup>
589  * sin<sup>2</sup>&phi;)
590  **********************************************************************/
591  double Delta(double sn, double cn);
592  ///@}
593 
594  /** \name Symmetric elliptic integrals.
595  **********************************************************************/
596  ///@{
597  /**
598  * Symmetric integral of the first kind <i>R<sub>F</sub></i>.
599  *
600  * @param[in] x
601  * @param[in] y
602  * @param[in] z
603  * @return <i>R<sub>F</sub></i>(\e x, \e y, \e z)
604  *
605  * <i>R<sub>F</sub></i> is defined in https://dlmf.nist.gov/19.16.E1
606  * \f[ R_F(x, y, z) = \frac12
607  * \int_0^\infty\frac1{\sqrt{(t + x) (t + y) (t + z)}}\, dt \f]
608  * If one of the arguments is zero, it is more efficient to call the
609  * two-argument version of this function with the non-zero arguments.
610  **********************************************************************/
611  static double RF(double x, double y, double z);
612 
613  /**
614  * Complete symmetric integral of the first kind, <i>R<sub>F</sub></i> with
615  * one argument zero.
616  *
617  * @param[in] x
618  * @param[in] y
619  * @return <i>R<sub>F</sub></i>(\e x, \e y, 0)
620  **********************************************************************/
621  static double RF(double x, double y);
622 
623  /**
624  * Degenerate symmetric integral of the first kind <i>R<sub>C</sub></i>.
625  *
626  * @param[in] x
627  * @param[in] y
628  * @return <i>R<sub>C</sub></i>(\e x, \e y) = <i>R<sub>F</sub></i>(\e x, \e
629  * y, \e y)
630  *
631  * <i>R<sub>C</sub></i> is defined in https://dlmf.nist.gov/19.2.E17
632  * \f[ R_C(x, y) = \frac12
633  * \int_0^\infty\frac1{\sqrt{t + x}(t + y)}\,dt \f]
634  **********************************************************************/
635  static double RC(double x, double y);
636 
637  /**
638  * Symmetric integral of the second kind <i>R<sub>G</sub></i>.
639  *
640  * @param[in] x
641  * @param[in] y
642  * @param[in] z
643  * @return <i>R<sub>G</sub></i>(\e x, \e y, \e z)
644  *
645  * <i>R<sub>G</sub></i> is defined in Carlson, eq 1.5
646  * \f[ R_G(x, y, z) = \frac14
647  * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2}
648  * \biggl(
649  * \frac x{t + x} + \frac y{t + y} + \frac z{t + z}
650  * \biggr)t\,dt \f]
651  * See also https://dlmf.nist.gov/19.16.E3.
652  * If one of the arguments is zero, it is more efficient to call the
653  * two-argument version of this function with the non-zero arguments.
654  **********************************************************************/
655  static double RG(double x, double y, double z);
656 
657  /**
658  * Complete symmetric integral of the second kind, <i>R<sub>G</sub></i>
659  * with one argument zero.
660  *
661  * @param[in] x
662  * @param[in] y
663  * @return <i>R<sub>G</sub></i>(\e x, \e y, 0)
664  **********************************************************************/
665  static double RG(double x, double y);
666 
667  /**
668  * Symmetric integral of the third kind <i>R<sub>J</sub></i>.
669  *
670  * @param[in] x
671  * @param[in] y
672  * @param[in] z
673  * @param[in] p
674  * @return <i>R<sub>J</sub></i>(\e x, \e y, \e z, \e p)
675  *
676  * <i>R<sub>J</sub></i> is defined in https://dlmf.nist.gov/19.16.E2
677  * \f[ R_J(x, y, z, p) = \frac32
678  * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} (t + p)^{-1}\, dt \f]
679  **********************************************************************/
680  static double RJ(double x, double y, double z, double p);
681 
682  /**
683  * Degenerate symmetric integral of the third kind <i>R<sub>D</sub></i>.
684  *
685  * @param[in] x
686  * @param[in] y
687  * @param[in] z
688  * @return <i>R<sub>D</sub></i>(\e x, \e y, \e z) = <i>R<sub>J</sub></i>(\e
689  * x, \e y, \e z, \e z)
690  *
691  * <i>R<sub>D</sub></i> is defined in https://dlmf.nist.gov/19.16.E5
692  * \f[ R_D(x, y, z) = \frac32
693  * \int_0^\infty[(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}\, dt \f]
694  **********************************************************************/
695  static double RD(double x, double y, double z);
696  ///@}
697  };
698 } // namespace NETGeographicLib
NETGeographicLib::EllipticFunction::deltaEinv
double deltaEinv(double stau, double ctau)
NETGeographicLib::EllipticFunction::EllipticFunction
EllipticFunction(double k2, double alpha2)
NETGeographicLib::EllipticFunction::Pi
double Pi()
NETGeographicLib::EllipticFunction::~EllipticFunction
~EllipticFunction()
Definition: EllipticFunction.h:121
NETGeographicLib::EllipticFunction::F
double F(double phi)
NETGeographicLib::EllipticFunction::alpha2
double alpha2
Definition: EllipticFunction.h:174
NETGeographicLib::EllipticFunction::G
double G()
GeographicLib::EllipticFunction
NETGeographicLib::EllipticFunction::alphap2
double alphap2
Definition: EllipticFunction.h:180
NETGeographicLib::EllipticFunction::k2
double k2
Definition: EllipticFunction.h:163
NETGeographicLib::EllipticFunction::RC
static double RC(double x, double y)
NETGeographicLib::EllipticFunction::D
double D()
NETGeographicLib::EllipticFunction::deltaD
double deltaD(double sn, double cn, double dn)
NETGeographicLib::EllipticFunction::Reset
void Reset(double k2, double alpha2)
NETGeographicLib::EllipticFunction::Einv
double Einv(double x)
NETGeographicLib::EllipticFunction::H
double H()
NETGeographicLib::EllipticFunction::E
double E()
NETGeographicLib::EllipticFunction::Delta
double Delta(double sn, double cn)
NETGeographicLib::EllipticFunction::RF
static double RF(double x, double y, double z)
NETGeographicLib::EllipticFunction::KE
double KE()
NETGeographicLib::EllipticFunction::deltaE
double deltaE(double sn, double cn, double dn)
NETGeographicLib::EllipticFunction::RD
static double RD(double x, double y, double z)
NETGeographicLib::EllipticFunction::sncndn
void sncndn(double x, [System::Runtime::InteropServices::Out] double% sn, [System::Runtime::InteropServices::Out] double% cn, [System::Runtime::InteropServices::Out] double% dn)
NETGeographicLib::EllipticFunction::deltaG
double deltaG(double sn, double cn, double dn)
NETGeographicLib::EllipticFunction::deltaF
double deltaF(double sn, double cn, double dn)
NETGeographicLib::EllipticFunction::K
double K()
NETGeographicLib::EllipticFunction::Ed
double Ed(double ang)
NETGeographicLib::EllipticFunction::deltaH
double deltaH(double sn, double cn, double dn)
NETGeographicLib::EllipticFunction::kp2
double kp2
Definition: EllipticFunction.h:169
NETGeographicLib::EllipticFunction::deltaPi
double deltaPi(double sn, double cn, double dn)
NETGeographicLib
Definition: Accumulator.h:13
NETGeographicLib::EllipticFunction::RG
static double RG(double x, double y, double z)
NETGeographicLib::EllipticFunction
.NET wrapper for GeographicLib::EllipticFunction.
Definition: EllipticFunction.h:69
NETGeographicLib::EllipticFunction::RJ
static double RJ(double x, double y, double z, double p)