Prove linearity of integration [duplicate]

I'd like to prove the linearity of integration over one real variable ($$x$$).

Integrate[f[x] + b g[x], x] == Integrate[f[x],x] + b Integrate[g[x],x]


which I was hoping would return True, but doesn't.

I've tried all manner of assumptions (e.g., $$b \in \mathbb{R}_{\geq 0}$$), without success. Is there a natural way of ensuring $$f$$ and $$g$$ are integrable?

• Feb 1, 2023 at 5:23

Since this is the Indefinite Integration, the two sides are the sets of functions rather than a single functons. The = actual means that the set of left hand side is equal to the set of right hand side.

D[Integrate[f[x] + b g[x],
x] - (Integrate[f[x], x] + b Integrate[g[x], x]), x]


0

• that's a nifty trick!
– bmf
Feb 1, 2023 at 1:12

You can use TransformationFunctions in order to Distribute the integration.

Simplify[
Integrate[f[x] + b g[x], x] ==
Integrate[f[x], x] + b Integrate[g[x], x],
TransformationFunctions -> {Automatic, # /.
smthng_Integrate :> Distribute[smthng] &}]


Edit: not sure if you are interested in the following

replacement =
Integrate[x_ + y_, z_] :> Integrate[x, z] + Integrate[y, z];


and then

(Integrate[f[x] + b g[x], x] /. replacement) ==
Integrate[f[x], x] + b Integrate[g[x], x]


• This makes me think about applying parity to functions in the case of symmetric intervals; taking advantage of the fact that in the case of odd functions, it's not necessary to integrate. Feb 1, 2023 at 1:15
• @E.Chan-López that's a good and useful point for definite integrals!
– bmf
Feb 1, 2023 at 1:26
• @bmf: That's neat (thanks)... but if you distribute the integration you're basically ensuring the distribution property, not testing it... no? Feb 1, 2023 at 1:57
• @DavidG.Stork yes, indeed. you are right about that. I guess you meant to test if the functions are Lebesque integrable, right? I am unaware of how to go about proving that.
– bmf
Feb 1, 2023 at 2:23