c = lambda x: G/(x**2+G**2)
u=sp.integrate(c(x)*c(x-y),x)
d = (c(x)*c(x-y)).subs({y:sp.Integer(2),G:sp.Integer(1)})
v=sp.integrate(d,x)
print (u.subs({x:sp.Integer(1),y:sp.Integer(2),G:sp.Integer(1)})).evalf()
print (v.subs({x:sp.Integer(1)})).evalf()
-0.392699081698724 + 0.e-21*I
0
Keep in mind that indefinite integrals are only defined up to a
constant.
a,b = sp.symbols('a b')
r1=u.subs({x:a,y:sp.Integer(2),G:sp.Integer(1)}) - u.subs({x:b,y:sp.Integer(2),G:sp.Integer(1)})
r2=v.subs({x:a})-v.subs({x:b})
With u and v defined as in my original post.
Mathematically r1 and r2 are the same.
Do you know what kind of simplification I would have to apply to either of the two expressions r1,r2, to make SymPy actually also tell me that?
Do you know what kind of simplification I would have to apply to either of the two expressions r1,r2, to make SymPy actually also tell me that?