pochhammer
Pochhammer symbol
Syntax
Description
pochhammer(
returns the Pochhammer Symbol
(x)n.x
,n
)
Examples
Find Pochhammer Symbol for Numeric and Symbolic Inputs
Find the Pochhammer symbol for the numeric inputs x
= 3
at n = 2
.
pochhammer(3,2)
ans = 12
Find the Pochhammer symbol for the symbolic input x
at
n = 3
. The pochhammer
function does not
automatically return the expanded form of the expression. Use
expand
to force pochhammer
to return
the form of the expanded expression.
syms x P = pochhammer(x, 3) P = expand(P)
P = pochhammer(x, 3) P = x^3 + 3*x^2 + 2*x
Rewrite and Factor Outputs of Pochhammer
If conditions are satisfied, expand
rewrites the solution using gamma
.
syms n x assume(x>0) assume(n>0) P = pochhammer(x, n); P = expand(P)
P = gamma(n + x)/gamma(x)
To use the variables in further computations, clear their assumptions by
recreating them using syms
.
syms n x
To convert expanded output of pochhammer
into its factors,
use factor
.
P = expand(pochhammer(x, 4)); P = factor(P)
P = [ x, x + 3, x + 2, x + 1]
Differentiate Pochhammer Symbol
Differentiate pochhammer
once with
respect to x
.
syms n x diff(pochhammer(x,n),x)
ans = pochhammer(x, n)*(psi(n + x) - psi(x))
Differentiate pochhammer
twice with respect to
n
.
diff(pochhammer(x,n),n,2)
ans = pochhammer(x, n)*psi(n + x)^2 + pochhammer(x, n)*psi(1, n + x)
Taylor Series Expansion of Pochhammer Symbol
Use taylor
to find the Taylor series
expansion of pochhammer
with n = 3
around the expansion point x = 2
.
syms x taylor(pochhammer(x,3),x,2)
ans = 26*x + 9*(x - 2)^2 + (x - 2)^3 - 28
Plot Pochhammer Symbol
Plot the Pochhammer symbol from n = 0
to n = 4
for x
. Use axis
to display the region of interest.
syms x fplot(pochhammer(x,0:4)) axis([-4 4 -4 4]) grid on legend('n = 0','n = 1','n = 2','n = 3','n = 4','Location','Best') title('Pochhammer symbol (x)_n for n=0 to n=4')
Input Arguments
More About
Algorithms
If
x
andn
are numerical values, then an explicit numerical result is returned. Otherwise, a symbolic function call is returned.If both
x
andx + n
are nonpositive integers, thenThe following special cases are implemented.
If
n
is a positive integer, thenexpand(pochhammer(x,n))
returns the expanded polynomial .If
n
is not an integer, thenexpand(pochhammer(x,n))
returns a representation in terms ofgamma
.
Version History
Introduced in R2014b