Mathematica 9 is now available
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: [mg83917] Re: a definite integral
  • From: m.r at inbox.ru
  • Date: Tue, 4 Dec 2007 04:28:36 -0500 (EST)
  • References: <fire23$rjr$1@smc.vnet.net> <fittd2$7ph$1@smc.vnet.net>

On Dec 2, 3:20 am, "David W.Cantrell" <DWCantr... at sigmaxi.net> wrote:
> "Arnold Knopfmacher" <Arnold.Knopfmac... 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

Actually Limit[indef[u, z], u -> 0] should not give 1/(2 z) Log[8/(1 -
z)^4]. This is correct for 0 < z < 1 but for 1 < z we do get a
logarithmic term. In version 6:

In[1]:= tmp = (1/(2 z))(-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)])

In[2]:= Limit[tmp, u -> 0, Assumptions -> 0 < z < 1]

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

In[3]:= Assuming[1 < z, Series[tmp, {u, 0, 0}] // Simplify]

Out[3]= SeriesData[u, 0, {(-2 Log[u] + Log[8/z^2])/(2 z)}, 0, 1, 1]

Maxim Rytin
m.r at inbox.ru


  • Prev by Date: Re: Using ReadList to read a string
  • Next by Date: Re: TwoAxisListPlot for V6?
  • Previous by thread: Re: a definite integral
  • Next by thread: Re: Re: "vector" Map[] / functional outer product?