stange result with complex numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg36251] stange result with complex numbers
- From: Peter Nagy <pnagy at gwdg.de>
- Date: Wed, 28 Aug 2002 04:16:11 -0400 (EDT)
- Organization: GWDG, Goettingen
- Sender: owner-wri-mathgroup at wolfram.com
I am having a strange problem with a function giving a complex number as
a result. I did the following:
- define a function:
denom[x_, p_, d_] := Sqrt[1 + (x*Tan[p]/d)^2]
Integrate and simplify it with the assumption that d is larger than 0:
FullSimplify[Integrate[denom[x, p, d], {x, 0, d}], d > 0]
The result of the above line is
d/2*(1+i*Sqrt[2]*d*Cos[p]^2)*Sqrt[Sec[p]^2] where i is Sqrt[-1]
I assing it to a function called peter in the following way:
peter[p_, d_] := FullSimplify[Integrate[denom[x, p, d], {x, 0, d}], d>0]
and check the value of the function at [0,1]
peter[0,1]
and the result is 1.
How is it possible that the result doesn't have an imaginary part???
I would expect the result to be 0.5+Sqrt[2]/2*i
Thanks for your help,
Peter