1 @c -----------------------------------------------------------------------------
2 @c File : orthopoly.de.texi
3 @c License : GNU General Public License (GPL)
7 @c This file is part of Maxima -- GPL CAS based on DOE-MACSYMA
8 @c -----------------------------------------------------------------------------
11 * Introduction to orthogonal polynomials::
12 * Functions and Variables for orthogonal polynomials::
15 @c -----------------------------------------------------------------------------
16 @node Introduction to orthogonal polynomials, Functions and Variables for orthogonal polynomials, orthopoly, orthopoly
17 @section Introduction to orthogonal polynomials
18 @c -----------------------------------------------------------------------------
20 @code{orthopoly} is a package for symbolic and numerical evaluation of several
21 kinds of orthogonal polynomials, including Chebyshev, Laguerre, Hermite, Jacobi,
22 Legendre, and ultraspherical (Gegenbauer) polynomials. Additionally,
23 @code{orthopoly} includes support for the spherical Bessel, spherical Hankel,
24 and spherical harmonic functions.
26 For the most part, @code{orthopoly} follows the conventions of Abramowitz and
27 Stegun @i{Handbook of Mathematical Functions}, Chapter 22 (10th printing,
28 December 1972); additionally, we use Gradshteyn and Ryzhik,
29 @i{Table of Integrals, Series, and Products} (1980 corrected and enlarged
30 edition), and Eugen Merzbacher @i{Quantum Mechanics} (2nd edition, 1970).
32 @c INSTALLATION INSTRUCTIONS NO LONGER RELEVANT
33 @c BUT MAYBE SOME OF THESE FILES SHOULD BE MENTIONED IN ANOTHER CONTEXT
34 @c This will create a directory @code{orthopoly_x} (again x is the release
35 @c identifier) that contains the source file @code{orthopoly.lisp}, user
36 @c documentation in html and texi formats, a sample maxima initialization file
37 @c @code{orthopoly-init.lisp}, a README file, a testing routine
38 @c @code{test_orthopoly.mac}, and two demonstration files.
40 @c Start Maxima and compile orthopoly. To do this, use the command
42 @c (c1) compile_file("orthopoly.lisp");
44 Barton Willis of the University of Nebraska at Kearney (UNK) wrote the
45 @code{orthopoly} package and its documentation. The package is released under
46 the GNU General Public License (GPL).
48 @c -----------------------------------------------------------------------------
49 @subsection Getting Started with orthopoly
50 @c -----------------------------------------------------------------------------
52 @code{load ("orthopoly")} loads the @code{orthopoly} package.
54 To find the third-order Legendre polynomial,
57 (%i1) legendre_p (3, x);
60 (%o1) - ---------- + ----------- - 6 (1 - x) + 1
64 To express this as a sum of powers of @var{x}, apply @mref{ratsimp} or
65 @mref{rat} to the result.
68 (%i2) [ratsimp (%), rat (%)];
71 (%o2)/R/ [----------, ----------]
75 Alternatively, make the second argument to @code{legendre_p} (its ``main''
76 variable) a canonical rational expression (CRE).
79 (%i1) legendre_p (3, rat (x));
86 For floating point evaluation, @code{orthopoly} uses a running error analysis
87 to estimate an upper bound for the error. For example,
90 (%i1) jacobi_p (150, 2, 3, 0.2);
91 (%o1) interval(- 0.062017037936715, 1.533267919277521E-11)
94 Intervals have the form @code{interval (@var{c}, @var{r})}, where @var{c} is the
95 center and @var{r} is the radius of the interval. Since Maxima does not support
96 arithmetic on intervals, in some situations, such as graphics, you want to
97 suppress the error and output only the center of the interval. To do this, set
98 the option variable @mref{orthopoly_returns_intervals} to @code{false}.
101 (%i1) orthopoly_returns_intervals : false;
103 (%i2) jacobi_p (150, 2, 3, 0.2);
104 (%o2) - 0.062017037936715
107 Refer to the section @ref{Floating point Evaluation} for more information.
109 Most functions in @code{orthopoly} have a @mref{gradef} property; thus
112 (%i1) diff (hermite (n, x), x);
115 (%i2) diff (gen_laguerre (n, a, x), x);
117 n L (x) - (n + a) L (x) unit_step(n)
119 (%o2) ------------------------------------------
123 The unit step function in the second example prevents an error that would
124 otherwise arise by evaluating with @var{n} equal to 0.
131 The @code{gradef} property only applies to the ``main'' variable; derivatives
132 with respect other arguments usually result in an error message; for example
135 (%i1) diff (hermite (n, x), x);
138 (%i2) diff (hermite (n, x), n);
140 Maxima doesn't know the derivative of hermite with respect the first
142 -- an error. Quitting. To debug this try debugmode(true);
145 Generally, functions in @code{orthopoly} map over lists and matrices. For
146 the mapping to fully evaluate, the option variables @mref{doallmxops} and
147 @mref{listarith} must both be @code{true} (the defaults).
148 To illustrate the mapping over matrices, consider
151 (%i1) hermite (2, x);
154 (%i2) m : matrix ([0, x], [y, 0]);
158 (%i3) hermite (2, m);
160 [ - 2 - 2 (1 - 2 x ) ]
163 [ - 2 (1 - 2 y ) - 2 ]
166 In the second example, the @code{i, j} element of the value
167 is @code{hermite (2, m[i,j])}; this is not the same as computing
168 @code{-2 + 4 m . m}, as seen in the next example.
171 (%i4) -2 * matrix ([1, 0], [0, 1]) + 4 * m . m;
177 If you evaluate a function at a point outside its domain, generally
178 @code{orthopoly} returns the function unevaluated. For example,
181 (%i1) legendre_p (2/3, x);
186 @code{orthopoly} supports translation into TeX; it also does two-dimensional
187 output on a terminal.
190 (%i1) spherical_harmonic (l, m, theta, phi);
195 $$Y_@{l@}^@{m@}\left(\vartheta,\varphi\right)$$
197 (%i3) jacobi_p (n, a, a - b, x/2);
202 $$P_@{n@}^@{\left(a,a-b\right)@}\left(@{@{x@}\over@{2@}@}\right)$$
206 @c -----------------------------------------------------------------------------
207 @subsection Limitations
208 @c -----------------------------------------------------------------------------
210 When an expression involves several orthogonal polynomials with symbolic orders,
211 it's possible that the expression actually vanishes, yet Maxima is unable to
212 simplify it to zero. If you divide by such a quantity, you'll be in trouble.
213 For example, the following expression vanishes for integers @var{n} greater than
214 1, yet Maxima is unable to simplify it to zero.
217 (%i1) (2*n - 1) * legendre_p (n - 1, x) * x - n * legendre_p (n, x)
218 + (1 - n) * legendre_p (n - 2, x);
219 (%o1) (2 n - 1) P (x) x - n P (x) + (1 - n) P (x)
223 For a specific @var{n}, we can reduce the expression to zero.
226 (%i2) ev (% ,n = 10, ratsimp);
230 Generally, the polynomial form of an orthogonal polynomial is ill-suited
231 for floating point evaluation. Here's an example.
234 (%i1) p : jacobi_p (100, 2, 3, x)$
236 (%i2) subst (0.2, x, p);
237 (%o2) 3.4442767023833592E+35
238 (%i3) jacobi_p (100, 2, 3, 0.2);
239 (%o3) interval(0.18413609135169, 6.8990300925815987E-12)
240 (%i4) float(jacobi_p (100, 2, 3, 2/10));
241 (%o4) 0.18413609135169
244 The true value is about 0.184; this calculation suffers from extreme subtractive
245 cancellation error. Expanding the polynomial and then evaluating, gives a
250 (%i6) subst (0.2, x, p);
251 (%o6) 0.18413609766122982
254 This isn't a general rule; expanding the polynomial does not always
255 result in an expression that is better suited for numerical evaluation.
256 By far, the best way to do numerical evaluation is to make one or more
257 of the function arguments floating point numbers. By doing that,
258 specialized floating point algorithms are used for evaluation.
260 Maxima's @mref{float} function is somewhat indiscriminate; if you apply
261 @code{float} to an expression involving an orthogonal polynomial with a
262 symbolic degree or order parameter, these parameters may be
263 converted into floats; after that, the expression will not evaluate
267 (%i1) assoc_legendre_p (n, 1, x);
275 (%i3) ev (%, n=2, x=0.9);
281 The expression in (%o3) will not evaluate to a float; @code{orthopoly} doesn't
282 recognize floating point values where it requires an integer. Similarly,
283 numerical evaluation of the @mref{pochhammer} function for orders that
284 exceed @mref{pochhammer_max_index} can be troublesome; consider
287 (%i1) x : pochhammer (1, 10), pochhammer_max_index : 5;
292 Applying @code{float} doesn't evaluate @var{x} to a float
300 To evaluate @var{x} to a float, you'll need to bind @code{pochhammer_max_index}
301 to 11 or greater and apply @code{float} to @var{x}.
304 (%i3) float (x), pochhammer_max_index : 11;
308 The default value of @code{pochhammer_max_index} is 100;
309 change its value after loading @code{orthopoly}.
311 Finally, be aware that reference books vary on the definitions of the
312 orthogonal polynomials; we've generally used the conventions
313 of conventions of Abramowitz and Stegun.
315 Before you suspect a bug in orthopoly, check some special cases
316 to determine if your definitions match those used by @code{orthopoly}.
317 Definitions often differ by a normalization; occasionally, authors
318 use ``shifted'' versions of the functions that makes the family
319 orthogonal on an interval other than @math{(-1, 1)}. To define, for example,
320 a Legendre polynomial that is orthogonal on @math{(0, 1)}, define
323 (%i1) shifted_legendre_p (n, x) := legendre_p (n, 2*x - 1)$
325 (%i2) shifted_legendre_p (2, rat (x));
327 (%o2)/R/ 6 x - 6 x + 1
328 (%i3) legendre_p (2, rat (x));
335 @c -----------------------------------------------------------------------------
336 @anchor{Floating point Evaluation}
337 @subsection Floating point Evaluation
338 @c -----------------------------------------------------------------------------
340 Most functions in @code{orthopoly} use a running error analysis to
341 estimate the error in floating point evaluation; the
342 exceptions are the spherical Bessel functions and the associated Legendre
343 polynomials of the second kind. For numerical evaluation, the spherical
344 Bessel functions call SLATEC functions. No specialized method is used
345 for numerical evaluation of the associated Legendre polynomials of the
348 The running error analysis ignores errors that are second or higher order
349 in the machine epsilon (also known as unit roundoff). It also
350 ignores a few other errors. It's possible (although unlikely)
351 that the actual error exceeds the estimate.
353 Intervals have the form @code{interval (@var{c}, @var{r})}, where @var{c} is
354 the center of the interval and @var{r} is its radius. The center of an interval
355 can be a complex number, and the radius is always a positive real number.
362 (%i2) y0 : jacobi_p (100, 2, 3, 0.2);
363 (%o2) interval(0.1841360913516871, 6.8990300925815987E-12)
364 (%i3) y1 : bfloat (jacobi_p (100, 2, 3, 1/5));
365 (%o3) 1.8413609135168563091370224958913493690868904463668b-1
368 Let's test that the actual error is smaller than the error estimate
371 (%i4) is (abs (part (y0, 1) - y1) < part (y0, 2));
375 Indeed, for this example the error estimate is an upper bound for the
378 Maxima does not support arithmetic on intervals.
381 (%i1) legendre_p (7, 0.1) + legendre_p (8, 0.1);
382 (%o1) interval(0.18032072148437508, 3.1477135311021797E-15)
383 + interval(- 0.19949294375000004, 3.3769353084291579E-15)
386 A user could define arithmetic operators that do interval math. To define
387 interval addition, we can define
392 (%i2) "@@+"(x,y) := interval (part (x, 1) + part (y, 1), part (x, 2)
395 (%i3) legendre_p (7, 0.1) @@+ legendre_p (8, 0.1);
396 (%o3) interval(- 0.019172222265624955, 6.5246488395313372E-15)
399 The special floating point routines get called when the arguments
400 are complex. For example,
403 (%i1) legendre_p (10, 2 + 3.0*%i);
404 (%o1) interval(- 3.876378825E+7 %i - 6.0787748E+7,
405 1.2089173052721777E-6)
408 Let's compare this to the true value.
411 (%i1) float (expand (legendre_p (10, 2 + 3*%i)));
412 (%o1) - 3.876378825E+7 %i - 6.0787748E+7
415 Additionally, when the arguments are big floats, the special floating point
416 routines get called; however, the big floats are converted into double floats
417 and the final result is a double.
420 (%i1) ultraspherical (150, 0.5b0, 0.9b0);
421 (%o1) interval(- 0.043009481257265, 3.3750051301228864E-14)
424 @c -----------------------------------------------------------------------------
425 @subsection Graphics and @code{orthopoly}
426 @c -----------------------------------------------------------------------------
428 To plot expressions that involve the orthogonal polynomials, you
432 Set the option variable @mref{orthopoly_returns_intervals} to @code{false},
434 Quote any calls to @code{orthopoly} functions.
437 If function calls aren't quoted, Maxima evaluates them to polynomials before
438 plotting; consequently, the specialized floating point code doesn't get called.
439 Here is an example of how to plot an expression that involves
440 a Legendre polynomial.
443 (%i1) plot2d ('(legendre_p (5, x)), [x, 0, 1]),
444 orthopoly_returns_intervals : false;
449 @image{@value{figuresfolder}/orthopoly1,8cm}
452 The @i{entire} expression @code{legendre_p (5, x)} is quoted; this is different
453 than just quoting the function name using @code{'legendre_p (5, @var{x})}.
455 @c -----------------------------------------------------------------------------
456 @subsection Miscellaneous Functions
457 @c -----------------------------------------------------------------------------
459 The @code{orthopoly} package defines the Pochhammer symbol and a unit step
460 function. @code{orthopoly} uses the Kronecker delta function and the unit step
461 function in @mref{gradef} statements.
463 To convert Pochhammer symbols into quotients of gamma functions,
464 use @mrefdot{makegamma}
467 (%i1) makegamma (pochhammer (x, n));
471 (%i2) makegamma (pochhammer (1/2, 1/2));
477 Derivatives of the Pochhammer symbol are given in terms of the @mref{psi}@w{}
481 (%i1) diff (pochhammer (x, n), x);
482 (%o1) (x) (psi (x + n) - psi (x))
484 (%i2) diff (pochhammer (x, n), n);
485 (%o2) (x) psi (x + n)
489 You need to be careful with the expression in (%o1); the difference of the
490 @code{psi} functions has polynomials when @code{@var{x} = -1, -2, .., -@var{n}}.
491 These polynomials cancel with factors in @code{pochhammer (@var{x}, @var{n})}
492 making the derivative a degree @code{@var{n} - 1} polynomial when @var{n} is a
495 The Pochhammer symbol is defined for negative orders through its representation
496 as a quotient of gamma functions. Consider
499 (%i1) q : makegamma (pochhammer (x, n));
503 (%i2) sublis ([x=11/3, n= -6], q);
509 Alternatively, we can get this result directly.
512 (%i1) pochhammer (11/3, -6);
518 The unit step function is left-continuous; thus
521 (%i1) [unit_step (-1/10), unit_step (0), unit_step (1/10)];
525 If you need a unit step function that is neither left or right continuous
526 at zero, define your own using @mrefcomma{signum} for example,
529 (%i1) xunit_step (x) := (1 + signum (x))/2$
531 (%i2) [xunit_step (-1/10), xunit_step (0), xunit_step (1/10)];
537 Do not redefine @mref{unit_step} itself; some code in @code{orthopoly}
538 requires that the unit step function be left-continuous.
540 @c -----------------------------------------------------------------------------
541 @subsection Algorithms
542 @c -----------------------------------------------------------------------------
544 Generally, @code{orthopoly} does symbolic evaluation by using a hypergeometic
545 representation of the orthogonal polynomials. The hypergeometic functions are
546 evaluated using the (undocumented) functions @code{hypergeo11} and
547 @code{hypergeo21}. The exceptions are the half-integer Bessel functions and the
548 associated Legendre function of the second kind. The half-integer Bessel
549 functions are evaluated using an explicit representation, and the associated
550 Legendre function of the second kind is evaluated using recursion.
552 For floating point evaluation, we again convert most functions into
553 a hypergeometic form; we evaluate the hypergeometic functions using
554 forward recursion. Again, the exceptions are the half-integer Bessel functions
555 and the associated Legendre function of the second kind. Numerically,
556 the half-integer Bessel functions are evaluated using the SLATEC code.
558 @c -----------------------------------------------------------------------------
559 @node Functions and Variables for orthogonal polynomials, , Introduction to orthogonal polynomials, orthopoly
560 @section Functions and Variables for orthogonal polynomials
561 @c -----------------------------------------------------------------------------
563 @c -----------------------------------------------------------------------------
564 @anchor{assoc_legendre_p}
565 @deffn {Function} assoc_legendre_p (@var{n}, @var{m}, @var{x})
567 The associated Legendre function of the first kind of degree @var{n} and
570 Reference: Abramowitz and Stegun, equations 22.5.37, page 779, 8.6.6
571 (second equation), page 334, and 8.2.5, page 333.
574 @c -----------------------------------------------------------------------------
575 @anchor{assoc_legendre_q}
576 @deffn {Function} assoc_legendre_q (@var{n}, @var{m}, @var{x})
578 The associated Legendre function of the second kind of degree @var{n}
581 Reference: Abramowitz and Stegun, equation 8.5.3 and 8.1.8.
584 @c -----------------------------------------------------------------------------
586 @deffn {Function} chebyshev_t (@var{n}, @var{x})
588 The Chebyshev function of the first kind.
590 Reference: Abramowitz and Stegun, equation 22.5.47, page 779.
593 @c -----------------------------------------------------------------------------
595 @deffn {Function} chebyshev_u (@var{n}, @var{x})
597 The Chebyshev function of the second kind.
599 Reference: Abramowitz and Stegun, equation 22.5.48, page 779.
602 @c -----------------------------------------------------------------------------
603 @anchor{gen_laguerre}
604 @deffn {Function} gen_laguerre (@var{n}, @var{a}, @var{x})
606 The generalized Laguerre polynomial of degree @var{n}.
608 Reference: Abramowitz and Stegun, equation 22.5.54, page 780.
611 @c -----------------------------------------------------------------------------
613 @deffn {Function} hermite (@var{n}, @var{x})
615 The Hermite polynomial.
617 Reference: Abramowitz and Stegun, equation 22.5.55, page 780.
620 @c -----------------------------------------------------------------------------
622 @deffn {Function} intervalp (@var{e})
624 Return @code{true} if the input is an interval and return false if it isn't.
627 @c -----------------------------------------------------------------------------
629 @deffn {Function} jacobi_p (@var{n}, @var{a}, @var{b}, @var{x})
631 The Jacobi polynomial.
633 The Jacobi polynomials are actually defined for all @var{a} and @var{b};
634 however, the Jacobi polynomial weight
635 @code{(1 - @var{x})^@var{a} (1 + @var{x})^@var{b}} isn't integrable for
636 @code{@var{a} <= -1} or @code{@var{b} <= -1}.
638 Reference: Abramowitz and Stegun, equation 22.5.42, page 779.
641 @c -----------------------------------------------------------------------------
643 @deffn {Function} laguerre (@var{n}, @var{x})
645 The Laguerre polynomial.
647 Reference: Abramowitz and Stegun, equations 22.5.16 and 22.5.54, page 780.
650 @c -----------------------------------------------------------------------------
652 @deffn {Function} legendre_p (@var{n}, @var{x})
654 The Legendre polynomial of the first kind.
656 Reference: Abramowitz and Stegun, equations 22.5.50 and 22.5.51, page 779.
659 @c -----------------------------------------------------------------------------
661 @deffn {Function} legendre_q (@var{n}, @var{x})
663 The Legendre polynomial of the first kind.
665 Reference: Abramowitz and Stegun, equations 8.5.3 and 8.1.8.
668 @c -----------------------------------------------------------------------------
669 @anchor{orthopoly_recur}
670 @deffn {Function} orthopoly_recur (@var{f}, @var{args})
672 Returns a recursion relation for the orthogonal function family @var{f} with
673 arguments @var{args}. The recursion is with respect to the polynomial degree.
676 (%i1) orthopoly_recur (legendre_p, [n, x]);
678 (2 n - 1) P (x) x + (1 - n) P (x)
680 (%o1) P (x) = -----------------------------------------
685 The second argument to @code{orthopoly_recur} must be a list with the
686 correct number of arguments for the function @var{f}; if it isn't,
687 Maxima signals an error.
690 (%i1) orthopoly_recur (jacobi_p, [n, x]);
692 Function jacobi_p needs 4 arguments, instead it received 2
693 -- an error. Quitting. To debug this try debugmode(true);
696 Additionally, when @var{f} isn't the name of one of the
697 families of orthogonal polynomials, an error is signalled.
700 (%i1) orthopoly_recur (foo, [n, x]);
702 A recursion relation for foo isn't known to Maxima
703 -- an error. Quitting. To debug this try debugmode(true);
707 @c -----------------------------------------------------------------------------
708 @anchor{orthopoly_returns_intervals}
709 @defvr {Variable} orthopoly_returns_intervals
710 Default value: @code{true}
712 When @code{orthopoly_returns_intervals} is @code{true}, floating point results
713 are returned in the form @code{interval (@var{c}, @var{r})}, where @var{c} is
714 the center of an interval and @var{r} is its radius. The center can be a
715 complex number; in that case, the interval is a disk in the complex plane.
718 @c -----------------------------------------------------------------------------
719 @anchor{orthopoly_weight}
720 @deffn {Function} orthopoly_weight (@var{f}, @var{args})
722 Returns a three element list; the first element is
723 the formula of the weight for the orthogonal polynomial family
724 @var{f} with arguments given by the list @var{args}; the
725 second and third elements give the lower and upper endpoints
726 of the interval of orthogonality. For example,
729 (%i1) w : orthopoly_weight (hermite, [n, x]);
732 (%o1) [%e , - inf, inf]
733 (%i2) integrate(w[1]*hermite(3, x)*hermite(2, x), x, w[2], w[3]);
737 The main variable of @var{f} must be a symbol; if it isn't, Maxima
741 @c -----------------------------------------------------------------------------
743 @deffn {Function} pochhammer (@var{n}, @var{x})
745 The Pochhammer symbol. For nonnegative integers @var{n} with
746 @code{@var{n} <= pochhammer_max_index}, the expression
747 @code{pochhammer (@var{x}, @var{n})} evaluates to the product
748 @code{@var{x} (@var{x} + 1) (@var{x} + 2) ... (@var{x} + n - 1)} when
749 @code{@var{n} > 0} and to 1 when @code{@var{n} = 0}. For negative @var{n},
750 @code{pochhammer (@var{x}, @var{n})} is defined as
751 @code{(-1)^@var{n} / pochhammer (1 - @var{x}, -@var{n})}. Thus
754 (%i1) pochhammer (x, 3);
755 (%o1) x (x + 1) (x + 2)
756 (%i2) pochhammer (x, -3);
758 (%o2) - -----------------------
759 (1 - x) (2 - x) (3 - x)
762 To convert a Pochhammer symbol into a quotient of gamma functions,
763 (see Abramowitz and Stegun, equation 6.1.22) use @mrefcomma{makegamma} for
767 (%i1) makegamma (pochhammer (x, n));
773 When @var{n} exceeds @mref{pochhammer_max_index} or when @var{n} is symbolic,
774 @code{pochhammer} returns a noun form.
777 (%i1) pochhammer (x, n);
783 @c -----------------------------------------------------------------------------
784 @anchor{pochhammer_max_index}
785 @defvr {Variable} pochhammer_max_index
788 @code{pochhammer (@var{n}, @var{x})} expands to a product if and only if
789 @code{@var{n} <= pochhammer_max_index}.
794 (%i1) pochhammer (x, 3), pochhammer_max_index : 3;
795 (%o1) x (x + 1) (x + 2)
796 (%i2) pochhammer (x, 4), pochhammer_max_index : 3;
801 Reference: Abramowitz and Stegun, equation 6.1.16, page 256.
804 @c -----------------------------------------------------------------------------
805 @anchor{spherical_bessel_j}
806 @deffn {Function} spherical_bessel_j (@var{n}, @var{x})
808 The spherical Bessel function of the first kind.
810 Reference: Abramowitz and Stegun, equations 10.1.8, page 437 and 10.1.15,
814 @c -----------------------------------------------------------------------------
815 @anchor{spherical_bessel_y}
816 @deffn {Function} spherical_bessel_y (@var{n}, @var{x})
818 The spherical Bessel function of the second kind.
820 Reference: Abramowitz and Stegun, equations 10.1.9, page 437 and 10.1.15,
824 @c -----------------------------------------------------------------------------
825 @anchor{spherical_hankel1}
826 @deffn {Function} spherical_hankel1 (@var{n}, @var{x})
828 The spherical Hankel function of the first kind.
830 Reference: Abramowitz and Stegun, equation 10.1.36, page 439.
833 @c -----------------------------------------------------------------------------
834 @anchor{spherical_hankel2}
835 @deffn {Function} spherical_hankel2 (@var{n}, @var{x})
837 The spherical Hankel function of the second kind.
839 Reference: Abramowitz and Stegun, equation 10.1.17, page 439.
842 @c -----------------------------------------------------------------------------
843 @anchor{spherical_harmonic}
844 @deffn {Function} spherical_harmonic (@var{n}, @var{m}, @var{x}, @var{y})
846 The spherical harmonic function.
848 Reference: Merzbacher 9.64.
851 @c -----------------------------------------------------------------------------
853 @deffn {Function} unit_step (@var{x})
855 The left-continuous unit step function; thus @code{unit_step (@var{x})} vanishes
856 for @code{@var{x} <= 0} and equals 1 for @code{@var{x} > 0}.
858 If you want a unit step function that takes on the value 1/2 at zero, use
859 @code{(1 + signum (@var{x}))/2}.
862 @c -----------------------------------------------------------------------------
863 @anchor{ultraspherical}
864 @deffn {Function} ultraspherical (@var{n}, @var{a}, @var{x})
866 The ultraspherical polynomial (also known as the Gegenbauer polynomial).
868 Reference: Abramowitz and Stegun, equation 22.5.46, page 779.
871 @c --- End of file orthopoly.de.texi -------------------------------------------