For instance, I get the following expression:
$\int_0^{\infty } \left(\frac{e^2 x}{e^{2 x+2}-e^{2 x}}-\frac{x}{e^{2 x+2}-e^{2 x}}-\frac{e^2}{2 \left(e^{2 x+2}-e^{2 x}\right)}+\frac{3}{2 \left(e^{2 x+2}-e^{2 x}\right)}+\frac{1}{2}\right) \, dx+\frac{1}{2-2 e^2}$
I want it to be automatically simplified to $\int_0^\infty \frac12 dx$, because all other terms cancel each other (can be verified).
Or $\int_0^{\infty } \left(\frac{3 e^2 x^2}{6 e^x-12 e^{x+1}+6 e^{x+2}}-\frac{6 e x^2}{6 e^x-12 e^{x+1}+6 e^{x+2}}+\frac{3 x^2}{6 e^x-12 e^{x+1}+6 e^{x+2}}-\frac{9 e^2 x}{6 e^x-12 e^{x+1}+6 e^{x+2}}+\frac{24 e x}{6 e^x-12 e^{x+1}+6 e^{x+2}}-\frac{15 x}{6 e^x-12 e^{x+1}+6 e^{x+2}}+x+\frac{e^2}{6 e^x-12 e^{x+1}+6 e^{x+2}}-\frac{8 e}{6 e^x-12 e^{x+1}+6 e^{x+2}}+\frac{13}{6 e^x-12 e^{x+1}+6 e^{x+2}}\right) \, dx+\frac{1}{3}-\frac{1}{1-2 e+e^2}$
should be simplified to $\int_0^\infty x dx$.
Or $\frac{12 e^4 \int_0^{\infty } \left(2 e^{-2 x} x+2 x+\frac{2}{e^{2 x+2}-e^{2 x}}-\frac{e^2}{e^{4 x}+e^{4 x+2}}+\frac{1}{e^{4 x}+e^{4 x+2}}+1\right) \, dx}{12 e^4-12}-\frac{12 \int_0^{\infty } \left(2 e^{-2 x} x+2 x+\frac{2}{e^{2 x+2}-e^{2 x}}-\frac{e^2}{e^{4 x}+e^{4 x+2}}+\frac{1}{e^{4 x}+e^{4 x+2}}+1\right) \, dx}{12 e^4-12}-\frac{e^4}{12 e^4-12}-\frac{18 e^2}{12 e^4-12}-\frac{5}{12 e^4-12}$
should be simplified to $\frac16+2\int_0^\infty x dx+\int_0^\infty 1 dx$.
Is there a way to make Mathematica doing so?
P.S. Input form for the first example:
1/(2 - 2*E^2) +
Integrate[
1/2 + 3/(2*(-E^(2*x) + E^(2 + 2*x))) -
E^2/(2*(-E^(2*x) + E^(2 + 2*x))) -
x/(-E^(2*x) + E^(2 + 2*x)) + (E^2*x)/(-E^(2*x) +
E^(2 + 2*x)), {x, 0, Infinity}]
For the second example:
-(1/3) + 1/(1 - 2*E + E^2) +
Integrate[(13*E^x)/(6 - 12*E + 6*E^2) - (8*E^(1 + x))/(6 - 12*E +
6*E^2) +
E^(2 + x)/(6 - 12*E + 6*E^2) -
x + (15*E^x*x)/(6 - 12*E + 6*E^2) - (24*E^(1 + x)*x)/(6 - 12*E +
6*E^2) +
(9*E^(2 + x)*x)/(6 - 12*E + 6*E^2) + (3*E^x*x^2)/(6 - 12*E +
6*E^2) -
(6*E^(1 + x)*x^2)/(6 - 12*E + 6*E^2) + (3*E^(2 + x)*x^2)/(6 -
12*E + 6*E^2), {x, 0, Infinity}]
For the third example:
-(5/(-12 + 12*E^4)) - (18*E^2)/(-12 + 12*E^4) - E^4/(-12 + 12*E^4) -
(12*Integrate[
1 + 2/(-E^(2*x) + E^(2 + 2*x)) + 1/(E^(4*x) + E^(2 + 4*x)) -
E^2/(E^(4*x) + E^(2 + 4*x)) +
2*x + (2*x)/E^(2*x), {x, 0, Infinity}])/(-12 + 12*E^4) +
(12*E^4*
Integrate[
1 + 2/(-E^(2*x) + E^(2 + 2*x)) + 1/(E^(4*x) + E^(2 + 4*x)) -
E^2/(E^(4*x) + E^(2 + 4*x)) +
2*x + (2*x)/E^(2*x), {x, 0, Infinity}])/(-12 + 12*E^4)
Full code example:
f[x_] := 1 + Exp[-2 x]
g[x_] := 1
omb := D[Sum[
Refine[DifferenceDelta[Integrate[Integrate[f[t], {t, 0, y}], y],
y]*DifferenceDelta[Integrate[Integrate[g[t], {t, 0, y}], y], y],
y > 0], {y, 0, x - 1}], x]
Func := D[omb, x]; Const := omb /. x -> 0
Inactivate[
Integrate[f[x], {x, 0, Infinity}][CenterDot]Integrate[
g[x], {x, 0, Infinity}], Integrate] ==
FullSimplify[Const + Integrate[Func, {x, 0, Infinity}]] //
ExpandAll // Quiet

InputForm) – Bob Hanlon Dec 19 '21 at 13:47Inactive[Integrate]– Bob Hanlon Dec 19 '21 at 14:01