TITLE: The 2-norm of the integral vs the integral of the 2-norm
QUESTION [7 upvotes]: I`m currently having some issues with a seemingly innocent problem. I would like to show that
$$\Bigg\|\int_\mathbb{R}\begin{pmatrix}A(x)\\B(x)\end{pmatrix}dx\Bigg\|_2 \leq \int_{\mathbb{R}}\Bigg\|\begin{pmatrix}A(x)\\B(x)\end{pmatrix}\Bigg\|_2dx$$
Where $A(x),B(x) \in L^2(\mathbb{R})$ and the two norm is defined as
$$\Bigg\|\begin{pmatrix}A(x)\\B(x)\end{pmatrix}\Bigg\|_2=\sqrt{|A(x)|^2+|B(x)|^2}$$
I've asked around and people have tended to say "that's very simple" and then spent half an hour staring at it. I've tried plugging stuff in and it seems to hold but I do need a proof. Any help would be much appreciated!
Thanks in advance

REPLY [8 votes]: To give a more general picture, that does not use the special form of the $2$-norm being induced by the scalar product, we will show:

Proposition. Suppose $X$ is a Banach space, $(S,\mathcal A, \mu)$ a measure space, and $f \colon S \to X$ is integrable. Then we have 
  $$ \def\norm#1{\left\|#1\right\|}\norm{\int_S f \, d\mu} \le \int_S \norm {f(s)} \, d\mu(s) $$ 

Proof. We use the definition of the integral. If $f = \sum_i x_i\chi_{A_i}$ is a simple function, where the $A_i$ are disjoint, then $\norm{f(s)} = \sum_i \norm{x_i} \chi_{A_i}(s)$ and hence
\begin{align*}
  \norm{\int_S \sum_{i} x_i \chi_{A_i}d\mu} &= \norm{\sum_i \mu(A_i)x_i}\\
           &\le \sum_i \mu(A_i)\norm{x_i}\\
           &= \int_S \sum_{i}\norm{x_i}\chi_{A_i} d\mu\\
           &= \int_S \norm{f(s)}\, d\mu(s)
\end{align*}
If $f$ is integrable, choose simple functions $f_n$ such that $f_n \to f$ almost everywhere and $\lim_n\int_S f \, d\mu = \int_S f_n \, d\mu$ we have
\begin{align*}
  \norm{\int_S f\, d\mu} &= \lim_n \norm{\int_S f_n\, d\mu}\\
                         &\le \lim_n \int_S \norm{f_n(s)}\, d\mu(s)\\
                         &= \int_S \norm{f(s)}\, d\mu(s)
\end{align*}