I'm trying to get the indefinite integral w.r.t. x of a very simple
function depending on a single parameter G, namely G/(x**2+G**2). I want to
assume the parameter G to be either one of three: general, positive, and
real. This is what I did
x=sp.symbols('x')
G=sp.symbols('G')
c = lambda x: G/(x**2+G**2)
u1=sp.integrate(c(x),x)
G=sp.symbols('G',positive=True)
c = lambda x: G/(x**2+G**2)
u2=sp.integrate(c(x),x)
G=sp.symbols('G',real=True)
c = lambda x: G/(x**2+G**2)
u3=sp.integrate(c(x),x)
print u1,'\n',u2,'\n',u3
This is what I get
-I*log(-I*G + x)/2 + I*log(I*G + x)/2
atan(x/G)
0
The 1st two I can understand, that 3rd one is completely unclear to me.
Should I expect this? Why?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/a6c78c2e-7d1f-4b53-b679-614e6f382d1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.