NETGeographicLib 1.52
Loading...
Searching...
No Matches
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
13namespace 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 /**
407 * The incomplete integral of the first kind in terms of Jacobi elliptic
408 * functions.
409 *
410 * @param[in] sn = sin&phi;
411 * @param[in] cn = cos&phi;
412 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
413 * sin<sup>2</sup>&phi;)
414 * @return \e F(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
415 **********************************************************************/
416 double F(double sn, double cn, double dn);
417
418 /**
419 * The incomplete integral of the second kind in terms of Jacobi elliptic
420 * functions.
421 *
422 * @param[in] sn = sin&phi;
423 * @param[in] cn = cos&phi;
424 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
425 * sin<sup>2</sup>&phi;)
426 * @return \e E(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
427 **********************************************************************/
428 double E(double sn, double cn, double dn);
429
430 /**
431 * The incomplete integral of the third kind in terms of Jacobi elliptic
432 * functions.
433 *
434 * @param[in] sn = sin&phi;
435 * @param[in] cn = cos&phi;
436 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
437 * sin<sup>2</sup>&phi;)
438 * @return &Pi;(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
439 * (&minus;&pi;, &pi;].
440 **********************************************************************/
441 double Pi(double sn, double cn, double dn);
442
443 /**
444 * Jahnke's incomplete elliptic integral in terms of Jacobi elliptic
445 * functions.
446 *
447 * @param[in] sn = sin&phi;
448 * @param[in] cn = cos&phi;
449 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
450 * sin<sup>2</sup>&phi;)
451 * @return \e D(&phi;, \e k) as though &phi; &isin; (&minus;&pi;, &pi;].
452 **********************************************************************/
453 double D(double sn, double cn, double dn);
454
455 /**
456 * Legendre's geodesic longitude integral in terms of Jacobi elliptic
457 * functions.
458 *
459 * @param[in] sn = sin&phi;
460 * @param[in] cn = cos&phi;
461 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
462 * sin<sup>2</sup>&phi;)
463 * @return \e G(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
464 * (&minus;&pi;, &pi;].
465 **********************************************************************/
466 double G(double sn, double cn, double dn);
467
468 /**
469 * Cayley's geodesic longitude difference integral in terms of Jacobi
470 * elliptic functions.
471 *
472 * @param[in] sn = sin&phi;
473 * @param[in] cn = cos&phi;
474 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
475 * sin<sup>2</sup>&phi;)
476 * @return \e H(&phi;, &alpha;<sup>2</sup>, \e k) as though &phi; &isin;
477 * (&minus;&pi;, &pi;].
478 **********************************************************************/
479 double H(double sn, double cn, double dn);
480 ///@}
481
482 /** \name Periodic versions of incomplete elliptic integrals.
483 **********************************************************************/
484 ///@{
485 /**
486 * The periodic incomplete integral of the first kind.
487 *
488 * @param[in] sn = sin&phi;
489 * @param[in] cn = cos&phi;
490 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
491 * sin<sup>2</sup>&phi;)
492 * @return the periodic function &pi; \e F(&phi;, \e k) / (2 \e K(\e k)) -
493 * &phi;
494 **********************************************************************/
495 double deltaF(double sn, double cn, double dn);
496
497 /**
498 * The periodic incomplete integral of the second kind.
499 *
500 * @param[in] sn = sin&phi;
501 * @param[in] cn = cos&phi;
502 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
503 * sin<sup>2</sup>&phi;)
504 * @return the periodic function &pi; \e E(&phi;, \e k) / (2 \e E(\e k)) -
505 * &phi;
506 **********************************************************************/
507 double deltaE(double sn, double cn, double dn);
508
509 /**
510 * The periodic inverse of the incomplete integral of the second kind.
511 *
512 * @param[in] stau = sin&tau;
513 * @param[in] ctau = sin&tau;
514 * @return the periodic function <i>E</i><sup>&minus;1</sup>(&tau; (2 \e
515 * E(\e k)/&pi;), \e k) - &tau;
516 **********************************************************************/
517 double deltaEinv(double stau, double ctau);
518
519 /**
520 * The periodic incomplete integral of the third kind.
521 *
522 * @param[in] sn = sin&phi;
523 * @param[in] cn = cos&phi;
524 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
525 * sin<sup>2</sup>&phi;)
526 * @return the periodic function &pi; &Pi;(&phi;, \e k) / (2 &Pi;(\e k)) -
527 * &phi;
528 **********************************************************************/
529 double deltaPi(double sn, double cn, double dn);
530
531 /**
532 * The periodic Jahnke's incomplete elliptic integral.
533 *
534 * @param[in] sn = sin&phi;
535 * @param[in] cn = cos&phi;
536 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
537 * sin<sup>2</sup>&phi;)
538 * @return the periodic function &pi; \e D(&phi;, \e k) / (2 \e D(\e k)) -
539 * &phi;
540 **********************************************************************/
541 double deltaD(double sn, double cn, double dn);
542
543 /**
544 * Legendre's periodic geodesic longitude integral.
545 *
546 * @param[in] sn = sin&phi;
547 * @param[in] cn = cos&phi;
548 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
549 * sin<sup>2</sup>&phi;)
550 * @return the periodic function &pi; \e G(&phi;, \e k) / (2 \e G(\e k)) -
551 * &phi;
552 **********************************************************************/
553 double deltaG(double sn, double cn, double dn);
554
555 /**
556 * Cayley's periodic geodesic longitude difference integral.
557 *
558 * @param[in] sn = sin&phi;
559 * @param[in] cn = cos&phi;
560 * @param[in] dn = sqrt(1 &minus; <i>k</i><sup>2</sup>
561 * sin<sup>2</sup>&phi;)
562 * @return the periodic function &pi; \e H(&phi;, \e k) / (2 \e H(\e k)) -
563 * &phi;
564 **********************************************************************/
565 double deltaH(double sn, double cn, double dn);
566 ///@}
567
568 /** \name Elliptic functions.
569 **********************************************************************/
570 ///@{
571 /**
572 * The Jacobi elliptic functions.
573 *
574 * @param[in] x the argument.
575 * @param[out] sn sn(\e x, \e k).
576 * @param[out] cn cn(\e x, \e k).
577 * @param[out] dn dn(\e x, \e k).
578 **********************************************************************/
579 void sncndn(double x,
580 [System::Runtime::InteropServices::Out] double% sn,
581 [System::Runtime::InteropServices::Out] double% cn,
582 [System::Runtime::InteropServices::Out] double% dn);
583
584 /**
585 * The &Delta; amplitude function.
586 *
587 * @param[in] sn sin&phi;
588 * @param[in] cn cos&phi;
589 * @return &Delta; = sqrt(1 &minus; <i>k</i><sup>2</sup>
590 * sin<sup>2</sup>&phi;)
591 **********************************************************************/
592 double Delta(double sn, double cn);
593 ///@}
594
595 /** \name Symmetric elliptic integrals.
596 **********************************************************************/
597 ///@{
598 /**
599 * Symmetric integral of the first kind <i>R<sub>F</sub></i>.
600 *
601 * @param[in] x
602 * @param[in] y
603 * @param[in] z
604 * @return <i>R<sub>F</sub></i>(\e x, \e y, \e z)
605 *
606 * <i>R<sub>F</sub></i> is defined in https://dlmf.nist.gov/19.16.E1
607 * \f[ R_F(x, y, z) = \frac12
608 * \int_0^\infty\frac1{\sqrt{(t + x) (t + y) (t + z)}}\, dt \f]
609 * If one of the arguments is zero, it is more efficient to call the
610 * two-argument version of this function with the non-zero arguments.
611 **********************************************************************/
612 static double RF(double x, double y, double z);
613
614 /**
615 * Complete symmetric integral of the first kind, <i>R<sub>F</sub></i> with
616 * one argument zero.
617 *
618 * @param[in] x
619 * @param[in] y
620 * @return <i>R<sub>F</sub></i>(\e x, \e y, 0)
621 **********************************************************************/
622 static double RF(double x, double y);
623
624 /**
625 * Degenerate symmetric integral of the first kind <i>R<sub>C</sub></i>.
626 *
627 * @param[in] x
628 * @param[in] y
629 * @return <i>R<sub>C</sub></i>(\e x, \e y) = <i>R<sub>F</sub></i>(\e x, \e
630 * y, \e y)
631 *
632 * <i>R<sub>C</sub></i> is defined in https://dlmf.nist.gov/19.2.E17
633 * \f[ R_C(x, y) = \frac12
634 * \int_0^\infty\frac1{\sqrt{t + x}(t + y)}\,dt \f]
635 **********************************************************************/
636 static double RC(double x, double y);
637
638 /**
639 * Symmetric integral of the second kind <i>R<sub>G</sub></i>.
640 *
641 * @param[in] x
642 * @param[in] y
643 * @param[in] z
644 * @return <i>R<sub>G</sub></i>(\e x, \e y, \e z)
645 *
646 * <i>R<sub>G</sub></i> is defined in Carlson, eq 1.5
647 * \f[ R_G(x, y, z) = \frac14
648 * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2}
649 * \biggl(
650 * \frac x{t + x} + \frac y{t + y} + \frac z{t + z}
651 * \biggr)t\,dt \f]
652 * See also https://dlmf.nist.gov/19.16.E3.
653 * If one of the arguments is zero, it is more efficient to call the
654 * two-argument version of this function with the non-zero arguments.
655 **********************************************************************/
656 static double RG(double x, double y, double z);
657
658 /**
659 * Complete symmetric integral of the second kind, <i>R<sub>G</sub></i>
660 * with one argument zero.
661 *
662 * @param[in] x
663 * @param[in] y
664 * @return <i>R<sub>G</sub></i>(\e x, \e y, 0)
665 **********************************************************************/
666 static double RG(double x, double y);
667
668 /**
669 * Symmetric integral of the third kind <i>R<sub>J</sub></i>.
670 *
671 * @param[in] x
672 * @param[in] y
673 * @param[in] z
674 * @param[in] p
675 * @return <i>R<sub>J</sub></i>(\e x, \e y, \e z, \e p)
676 *
677 * <i>R<sub>J</sub></i> is defined in https://dlmf.nist.gov/19.16.E2
678 * \f[ R_J(x, y, z, p) = \frac32
679 * \int_0^\infty[(t + x) (t + y) (t + z)]^{-1/2} (t + p)^{-1}\, dt \f]
680 **********************************************************************/
681 static double RJ(double x, double y, double z, double p);
682
683 /**
684 * Degenerate symmetric integral of the third kind <i>R<sub>D</sub></i>.
685 *
686 * @param[in] x
687 * @param[in] y
688 * @param[in] z
689 * @return <i>R<sub>D</sub></i>(\e x, \e y, \e z) = <i>R<sub>J</sub></i>(\e
690 * x, \e y, \e z, \e z)
691 *
692 * <i>R<sub>D</sub></i> is defined in https://dlmf.nist.gov/19.16.E5
693 * \f[ R_D(x, y, z) = \frac32
694 * \int_0^\infty[(t + x) (t + y)]^{-1/2} (t + z)^{-3/2}\, dt \f]
695 **********************************************************************/
696 static double RD(double x, double y, double z);
697 ///@}
698 };
699} // namespace NETGeographicLib
.NET wrapper for GeographicLib::EllipticFunction.
double Delta(double sn, double cn)
EllipticFunction(double k2, double alpha2, double kp2, double alphap2)
static double RJ(double x, double y, double z, double p)
double deltaPi(double sn, double cn, double dn)
static double RC(double x, double y)
double G(double sn, double cn, double dn)
static double RF(double x, double y)
double Pi(double sn, double cn, double dn)
double F(double sn, double cn, double dn)
void sncndn(double x, [System::Runtime::InteropServices::Out] double% sn, [System::Runtime::InteropServices::Out] double% cn, [System::Runtime::InteropServices::Out] double% dn)
double deltaF(double sn, double cn, double dn)
double deltaH(double sn, double cn, double dn)
double deltaG(double sn, double cn, double dn)
double E(double sn, double cn, double dn)
static double RD(double x, double y, double z)
double deltaE(double sn, double cn, double dn)
void Reset(double k2, double alpha2)
double D(double sn, double cn, double dn)
static double RG(double x, double y)
static double RG(double x, double y, double z)
double deltaEinv(double stau, double ctau)
double deltaD(double sn, double cn, double dn)
EllipticFunction(double k2, double alpha2)
double H(double sn, double cn, double dn)
static double RF(double x, double y, double z)