# Definite integral in terms of indefinite integrals

I'm somewhat confused by Spivak's explanation of indefinite integrals. In his Calculus (3rd edition) on page 362 he gives the formula for indefinite integrals:

$$\int[f(x)+g(x)]dx=\int f(x)dx + \int g(x)dx$$

Then he says that the consequence of that formula is

$$\int_a^b[f(x)+g(x)]dx=\int_a^b f(x)dx + \int_a^b g(x)dx$$

since each integral can be written as the difference of the values at $$a$$ and $$b$$ of corresponding primitives.

How exactly is it a consequence?

My thoughts: we know that $$f(x)+g(x)$$ is the derivative of $$F(x)=\int_a^x[f(t)+g(t)dt]$$, hence $$F$$ is one of the primitives of $$f+g$$. All primitives of a function have the same derivative, particularly $$\frac{d}{dx}\int[f(t)+g(t)]dx=\left[\frac{d}{dx}F(x)+C=\frac{d}{dx}\int_a^x[f(t)+g(t)]dt+C \right]$$ Hence the primitives differ by a constant and I understand Spivak ignores the constant. Now we can write

$$\int^b_a[f(t)+g(t)]dx\\= \left. F(x) \right\vert^b_a\\=\left.\int[f(t)+g(t)]dx \right\vert^b_a\\=\left.\int f(x)dx\right\vert^b_a + \left.\int g(x)dx\right\vert^b_a\\=\int_a^b f(x)dx + \int_a^b g(x)dx$$

In the last equality I used a function like $$F(x)$$ and the second fundamental theorem of Calculus.

Is it correct at all?

First thing we're going to do is define "pointwise" addition. What I mean is this. Take two functions $$f,g:\Bbb{R}\to\Bbb{R}$$. We define the function $$(f+g)$$ as $$(f+g):\Bbb{R}\to\Bbb{R}$$ $$(f+g):x\mapsto f(x)+g(x)$$ What I'm saying here is simple - we define the addition of two functions to be another function such that its value at a certain argument is the sum of the values of the other two functions at that argument. E.g, if $$f=\exp$$ and $$g=\sin$$ we have $$(\exp+\sin)(\pi)=\exp(\pi)+\sin(\pi)=e^\pi.$$ Now that we're comfortable with the idea of maps that take us from one function to another function, let's define differentiation and integration in this way. The differentiation operator: $$\mathrm{D}:\{\text{set of funcs that can be differentiated}\}\to\{\text{set of funcs that are the derivative of something}\}$$ These two sets have more technical names but I won't get into that here. The derivative operator takes a differentiable function to its derivative: $$\mathrm{D}:f\mapsto \mathrm{D}(f)\equiv \mathrm{D}f$$ Often people don't bother writing the parenthesis. Based on what we know about $$f$$, what does $$\mathrm{D}f$$ do to a certain argument? Well, we all know the limit definition: $$(\mathrm{D}f)(x)=\lim_{s\to x}\frac{f(s)-f(x)}{s-x}$$ So how do we define integration? Integration is defined as the (almost) inverse operation to differentiation: $$\mathrm{I}:f\mapsto \mathrm{I}f$$ $$\mathrm{I}(\mathrm{D}f)=\mathrm{D}(\mathrm{I}f)=f$$ I say that it is the almost inverse because all of the above is true up to a constant difference, i.e, I'm treating the functions $$x\mapsto \sin(x)$$ and $$x\mapsto \sin(x)+1$$ as the same thing, since they have the same derivative. Using this concept, "indefinite integration" is simply $$\int f(x)\mathrm{d}x=(\mathrm{I}f)(x)$$ So, Spivak's first formula basically tells us that the integral operator is linear, $$\mathrm{I}(f+g)=\mathrm{I}f+\mathrm{I}g$$ Where of course $$(f+g)$$ has been defined using the pointwise addition from before. I'm not going to prove this formula, that's the job of a more serious real analysis course.
We can define indefinite integration as just the change in this function $$\mathrm{I}f$$ between $$a$$ and $$b$$, $$\int_a^b f(x)\mathrm{d}x=(\mathrm{I}f)(b)-(\mathrm{I}f)(a)$$ So from this, how can we see that $$\int_a^b\left(f(x)+g(x)\right)\mathrm{d}x=\int_a^b f(x)\mathrm{d}x+\int_a^b g(x)\mathrm{d}x$$ To do this we use the pointwise addition. The left hand side is $$\mathrm{I}(f+g)(b)-\mathrm{I}(f+g)(a)$$ But remember, the integral operator is linear! So we can break it up: $$\mathrm{I}f(b)+\mathrm{I}g(b)-\mathrm{I}f(a)-\mathrm{I}g(a)$$ Whereas the right hand side is $$\big[\mathrm{I}f(b)-\mathrm{I}f(a)\big]+\big[\mathrm{I}g(b)-\mathrm{I}g(a)\big]$$ Comparing these two expressions, we see that they are the same.