6
$\begingroup$

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?

$\endgroup$
1

2 Answers 2

9
$\begingroup$

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

$\endgroup$
1
  • 1
    $\begingroup$ that's a nifty trick! $\endgroup$
    – bmf
    Feb 1, 2023 at 1:12
7
$\begingroup$

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] &}]

t

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]

t

$\endgroup$
4
  • 1
    $\begingroup$ 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. $\endgroup$ Feb 1, 2023 at 1:15
  • 1
    $\begingroup$ @E.Chan-López that's a good and useful point for definite integrals! $\endgroup$
    – bmf
    Feb 1, 2023 at 1:26
  • 4
    $\begingroup$ @bmf: That's neat (thanks)... but if you distribute the integration you're basically ensuring the distribution property, not testing it... no? $\endgroup$ Feb 1, 2023 at 1:57
  • 2
    $\begingroup$ @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. $\endgroup$
    – bmf
    Feb 1, 2023 at 2:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.