필터 지우기
필터 지우기

Symbolic Sum of Gamma Function with Negative Integer Values

조회 수: 2 (최근 30일)
Thomas
Thomas 2013년 1월 7일
I'm trying to define a number of functions with multiple indices, one of which is used to sum factorial terms that may contain negative values. So I replaced the factorial with the gamma function, but now cannot evaluate the resulting sum due to the singularity. These terms should be zero in my functions, here is a simplified example:
syms q k
fun(q) = gamma(-2*q)
fun2(k) = symsum(k/fun(q),q,0,2)
I need this to produce a function so I can then numerically integrate it. Thanks in advance for your help.
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 1월 7일
To check: when you have a factorial of a negative value, you wish the result to be 0? If so that would not be standard for factorial.
Thomas
Thomas 2013년 1월 7일
The factorial was in the denominator; the function (or rather that term in the sum) should be zero. When I evaluate the gamma function at negative integers I get infinity, which is correct, but I cannot then sum those terms to get a usable function. Here is the real code:
m = 1;
S_n1q(q) = (2/pi)^0.5/((-2)^q*factorial(q)*gamma(n-2*q-m+1)*zi^(n+m));
S_n_min1_1q(q) = (2/pi)^0.5/((-2)^q*factorial(q)*gamma(n-2*q-m)*zi^(n+m-1));
S_n_plus1_1q(q) = (2/pi)^0.5/((-2)^q*factorial(q)*gamma(n-2*q-m+2)*zi^(n+m+1));
m = 1;
j = 0;
l = 0;
B_n100(k) = symsum(S_n1q(q)*(k*abs(zi))^(n-q+l-0.5)*besselk(n-q-j-0.5,k*abs(zi)),q,0,(n-rem(n,2))/2);
B_n_min1_100(k) = symsum(S_n_min1_1q(q)*(k*abs(zi))^(n-q+l-1.5)*besselk(n-q-j-1.5,k*abs(zi)),q,0,(n-1-rem(n-1,2))/2);
B_n_plus1_100(k) = symsum(S_n_plus1_1q(q)*(k*abs(zi))^(n-q+l+0.5)*besselk(n-q-j+0.5,k*abs(zi)),q,0,(n+1-rem(n+1,2))/2);
I have a bunch of these functions for different values of n, m, j and l, with n=1:36 and I need to integrate them numerically from 0 to Infinity.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Gamma Functions에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by