Suppose I have the following sum of integrals:
(Integrate[E^K[1]*(f2[K[1]] + x1[K[1]]), {K[1], 1, t}] -
Integrate[E^K[1]*(f2[K[1]] + x1[K[1]]), {K[1], 1, t0}])/
E^t // TraditionalForm
Clearly, the sum can be simplified by interchanging the limits of the second integral with an additional minus and then rewrite it as a single integral (for t0<1
).
Mathematica, however, doesn't do it automatically with Simplify
or FullSimplify
. I tried to invoke it with manual rules like
intRule1 = Integrate[a_, {b_, c_, d_}] :> -Integrate[a, {b, d, c}];
intRule2 =
Integrate[a_, {b_, c_, d_}] + Integrate[a_, {b_, d_, e_}] :>
Integrate[a, {b, c, e}];
But this is mostly inconvenient since I need to apply the rule manually wherever I need it. Is there a better way to make this simplification mostly automatically?
TransformationFunctions
(not mentioned in the linked dup but search, there may be another related question ) $\endgroup$