Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Alternating sums of large numbers

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91920] Re: Alternating sums of large numbers
  • From: "David Park" <djmpark at comcast.net>
  • Date: Fri, 12 Sep 2008 05:31:13 -0400 (EDT)
  • References: <gaar1q$156$1@smc.vnet.net>

Use the WorkingPrecision option of Plot, and set NN to a high precision 
using the backquote character, or set NN = 139/2.

NN = 69.5`30;

n = 7;

coeff = (Gamma[2*NN - n + 1]*(2*NN - 2*n))/n!;

f[z_] := Sum[((-1)^(\[Mu] + \[Nu])*Binomial[n, \[Mu]]*
      Binomial[n, \[Nu]]*
      Gamma[2*NN - 2*n + \[Mu] + \[Nu], z])/(Gamma[
       2*NN - 2*n + \[Mu] + 1]*Gamma[2*NN - 2*n + \[Nu] + 1]), {\[Mu],
     0, n}, {\[Nu], 0, n}];

Plot[coeff*f[z], {z, 0, 100},
 WorkingPrecision -> 25]

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Mikhail Lemeshko" <mikhail.lemeshko at gmail.com> wrote in message 
news:gaar1q$156$1 at smc.vnet.net...
> Dear friends,
>
> I'm using a Mathematica 6, and I've faced with the following problem.
> Here is a copy of my Mathematica notebook:
>
> --------------------------------------------------------
>
> NN = 69.5;
>
> n = 7;
>
> coeff = (Gamma[2*NN - n + 1]*(2*NN - 2*n))/n!;
>
> f[z_] := Sum[((-1)^(\[Mu] + \[Nu])*Binomial[n, \[Mu]]*Binomial[n, \
> [Nu]]*Gamma[2*NN - 2*n + \[Mu] + \[Nu], z])/(Gamma[2*NN - 2*n + \[Mu]
> + 1]*Gamma[2*NN - 2*n + \[Nu] + 1]), {\[Mu],0, n}, {\[Nu], 0, n}];
>
> Plot[coeff*f[z], {z, 0, 100}]
>
> --------------------------------------------------------
>
> As you can see, I want to calculate a double alternating sum,
> consisting of large terms (products of Gamma-functions and binomial
> coefficients). Then I want to plot the result, in dependence on
> parameter z, which takes part in the summation as an argument of the
> incomplete Gamma-function, Gamma[2*NN - 2*n + \[Mu] + \[Nu], z].
>
> Apart from this, I have another parameter, n, which is an upper limit
> for both of sums, and also takes part in Gamma functions. When this
> parameter grows, the expression next to summation also increases. At
> some point, Mathematica begins to show very strange results - and my
> question is actually about this.
>
> For instance, if the parameter n=5, everything is O.K., the plot shows
> a smooth curve. When we set n=6, there appears a little "noise" at
> 60<z<80, which is of no sense. This noise increases with n and is huge
> for n=8.
>
> A suppose that this error is caused by the huge numbers with
> alternating signs, contributing to the summation - probably there are
> some mistakes introduced by numerical evaluation. I tried to play with
> Accuracy etc., but it does not help. I also investigated the
> possibility that the error is introduced not by the summation, but by
> the product of big numbers. According to this, I tried to compute the
> sum of Exp[Log[Gamma]+Log[Gamma]...]    (the logarithm smoothly
> depends on z). But it does not help as well...
>
> I would very much appreciate your advice on such problem.
>
> Many thanks in advance,
> Mikhail.
> 



  • Prev by Date: Re: Real and Complex Roots presented in a single plot
  • Next by Date: Re: Zoomable ListPlot
  • Previous by thread: Re: Alternating sums of large numbers
  • Next by thread: Re: Alternating sums of large numbers