GegenbauerC[n,m,x]
gives the Gegenbauer polynomial
.
GegenbauerC[n,x]
gives the renormalized form
.
GegenbauerC
GegenbauerC[n,m,x]
gives the Gegenbauer polynomial
.
GegenbauerC[n,x]
gives the renormalized form
.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Explicit polynomials are given for integer n and for any m.
satisfies the differential equation
. - The Gegenbauer polynomials are orthogonal on the interval
with weight function
, corresponding to integration over a unit hypersphere. - For certain special arguments, GegenbauerC automatically evaluates to exact values.
- GegenbauerC can be evaluated to arbitrary numerical precision.
- GegenbauerC automatically threads over lists.
- GegenbauerC[n,0,x] is always zero.
- GegenbauerC[n,m,z] has a branch cut discontinuity in the complex z plane running from
to
. - GegenbauerC can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (7)
N[GegenbauerC[3, 1 / 2, 7]]Compute the 10
Gegenbauer polynomial:
GegenbauerC[10, 1, x]Compute the 10
renormalized Gegenbauer polynomial:
GegenbauerC[10, x]Plot
over a subset of the reals:
Plot[GegenbauerC[10, x], {x, -1, 1}]Plot over a subset of the complexes:
ComplexPlot3D[GegenbauerC[5, z], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansion at the origin:
Series[GegenbauerC[5, x], {x, 0, 5}]Asymptotic expansion at Infinity:
Series[GegenbauerC[5, x], {x, ∞, 3}]//FullSimplifyAsymptotic expansion at a singular point:
Series[GegenbauerC[5, x], {x, -1, 3}]//FullSimplifyScope (44)
Numerical Evaluation (6)
GegenbauerC[5, 1 / 8, 7.]GegenbauerC[2, 0.5]N[GegenbauerC[1 / 6, 1 / 8, 7], 50]The precision of the output tracks the precision of the input:
GegenbauerC[0.333333333333333333, 7, 1]N[GegenbauerC[2 / 7, 5 - I, 2]]Evaluate efficiently at high precision:
GegenbauerC[2 / 49, 5, 1`100]//TimingGegenbauerC[89 / 49, 3, 5`1000];//TimingCompute worst-case guaranteed intervals using Interval and CenteredInterval objects:
GegenbauerC[3 / 4, 4 / 5, Interval[{1.9, 2.1}]]GegenbauerC[3 / 4, 4 / 5, CenteredInterval[5, 1 / 100]]Or compute average-case statistical intervals using Around:
GegenbauerC[1 / 2, Around[.9, 0.1]]Compute the elementwise values of an array:
GegenbauerC[3, {{2, 0}, {1 / 2, -2}}]Or compute the matrix GegenbauerC function using MatrixFunction:
MatrixFunction[GegenbauerC[3, #]&, {{2, 0}, {1 / 2, -2}}]Specific Values (8)
Values of GegenbauerC at fixed points:
Table[GegenbauerC[10, x ], {x, 1, 5}]Simple cases give exact symbolic results:
GegenbauerC[{1 / 3, 1 / 2}, 1 / 6, 0]GegenbauerC for symbolic n:
GegenbauerC[n, 0]GegenbauerC[n, 1 / 2, x]GegenbauerC[n, 1, x]GegenbauerC[n, x]Table[GegenbauerC[n, m, x], {x, 0, 1}, {m, 0, 1}]GegenbauerC[1, 0]GegenbauerC[0, 1, 1]Find the first positive maximum of GegenbauerC[10,x ]:
xmax = x /. Solve[D[GegenbauerC[10, x ], x] == 0 && 0 < x < 5, x][[1]]Plot[GegenbauerC[10, x ], {x, -1, 1}, Epilog -> Style[Point[{xmax, GegenbauerC[10, xmax ]}], PointSize[Large], Red]]Compute the associated GegenbauerC[7,x] polynomial:
GegenbauerC[7, x]Compute the associated GegenbauerC[1/2,x] polynomial for half-integer n:
GegenbauerC[1 / 2, x]Different GegenbauerC types give different symbolic forms:
Table[GegenbauerC[n, m, x], {n, 0, 3}, {m, 0, 1}]Visualization (4)
Plot the GegenbauerC function for various orders:
Plot[{GegenbauerC[1, x], GegenbauerC[2, x], GegenbauerC[3, x], GegenbauerC[4, x]}, {x, -.7, .7}]ComplexContourPlot[Re[GegenbauerC[3, 1, z]], {z, -3 - 3 I, 3 + 3 I}, IconizedObject[«PlotOptions»]]ComplexContourPlot[Im[GegenbauerC[3, 1, z]], {z, -3 - 3 I, 3 + 3 I}, IconizedObject[«PlotOptions»]]Plot as real parts of two parameters vary:
Plot3D[Re[GegenbauerC[n, 1, z]], {n, 0, 5}, {z, -1, 1}]Types 2 and 3 of GegenbauerC function have different branch cut structures:
Plot3D[Im[GegenbauerC[2, x + I y]], {x, -1.5, 1.5}, {y, -0.5, 0.5}, Exclusions -> {{y == 0, Abs[x] > 1}}]Plot3D[Im[GegenbauerC[3, x + I y]], {x, -1.5, 1.5}, {y, -0.5, 0.5}, Exclusions -> {{y == 0, -1 < x < 1}}, PlotRange -> All]Function Properties (14)
Domain of GegenbauerC of integer orders:
{FunctionDomain[GegenbauerC[1, z], z], FunctionDomain[GegenbauerC[2, z], z]}{FunctionDomain[GegenbauerC[1, z], z, Complexes], FunctionDomain[GegenbauerC[2, z], z, Complexes]}The range for GegenbauerC of integer orders:
{FunctionRange[GegenbauerC[1, x], x, y], FunctionRange[GegenbauerC[2, x], x, y]}The range for complex values is the whole plane:
{FunctionRange[GegenbauerC[1, z], z, y, Complexes], FunctionRange[GegenbauerC[2, z], z, y, Complexes]}Gegenbauer polynomial of an odd order is odd:
GegenbauerC[1, -x] == -GegenbauerC[1, x]Gegenbauer polynomial of an even order is even:
GegenbauerC[2, -x] == GegenbauerC[2, x]GegenbauerC threads elementwise over lists:
GegenbauerC[{1, 2, 3}, m, x]GegenbauerC has the mirror property
:
{GegenbauerC[1, Conjugate[z]] == Conjugate[GegenbauerC[1, z]], GegenbauerC[2, Conjugate[z]] == Conjugate[GegenbauerC[2, z]]}Gegenbauer polynomials are analytic:
FunctionAnalytic[GegenbauerC[n, x], x, Assumptions -> n∈ℤ && n ≠ 0]However, the GegenbauerC function is generally not analytic for noninteger parameters:
FunctionAnalytic[GegenbauerC[1 / 2, x], x]FunctionAnalytic[GegenbauerC[1 / 2, 1, x], x]FunctionMeromorphic[GegenbauerC[1 / 2, x], x]FunctionMeromorphic[GegenbauerC[1 / 2, 1, x], x]
is neither non-decreasing nor non-increasing:
FunctionMonotonicity[GegenbauerC[2, x], x]FunctionInjective[GegenbauerC[2, x], x]Plot[{GegenbauerC[2, x], 2}, {x, -2, 2}]FunctionSurjective[GegenbauerC[2, x], x]Plot[{GegenbauerC[2, x], -2}, {x, -2, 2}]
is neither non-negative nor non-positive:
FunctionSign[GegenbauerC[2, x], x]
has singularities or discontinuities when
is not an integer and
:
FunctionSingularities[GegenbauerC[n, x], x]FunctionDiscontinuities[GegenbauerC[n, x], x]
has additional singularities when
is noninteger:
FunctionSingularities[GegenbauerC[n, m, x], x]FunctionDiscontinuities[GegenbauerC[n, m, x], x]FunctionConvexity[GegenbauerC[2, x], x]TraditionalForm formatting:
GegenbauerC[n, λ, x]//TraditionalFormGegenbauerC[n, m]//HoldForm//TraditionalFormDifferentiation (3)
First derivatives with respect to x:
D[GegenbauerC[n, m, x], x]D[GegenbauerC[n, x], x]Higher derivatives with respect to x:
Table[D[GegenbauerC[n, m, x], {x, k}], {k, 1, 3}]//FullSimplifyPlot the higher derivatives with respect to x when n=10 and m=1/3:
Plot[Evaluate[% /. { n -> 10, m -> 1 / 3}], {x, -3, 3}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative"}]Formula for the ![]()
derivative with respect to x:
D[GegenbauerC[n, m, x], {x, k}]// FullSimplifyIntegration (3)
Compute the indefinite integral using Integrate:
Integrate[GegenbauerC[n, m, x], x]FullSimplify[D[%, x]]Integrate[GegenbauerC[n, m, x], {x, 0, 4}]Integrate[Exp[x] GegenbauerC[2, x], x]//FullSimplifyIntegrate[ x GegenbauerC[1, x^2], {x, 0, 3}]//FullSimplifySeries Expansions (2)
Find the Taylor expansion using Series:
Series[GegenbauerC[n, x], {x, 0, 3}]Plots of the first three approximations around
:
terms = Normal@Table[Series[GegenbauerC[10, x], {x, 0, m}], {m, 1, 5, 2}];
Plot[{GegenbauerC[10, x], terms}, {x, -1, 1}]Taylor expansion at a generic point:
Series[GegenbauerC[n, x], {x, x0, 2}]// Normal//FullSimplifyFunction Identities and Simplifications (4)
GegenbauerC is a special case of JacobiP:
GegenbauerC[n, m, x] == (Pochhammer[2m, n]/Pochhammer[m + 1 / 2, n]) JacobiP[n, m - 1 / 2, m - 1 / 2, x]//FullSimplifyDerivative identity of GegenbauerC:
D[GegenbauerC[n, m, x], x] == 2 m GegenbauerC[n - 1, m + 1, x]Generating function of Gegenbauer polynomials:
GeneratingFunction[GegenbauerC[n, m, x], n, t]GegenbauerC[n, m, x] == (2 (m + n + 1)x/2 m + n) GegenbauerC[n + 1, m, x] - ( n + 2/2 m + n) GegenbauerC[n + 2, m, x] //FullSimplifyGegenbauerC[n, m, x] == (2 (m + n - 1)x/n) GegenbauerC[n - 1, m, x] - (2 m + n - 2/n) GegenbauerC[n - 2, m, x] //FullSimplifyGeneralizations & Extensions (2)
Apply GegenbauerC to a power series:
GegenbauerC[5, Sin[x] + O[x] ^ 4]GegenbauerC can deal with real-valued intervals:
GegenbauerC[4, Interval[{-1, 1}]]Applications (3)
Eigenfunctions of the angular part of the four-dimensional Laplace operator:
Δ = ((1/Sin[θ]^2)D[ Sin[θ]^2D[#, θ], θ] + (1/Sin[θ]^2Sin[χ])D[Sin[χ]D[#, χ], χ] + (1/Sin[θ]^2Sin[χ]^2)D[#, ϕ, ϕ])&;With[{f = GegenbauerC[ n, 1, Cos[θ]]}, FullSimplify[Δ[ f ] / f]]Radial part of the hydrogen atom eigenfunction in momentum representation:
ψ[{n_, l_, m_}, p_] := (2^ll!/n^2)Sqrt[((n - l - 1)!/(n + l)!)]((p / n)^l/(p^2 + n^-2)^2 + l)GegenbauerC[n - l - 1, l + 1, (1 - n^2p^2/1 + n^2p^2)]Table[Plot[ψ[{4, l, 0}, p] ^ 2, {p, 0, 0.4}], {l, 0, 3}]In an n-point Gauss–Lobatto quadrature rule, the values of the two extreme nodes are fixed, and the other n-2 nodes are computed from the roots of a certain Gegenbauer polynomial. Compute the nodes and weights of an n-point Gauss–Lobatto quadrature rule:
n = 10;
tmp = x /. NSolve[GegenbauerC[n - 2, 3 / 2, x], x];
lobattoNodes = Join[{N[-1]}, tmp, {N[1]}]w1 = x |-> (2/n(n - 1)GegenbauerC[n - 1, 1 / 2, x]^2);
lobattoWeights = ArrayPad[w1[tmp], 1, N[(2/n(n - 1))]]Use the n-point Gauss–Lobatto quadrature rule to numerically evaluate an integral:
fun[x_] := (1/1 / 100 + (x - 3 / 10)^2) + (1/1 / 25 + (x - 9 / 10)^2) - 6a = 1 / 2;b = 1;
est1 = ((b - a/2)lobattoWeights).Map[fun, Rescale[lobattoNodes, {-1, 1}, {a, b}]]Compare the result of the Gauss–Lobatto quadrature with the result from NIntegrate:
est1 - NIntegrate[fun[x], {x, a, b}]Properties & Relations (5)
Use FunctionExpand to expand GegenbauerC into other functions:
FunctionExpand[GegenbauerC[1 / 2, -1 / 2, x]]FunctionExpand[GegenbauerC[n, m, 1]]GegenbauerC can be represented as a DifferenceRoot:
DifferenceRootReduce[GegenbauerC[k, z, y], k]DifferenceRootReduce[GegenbauerC[1, 2, k], k]General term in the series expansion of GegenbauerC:
SeriesCoefficient[GegenbauerC[a, x], {x, 0, n}]The generating function for GegenbauerC:
GeneratingFunction[GegenbauerC[n, a, b], n, x]Define an inner product on functions using Integrate:
dot[f_, g_] := 2 / π Subsuperscript[∫, -1, 1]Conjugate[f]gSqrt[1 - x^2]ⅆxConstruct an orthonormal basis using Orthogonalize:
Orthogonalize[{1, x, x ^ 2, x ^ 3, x ^ 4}, dot] // ExpandThis inner product produces the GegenbauerC polynomials:
Table[GegenbauerC[n, 1, x], {n, 0, 4}]See Also
Tech Notes
Related Guides
Related Links
History
Introduced in 1988 (1.0) | Updated in 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (1988), GegenbauerC, Wolfram Language function, https://reference.wolfram.com/language/ref/GegenbauerC.html (updated 2022).
CMS
Wolfram Language. 1988. "GegenbauerC." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/GegenbauerC.html.
APA
Wolfram Language. (1988). GegenbauerC. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GegenbauerC.html
BibTeX
@misc{reference.wolfram_2026_gegenbauerc, author="Wolfram Research", title="{GegenbauerC}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/GegenbauerC.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_gegenbauerc, organization={Wolfram Research}, title={GegenbauerC}, year={2022}, url={https://reference.wolfram.com/language/ref/GegenbauerC.html}, note=[Accessed: 13-June-2026]}