Say we have
Integrate[a f[x],{x,-Infinity,Infinity}]
And want Mathmatica to factor out a to get
a Integrate[f[x],{x,-Infinity,Infinity}]
This works automatically for the indefinite integral
Integrate[a f[x],x]
but I need it to work for the definite one in order to further simplify long expressions. Just applying Factor doesn't do it and FullSimplify even with assumption Element[a,Reals] doesn't either.
Am I missing some obvious assumption that makes it work? Or do I have to write some pattern matching expression?
Quite possibly related is the fact that Mathematica doesn't see an equality here:
FullSimplify[
Integrate[a f[x], {x, -Infinity, Infinity}] ==
a Integrate[f[x], {x, -Infinity, Infinity}], Element[a, Reals]]
This just returns the input expression again:
Integrate[a f[x], {x, -Infinity, Infinity}] ==
a Integrate[f[x], {x, -Infinity, Infinity}]
Edit: I just checked and this is even true if we make replace a by a natural number directly! Again the unaltered expression is returned.
I am on Mathematica 10.1.0.0
Integrate[a f[x], {x, -Infinity, Infinity}] /. Integrate[a_, b_] :> Integrate[a, x] /. Integrate[a_, b_] :> Integrate[a, {x, -Infinity, Infinity}]? – kglr Aug 20 '19 at 13:37xis the actual integration variable whileacan be replaced by another symbol in this expression. I guess I was expecting something that would do it at once for integrals over any variable but for my current purpose this is actually enough. – tortortor Aug 20 '19 at 14:12