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

MathGroup Archive 2007

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

Search the Archive

Re: a definite integral

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83846] Re: a definite integral
  • From: "David W.Cantrell" <DWCantrell at sigmaxi.net>
  • Date: Sun, 2 Dec 2007 04:10:45 -0500 (EST)
  • References: <fire23$rjr$1@smc.vnet.net>

"Arnold Knopfmacher" <Arnold.Knopfmacher at wits.ac.za> wrote:
> Given the function
>
> f=(1 - z - u*z - Sqrt[-4*z + (1 + z - u*z)^2])/
>   (2*u*z*Sqrt[-4*z + (1 + z - u*z)^2])
>
> I wish to compute
> g[z]=Integrate[f,{u,0,1}]
>
> (Here  z and u are independent variables, that are real and positive and
>  the function inside of Sqrt[ ] is nonnegative.)

If it is to be nonnegative for all u in the interval [0, 1], then we must
have z <= 1/4.

> Mathematica 5.2 can only evaluate this if I ask for the indefinite
> integral

Specifically

In[8]:= indef[u_, z_] =
Integrate[(1 - z - u*z - Sqrt[-4*z + (1 + z - u*z)^2])/ (2*u*z*
Sqrt[-4*z + (1 + z - u*z)^2]) , u]

Out[8]= (-Log[(-u)*z] + Log[1 + z - u*z + Sqrt[-4*z + (1 + z - u*z)^2]] +
Log[-((2*(1 - 3*z - u*z + z*(1 + z - u*z)))/(u*(-1 + z)^2*z^2)) -
(2*Sqrt[-4*z + (1 + z - u*z)^2])/(u*(-1 + z)*z^2)])/(2*z)

AFAIK, that result is correct.

>  but this then gives errors when u=0 or u=1 is substituted.

I do not get an error at u=1:

In[9]:= indef[1, z]

Out[9]= (Log[1 + Sqrt[1 - 4*z]] + Log[-((2*(1 - 3*z))/((-1 + z)^2*z^2)) -
(2*Sqrt[1 - 4*z])/((-1 + z)*z^2)] - Log[-z])/(2*z)

OTOH, as you indicated, there is a problem at u=0:

In[10]:= indef[0, z]
a warning...
Out[10]= Indeterminate

but that is not surprising. It is unfortunate, however, that version 5.2
cannot correctly calculate the limit

In[11]:= Limit[indef[u, z], u -> 0]
Out[11]= Infinity/z

and that is a bug. (I wonder if version 6 does better.)

Instead, the limit above should have given

1/(2 z) Log[8/(1 - z)^4]

or something equivalent. I do not know how to get Mathematica to give that
result. But subtracting it from Out[9], we get your desired g[z], which
simplifies to

Log[((1 - z)^2*(1 - Sqrt[1 - 4*z] - 2*z))/(2*z^2)]/(2*z)

> I believe it is because
> Mathematica is choosing the wrong branches of the square root or of the
> Log function when it computes the indefinite integral.

I doubt that is the explanation in this case.

> The function f is integrable, as can be obseved by first finding say
>  Series[f,{z,0,10}] and then integrating term by term to find the
>  (correct) initial power series terms of g[z].

Yes, and the terms obtained in that way agree with

In[16]:= Series[Log[((1 - z)^2*(1 - Sqrt[1 - 4*z] - 2*z))/(2*z^2)]/(2*z),
{z, 0, 10}]

Out[16] = z + 3*z^2 + (17*z^3)/2 + 25*z^4 + (461*z^5)/6 + 245*z^6 +
(3217*z^7)/4 + 2701*z^8 + (92377*z^9)/10 + 32065*z^10 + O[z]^11

David W. Cantrell


  • Prev by Date: Re: Exporting Sound
  • Next by Date: Re: export an array of variable depth
  • Previous by thread: Re: a definite integral
  • Next by thread: Re: a definite integral