# Integral doesn't simplify!

My input:

FullSimplify[Integrate[b1[k], {k, 0, x}] + Integrate[-b1[k], {k, 0, x}]]


computes to: But I would expect: 0

Do I have to make some assumptions in order to get this to work?

Thanks!

• Note that it is not "always" even correct. Common example: In:= b1[k_] := k*RandomInteger[{0, 100}]In:= b1[k_] := k*RandomInteger[{0, 100}] Integrate[b1[k], {k, 0, x}] + Integrate[-b1[k], {k, 0, x}] Out= -11 x^2 Integrate[b1[k], {k, 0, x}] + Integrate[-b1[k], {k, 0, x}] Out= -11 x^2 Jul 19 '17 at 22:54

I don't know why FullSimplify does not employ the sum rule for this but as a workaround, you could implement your own TransformationFunction:

IntSumTransformFunction[expr_]:=expr/.((Integrate[leftArg1_,rightArg_]+Integrate[leftArg2_,rightArg_]):>Integrate[leftArg1+leftArg2,rightArg])
FullSimplify[Integrate[b1[k],{k,0,x}]+Integrate[-b1[k],{k,0,x}],TransformationFunctions->IntSumTransformFunction]


0

It can even handle "more complicated" cases:

FullSimplify[Integrate[2*b1[k],{k,0,x}]+Integrate[-b1[k],{k,0,x}],TransformationFunctions->IntSumTransFormFunction]


Integrate[b1[k],{k,0,x}]