Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: gamma function with 2 parameters

Subject: gamma function with 2 parameters

From: Helen

Date: 07 Dec, 2007 01:41:43

Message: 1 of 2

Hi everyone.

I am trying to find the summation of the following symbolic
expression

(z^k)/(n+k)!

with respect to its symbolic variable k from 0 to 2m-1.

I have done this as follows

>> syms n real
>> syms k real
>> syms z real
>> syms m real
>> simplify(symsum((z^k)/maple('factorial', n+k), k, 0, 2*m-1))

(For some reason symsum((z^k)/factorial(n+k), k, 0, 2*m-1)
does not work.)


and I obtain

ans =
 
z^(-n)*exp(z)*(-gamma(n,z)*gamma(2*m+n)+gamma(2*m+n,z)*gamma(n))/gamma(n)/gamma(2*m+n)

Why does gamma have 2 parameters? The gamma function can
only have one input argument

Please help.
Helen

Subject: Re: gamma function with 2 parameters

From: Roger Stafford

Date: 07 Dec, 2007 06:47:40

Message: 2 of 2

"Helen " <helenlegakis@hotmail.com> wrote in message <fja8cm$fuk
$1@fred.mathworks.com>...
> Hi everyone.
>
> I am trying to find the summation of the following symbolic
> expression
>
> (z^k)/(n+k)!
>
> with respect to its symbolic variable k from 0 to 2m-1.
>
> I have done this as follows
>
> >> syms n real
> >> syms k real
> >> syms z real
> >> syms m real
> >> simplify(symsum((z^k)/maple('factorial', n+k), k, 0, 2*m-1))
>
> (For some reason symsum((z^k)/factorial(n+k), k, 0, 2*m-1)
> does not work.)
>
>
> and I obtain
>
> ans =
>
> z^(-n)*exp(z)*(-gamma(n,z)*gamma(2*m+n)+gamma(2*m+n,z)*gamma
(n))/gamma(n)/gamma(2*m+n)
>
> Why does gamma have 2 parameters? The gamma function can
> only have one input argument
>
> Please help.
> Helen
---------
  The two-argument 'gamma' function undoubtedly refers to the incomplete
gamma function. Unfortunately it is defined in more than one way.
Mathworks' numerical 'gammainc' function is defined as a normalized entity,
but others define it differently. For example, MathWorld defines an 'upper'
and a 'lower' incomplete gamma function. See

 http://mathworld.wolfram.com/IncompleteGammaFunction.html

  You can tell which of the definitions your symbolic toolbox is using in your
expression above by writing

 int('exp(-t)*t^(n-1)','t',0,'m') or
 int('exp(-t)*t^(n-1)','t','m',inf)

  In any case, writing

 int('exp(-t)*t^(n-1)','t',0,inf)

should always give you the single argument function, gamma(n).

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics