Re: Integral giving complex answer
- To: mathgroup at smc.vnet.net
- Subject: [mg59276] Re: Integral giving complex answer
- From: "Drago Ganic" <drago.ganic at in2.hr>
- Date: Thu, 4 Aug 2005 02:07:59 -0400 (EDT)
- References: <dcples$6mm$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
David, from Mathemetaica version 5.1 and above we get the expected result: Integrate[1/(1 + 5x^2), x] ArcTan[Sqrt[5]*x]/Sqrt[5] The versions belove 5.1 (including 5.0) give the answer: Integrate[1/(1 + 5x^2), x] (I*(Log[Sqrt[5] - 5*I*x] - Log[Sqrt[5] + 5*I*x]))/(2*Sqrt[5]) which I unfortunately don't know how to simplify via some Mathematica function to the ArcTan result because ExpToTrig is not a real invers to TrigToExp as can bee seen from: TrigToExp[ArcTan[z]] (1/2)*I*Log[1 - I*z] - (1/2)*I*Log[1 + I*z] ExpToTrig[%] (1/2)*I*Log[1 - I*z] - (1/2)*I*Log[1 + I*z] Greetings from Croatia, Drago ----- Original Message ----- From: "David Sagan" <dcs16 at cornell.dot.edu> To: mathgroup at smc.vnet.net Subject: [mg59276] Integral giving complex answer > Hello: > > I am tring to do simple integrals but I am running into problems in that > Mathematica gives the answer using complex numbers. For example, > Integrate[1/(1 + 5x^2), x] gives a result in terms of logarithms of a > complex argument instead of the usual arctan formula. If I integrate > something like Integrate[1/(1 + a x^2), x] I get the answer in the form > I want using the arctan. > > My question is how to avoid getting the answer to Integrate[1/(1 + > 5x^2), x] in terms of complex logarithms. I know I could just integrate > 1/(1 + a x^2) and substitute a -> 5 later but in actuality I am dealing > with more complex integrals and it would be helpful if I did not have to > be making such substitutions. > > -- Thanks for any help, David Sagan > "David Sagan" <dcs16 at cornell.dot.edu> wrote in message news:dcples$6mm$1 at smc.vnet.net... > Hello: > > I am tring to do simple integrals but I am running into problems in that > Mathematica gives the answer using complex numbers. For example, > Integrate[1/(1 + 5x^2), x] gives a result in terms of logarithms of a > complex argument instead of the usual arctan formula. If I integrate > something like Integrate[1/(1 + a x^2), x] I get the answer in the form > I want using the arctan. > > My question is how to avoid getting the answer to Integrate[1/(1 + > 5x^2), x] in terms of complex logarithms. I know I could just integrate > 1/(1 + a x^2) and substitute a -> 5 later but in actuality I am dealing > with more complex integrals and it would be helpful if I did not have to > be making such substitutions. > > -- Thanks for any help, David Sagan >