MathGroup Archive 2005

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

Search the Archive

Re: Some bugs in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59205] Re: [mg59188] Some bugs in Mathematica
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 2 Aug 2005 00:42:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

$Version

5.2 for Mac OS X (June 20, 2005)

Question 1:

s1[n_]:=Sum[(Gamma[n-k-1/2]*Gamma[k+1/2])/
       (Gamma[n-k-1]*Gamma[k+1]),
      {k,0,n-1}];

For arbitrary n, this sum is unevaluated

s1[n]

Sum[(Gamma[k + 1/2]*Gamma[-k + n - 1/2])/
   (Gamma[k + 1]*Gamma[-k + n - 1]),
  {k, 0, n - 1}]

For specific nonnegative integer values of n

Table[s1[n],{n,5}]

{0, Pi/2, Pi, (3*Pi)/2, 2*Pi}

For nonnegative integer values of n, this sum appears to be (n-1)*Pi/2

And@@Table[s1[n]==(n-1)*Pi/2,{n,25}]

True

Question 2:

int1=Integrate[1/(r*Sqrt[r^2-a^2]*
         Sqrt[r^2-b^2]),r]

-((Sqrt[1 - a^2/r^2]*Sqrt[1 - b^2/r^2]*
   AppellF1[1, 1/2, 1/2, 2, a^2/r^2,
    b^2/r^2])/(2*Sqrt[r^2 - a^2]*
   Sqrt[r^2 - b^2]))

int2=Simplify[int1,Element[r, Reals]]

-(AppellF1[1, 1/2, 1/2, 2, a^2/r^2,
   b^2/r^2]/(2*r^2))

These simplify to a log if b equals a

Simplify[int1/.b->a]

Log[1 - a^2/r^2]/(2*a^2)

int2 /. b->a

Log[1 - a^2/r^2]/(2*a^2)

Question 3:

Your last integral did not return in the amount of time I was willing to
wait.
 

Bob Hanlon

On 8/1/05 1:05 AM, "akhmel at hotmail.com" <akhmel at hotmail.com> wrote:

> Dear Mr. Lichtblau,
> 
> I attach hereby Mathematica file with 3 examples, which you might be
> interested to look at.
> 
> 1) Example of summation which gives an obviously wrong result, 0
> instead of
> 1.
> 2) Example of indefinate integration, which gives appel function
> instead of
> elementary logarithm.
> 3) Definite integration which doesn't give any result at all, though
> again,
> it is nothing but elementary function.
> 
> Your comments will be appreciated.
> 
> Thanks,
> 
> Alex
> 
> 
> Notebook[{
> 
> Cell[CellGroupData[{
> Cell[BoxData[
>     \(Sum[\(Gamma[n - k - 1/2] Gamma[k + 1/2]\)\/\(Gamma[n - k - 1]
> Gamma[k + \
> 1]\), {k, 0, n - 1}]\)], "Input"],
> 
> Cell[BoxData[
>     \(0\)], "Output"]
> }, Open  ]],
> 
> Cell[CellGroupData[{
> 
> Cell[BoxData[
>     \(Integrate[1\/\(r \(\@\( r\^2 - a\^2\)\) \@\(r\^2 - b\^2\)\),
>       r]\)], "Input"],
> 
> Cell[BoxData[
>     \(\(-\(\(\@\(1 - a\^2\/r\^2\)\ \@\(1 - b\^2\/r\^2\)\ AppellF1[1,
> 1\/2,
>               1\/2, 2, a\^2\/r\^2,
>               b\^2\/r\^2]\)\/\(2\ \@\(\(-a\^2\) + r\^2\)\ \@\(\(-b\^2\)
> + \
> r\^2\)\)\)\)\)], "Output"]
> }, Open  ]],
> 
> Cell[BoxData[
>     \(\(\(-\(\(\@\(1 - a\^2\/r\^2\)\ \@\(1 - b\^2\/r\^2\)\ AppellF1[1,
> 1\/2,
>               1\/2, 2, a\^2\/r\^2,
>               b\^2\/r\^2]\)\/\(2\ \@\(\(-a\^2\) + r\^2\)\ \@\(\(-b\^2\)
> + \
> r\^2\)\)\)\)\(\[IndentingNewLine]\)
>     \)\)], "Input"],
> 
> Cell[CellGroupData[{
> 
> Cell[BoxData[
>     \(Integrate[
>       1\/\(\(r\^3\) \(\@\(r\^2 - a\^2\)\) \@\(r\^2 - b\^2\)\), {r, x,
>         a}]\)], "Input"],
> 
> Cell[BoxData[
>     \(Integrate::"gener" \(\(:\)\(\ \)\)
>       "Unable to check convergence."\)], "Message"],
> 
> Cell[BoxData[
>     \(\[Integral]\_x\%a\(
>             1\/\(r\^3\ \@\(\(-a\^2\) + r\^2\)\ \@\(\(-b\^2\) +
> r\^2\)\)\) \
> \[DifferentialD]r\)], "Output"]
> }, Open  ]]
> },
> FrontEndVersion->"4.2 for Microsoft Windows",
> ScreenRectangle->{{0, 720}, {0, 407}},
> WindowSize->{496, 249},
> WindowMargins->{{0, Automatic}, {Automatic, 0}}
> ]
> 
> (*******************************************************************
> Cached data follows.  If you edit this Notebook file directly, not
> using Mathematica, you must remove the line containing CacheID at
> the top of  the file.  The cache data will then be recreated when
> you save this file from within Mathematica.
> *******************************************************************)
> 
> (*CellTagsOutline
> CellTagsIndex->{}
> *)
> 
> (*CellTagsIndex
> CellTagsIndex->{}
> *)
> 
> (*NotebookFileOutline
> Notebook[{
> 
> Cell[CellGroupData[{
> Cell[1776, 53, 127, 2, 44, "Input"],
> Cell[1906, 57, 35, 1, 29, "Output"]
> }, Open  ]],
> 
> Cell[CellGroupData[{
> Cell[1978, 63, 103, 2, 48, "Input"],
> Cell[2084, 67, 228, 4, 71, "Output"]
> }, Open  ]],
> Cell[2327, 74, 259, 5, 98, "Input"],
> 
> Cell[CellGroupData[{
> Cell[2611, 83, 126, 3, 48, "Input"],
> Cell[2740, 88, 107, 2, 24, "Message"],
> Cell[2850, 92, 148, 3, 46, "Output"]
> }, Open  ]]
> }
> ]
> *)
> 



  • Prev by Date: Re: Some bugs in Mathematica
  • Next by Date: Re: fit a tube around a trajectory
  • Previous by thread: Re: Some bugs in Mathematica
  • Next by thread: Re: Re: Some bugs in Mathematica