       Re: get rid of I in the result of an integral

• To: mathgroup at smc.vnet.net
• Subject: [mg116525] Re: get rid of I in the result of an integral
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Fri, 18 Feb 2011 04:35:24 -0500 (EST)

```Tell it to avoid ArcSec and ArcCsc

Assuming[0 < x < 1,
FullSimplify[
Integrate[1/((1 + y)^2 Sqrt[-x^2 + y^2]), {y, x, Infinity}],
ComplexityFunction -> (LeafCount[#] +
100 Count[#, _ArcSec | _ArcCsc, {0, Infinity}] &)]]

(-1 + x^2 + Sqrt[1 - x^2]*ArcSech[x])/(-1 + x^2)^2

Bob Hanlon

---- "Ruth Lazkoz S=C3=A1ez" <ruth.lazkoz at ehu.es> wrote:

==========================
Thanks for the tip, I would however like to get the result expressed
using ArcSech[x] without having to tell Mathematica explictly to do
/.ArcSec[x]->-I ArcSech[x] at the end

El 17/02/11 14:04, Bob Hanlon escribi=C3=B3:
> sol1 = Assuming[{Element[x, Reals], 0<  x<  1},
>    Integrate[1/((1 + y)^2 Sqrt[-x^2 + y^2]), {y, x, Infinity}]]
>
> (-1 + x^2 - I*Sqrt[1 - x^2]*ArcSec[x])/(-1 + x^2)^2
>
> sol2 = Assuming[{Element[x, Reals], 0<  x<  1},
>    FullSimplify[
>     Integrate[1/((1 + y)^2 Sqrt[-x^2 + y^2]), {y, x, Infinity}] //
>      TrigToExp]]
>
> (-1 + x^2 + Sqrt[1 - x^2]*Log[(1 + Sqrt[1 - x^2])/x])/(-1 + x^2)^2
>
> Using the form Assuming[{ _ }, _ ], makes the assumtions available to both FullSimplify and Integrate without having to repeat the assumptions.
>
> Assuming[{Element[x, Reals], 0<  x<  1},
>   FullSimplify[sol1 - sol2 == 0]]
>
> True
>
>
> Bob Hanlon
>
> ---- "Ruth Lazkoz S=C3=A1ez"<ruth.lazkoz at ehu.es>  wrote:
>
> ==========================
> Hi,
>
> When I do Integrate[1/((1 + y)^2 Sqrt[-x^2 + y^2]), {y, x, Infinity},
>    Assumptions ->  x^2<  1&&  1>  x>  0&&  Element[x, Reals]]
>
> I get
>
> (-1 + x^2 - I Sqrt[1 - x^2] ArcSec[x])/(-1 + x^2)^2
>
> and I would like the result expresed in terms of ArcSech[x] so that I
> does not appear.
>
> I know I can tell Mathematica to do the replacement afterwards, but I
> want to show the result to a colleague who is not so familiar with
> mathematica, and if it were possible to get the result in one go just by
> adding some extra assumption or so, it would be more convincing.
>
> Help will be appreciated. Best,
>
> Ruth

```

• Prev by Date: Re: Fitting Experimental Data
• Next by Date: Re: Another point about Mathematica 8.0
• Previous by thread: Re: get rid of I in the result of an integral
• Next by thread: Problem with free form input