Moving Integral Inside A Product It is easy to see that
$\int f(x)g(x)\,\mathrm{d}x\neq \int f(x)\,\mathrm{d}x\cdot \int g(x)\,\mathrm{d}x$
but I was wondering why, when looking at the properties of limits we have that
$$\lim_{x\to a}[f(x)g(x)]=\lim_{x\to a}f(x)\cdot \lim_{x\to a}g(x)$$
Which does not hold with integral, is it due to the fact that integration is also a linear function?
 A: It is linear (and thus it works well with sum and multiplication by a scalar), but it is not "multiplicative". Notice, for instance, that if $\int (fg)=\int f\int g$ held for all Riemann-integrable functions, this would not be consistent with linearity, because you'd get
$$\int 2f(x)\,dx\stackrel{\mathbf !}= c+2x \int f(x)\,dx\ne C+2\int f(x)\,dx$$
Moreover, there is another very famous map of functions which is linear but not multiplicative: the derivative
$$(fg)'=f'g+fg'\ne  f'g'$$
So there is no reason to assume that taking an antiderivative should be.
Another reason is that the integral (say, of continuous functions) is a limit of sums. $$\int_a^b f(x)\,dx=\lim_{n\to\infty}\frac1n\sum_{k=1}^n f\left(a+\frac {k(b-a)}n\right)$$
And it is clear that $$\left(\frac1n\sum_{k=1}^n f\left(a+\frac {k(b-a)}n\right)\right)\cdot\left(\frac1n\sum_{k=1}^n g\left(a+\frac {k(b-a)}n\right)\right)\ne\\\ne \left(\frac1n\sum_{k=1}^n f\left(a+\frac {k(b-a)}n\right)g\left(a+\frac {k(b-a)}n\right)\right)$$
because of the simple fact that typically $(a+b)(c+d)\ne (ac+bd)$.
A: Note, it's linear, so $\int \alpha f(x) dx  = \alpha \int f(x) dx$ and $\int [f(x) +g(x)] dx = \int f(x) dx + \int g(x) dx$, for any $\alpha \in \mathbb{R}, \, f, g: [a,b] \to \mathbb{R}$ integrable functions. The product of functions has no relations to linearity. 
Ok, let's go back to definitions. Let $f: [a, b] \to \mathbb{R}$ be a bounded 
 function. Let $P$ be a partition of $[a,b]$, i.e., $P = \{a = t_0 < t_1 < \ldots < t_{n-1} < t_n = b\}$, $m_i = \inf_{[t_{i-1}, t_{i}]} f$  $M_i = \sup_{[t_{i-1}, t_{i}]} f$ (why exists such $m_i$ and $M_i$?). Define lower and upper sum of f relative to $P$ as $s(f,P) = \sum m_i (x_{i+1} - x_i)$ and $S(f,P) = \sum M_i (x_{i+1} - x_i)$, respectively.
If $Q$ is a refinement of $P$, i.e., $Q \subseteq P$, is easy to prove that
$$m(b-a) \leq s(f, P) \leq s(f,Q) \leq S(f,Q) \leq S(f,P) \leq M(b-a) \quad \quad (*)$$
where $m = \inf_{[a,b]} f$ and $M = \sup_{[a,b]} f$. So, $\{s(f,P)\}_P$ and $\{S(f,P)\}_P$ are bounded and we can take sup and inf. Nice. Define the lower and upper integral 
$$\underline{\int} f(x) dx = \sup_P s(f,P)$$
$$\overline{\int} f(x) dx = \inf_P S(f,P)$$
Note, we just need bounded to define those integrals. In general, by definition of inf, sup and by (*)
$$\underline{\int} f(x) dx \geq \overline{\int} f(x) dx$$
Ok. We say that $f$ is Riemann-integrable (or just integrable) if 
$$\underline{\int} f(x) dx = \overline{\int} f(x) dx$$
and denote these integral by $\int f(x) dx$.
Now, if $f, g: [a,b] \to \mathbb{R}$ integrable, by this question and here
$$s(f+g, P) = \sum m(f+g)_i (x_{i+1} - x_i) \geq \sum [m(f)_i + m(g)_i ](x_{i+1} - x_i) = s(f,P) + s(g,P)$$
$$S(f+g, P) = \sum M(f+g)_i (x_{i+1} - x_i) \leq \sum [M(f)_i + M(g)_i ](x_{i+1} - x_i) = S(f,P) + S(g,P)$$
So
$$\underline{\int} (f+g)(x) dx = \sup_P s(f+g,P) \geq \sup_P s(f,P) + \sup_P s(f,P) = \underline{\int} f(x) dx + \underline{\int} g(x) dx$$
$$\overline{\int} (f+g)(x) dx = \inf_P S(f+g,P) \geq \inf_P S(f,P) + \inf_P S(f,P) = \overline{\int} f(x) dx + \overline{\int} g(x) dx$$
and
$$\int f(x) dx + \int g(x) dx = \underline{\int} f(x) dx + \underline{\int} g(x) dx \leq \underline{\int} (f+g)(x) dx \leq \overline{\int} (f+g)(x) dx = \overline{\int} f(x) dx + \overline{\int} g(x) dx = \int f(x) dx + \int g(x) dx$$
Finally,
$$\int (f+g)(x) dx = \underline{\int} (f+g)(x) dx \leq \overline{\int} (f+g)(x) dx = \int f(x) dx + \int g(x) dx$$
If you try this to product
$$s(fg, P) = \sum m(fg)_i (x_{i+1} - x_i) \geq \sum [m(f)_i \cdot m(g)_i ](x_{i+1} - x_i) \quad ???  \quad s(f,P) \cdot s(g,P)$$
$$S(fg, P) = \sum M(fg)_i (x_{i+1} - x_i) \leq \sum [M(f)_i \cdot M(g)_i ](x_{i+1} - x_i) \quad ??? \quad S(f,P) \cdot S(g,P)$$
This is the big problem. Heuristically, integral is about sums and the product of sums are not the sum of products. 
