Re: get rid of I in the result of an integral
- To: mathgroup at smc.vnet.net
- Subject: [mg116532] Re: get rid of I in the result of an integral
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 18 Feb 2011 04:36:40 -0500 (EST)
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