Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Help to solve an integral by using Mathematica Integrate[Sqrt[t

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112819] Re: Help to solve an integral by using Mathematica Integrate[Sqrt[t
  • From: Valeri Astanoff <astanoff at gmail.com>
  • Date: Fri, 1 Oct 2010 06:02:40 -0400 (EDT)
  • References: <i84adn$gvn$1@smc.vnet.net>

On 1 oct, 11:42, Leonid Shifrin <lsh... at gmail.com> wrote:
> To my surprise, Mathematica has been very reluctant to help here, despite
> the
> seemingly simple form of the integral. Here is what I did anyway:
>
> 1. Find an indefinite integral:
>
> In[94]:= expr = Integrate[Sqrt[t (1 - t) (z - t)], t]
>
> Out[94]= (Sqrt[(-1 + t) t (t - z)] (2 t (-1 + 3 t - z) + (
>    2 (-1 + t) (-((2 t (t - z) (1 - z + z^2))/(-1 + t)^2) - (
>       2 I Sqrt[t/(-1 + t)] Sqrt[(
>        t - z)/(-1 + t)] (1 - z + z^2) EllipticE[
>         I ArcSinh[1/Sqrt[-1 + t]], 1 - z])/Sqrt[-1 + t] + (
>       I Sqrt[t/(-1 + t)] Sqrt[(t - z)/(-1 + t)]
>         z (1 + z) EllipticF[I ArcSinh[1/Sqrt[-1 + t]], 1 - z])/
>       Sqrt[-1 + t]))/(t - z)))/(15 t)
>
> 2. Find a limit on the lower and (at zero):
>
> In[95]:= expr0 = Limit[expr , t -> 0]
>
> Out[95]= -(2/  15) I (2 (1 - z + z^2) EllipticE[1 - z] -
>    z (1 + z) EllipticK[1 - z])
>
> 3. Make a substitution z->t-q in the indefinite integral result:
>
> In[96]:= expr1 = expr /. z -> t - q
>
> Out[96]= (Sqrt[
>  q (-1 + t) t] (2 t (-1 + q + 2 t) + (
>    2 (-1 + t) (-((2 q t (1 + q - t + (-q + t)^2))/(-1 + t)^2) - (
>       2 I Sqrt[q/(-1 + t)] Sqrt[
>        t/(-1 + t)] (1 + q - t + (-q + t)^2) EllipticE[
>         I ArcSinh[1/Sqrt[-1 + t]], 1 + q - t])/Sqrt[-1 + t] + (
>       I Sqrt[q/(-1 + t)] Sqrt[
>        t/(-1 + t)] (-q + t) (1 - q + t) EllipticF[
>         I ArcSinh[1/Sqrt[-1 + t]], 1 + q - t])/Sqrt[-1 + t]))/
>    q))/(15 t)
>
> 4. Simplify it:
> In[97]:= expr2 = FullSimplify[expr1, t > 0 && t < 1 && q > 0 && q < 1=
]
>
> Out[97]= (Sqrt[
>  q (-1 + t) t] (-((2 t (1 + q (3 + 2 q - 5 t) + t))/(-1 + t)) - (
>    2 I t (2 (1 + q + q^2 - 2 q t + (-1 + t) t) EllipticE[
>         I ArcCoth[Sqrt[t]],
>         1 + q - t] - (-1 + q - t) (q - t) EllipticF[
>         I ArcCoth[Sqrt[t]], 1 + q - t]))/Sqrt[q (-1 + t) t]))/(15=
 t)
>
> 5. Get the result for the upper end by substituting q->0 and then t->z:
>
> In[98]:= expr3 = (expr2 // Apart) /. q -> 0 /. t -> z
>
> Out[98]= -(4/15) I EllipticE[I ArcCoth[Sqrt[z]], 1 - z] -
>  2/15 I z^2 (2 EllipticE[I ArcCoth[Sqrt[z]], 1 - z] -
>     EllipticF[I ArcCoth[Sqrt[z]], 1 - z]) +
>  2/15 I z (2 EllipticE[I ArcCoth[Sqrt[z]], 1 - z] +
>     EllipticF[I ArcCoth[Sqrt[z]], 1 - z])
>
> 6. Get the final result:
>
> In[99]:= expr4 = FullSimplify[expr3 - expr0]
>
> Out[99]=
>  2/15 I (2 (1 + (-1 + z) z) EllipticE[1 - z] -
>    2 (1 + (-1 + z) z) EllipticE[I ArcCoth[Sqrt[z]], 1 - z] +
>    z (1 + z) (EllipticF[I ArcCoth[Sqrt[z]], 1 - z] -
>       EllipticK[1 - z]))
>
> Now, it turns out that the sign is wrong. All my attempts to verify the
> correctness of
> this analytically failed (I did not try too hard though). Neither was I a=
ble
> to reduce it
> to the manifestly real form.
>
> The final form of the result is then (correcting the sign and taking the
> real part):
>
> exprint[z_] :=
>   Re[-(2/15)
>       I (2 (1 + (-1 + z) z) EllipticE[1 - z] -
>       2 (1 + (-1 + z) z) EllipticE[I ArcCoth[Sqrt[z]], 1 - z] +
>       z (1 + z) (EllipticF[I ArcCoth[Sqrt[z]], 1 - z] -
>          EllipticK[1 - z]))];
>
> I did compare it to the result of numerical integration:
>
> exprintN[z_?NumericQ] :=
>  NIntegrate[Sqrt[t (1 - t) (z - t)], {t, 0, z}]
>
> Plot[{exprint[z], exprintN[z]}, {z, 0, 1}]
>
> Plot[{exprint[z] - exprintN[z]}, {z, 0, 1}]
>
> And they seem to agree, but that's about all I could squeeze out of it.
>
> Hope this helps.
>
> Regards,
> Leonid
>
>
>
> On Thu, Sep 30, 2010 at 12:51 PM, Hugo <hpe650... at gmail.com> wrote:
> > Could anybody help me to implement this integral in Mathematica?
> > Integrate[Sqrt[t (1-t) (z-t)],{t,0,z}] where z and t are real with
> > intervals 0<t<1 and 0<z<1. I'd really appreciate any help for this
> > problem.- Masquer le texte des messages pr=E9c=E9dents -
>
> - Afficher le texte des messages pr=E9c=E9dents -

I suggest this form :

(1/15)*(4*(1 + (z-1)*z)*EllipticE[z] - 2*(2 + (z-3)*z)*EllipticK[z])

v.a.




  • Prev by Date: Re: Mathematica calculates RSquared wrongly?
  • Next by Date: Finding out which fonts are available
  • Previous by thread: Re: Help to solve an integral by using Mathematica Integrate[Sqrt[t
  • Next by thread: Re: Help to solve an integral by using Mathematica Integrate[Sqrt[t