[proofplan]
We first use the elementary pointwise bound
\begin{align*}
|x| \leq \frac{x^2+1}{2}
\end{align*}
to prove that $|X|$ has finite expectation. Once $\mathbb E[|X|]$ is known to be finite, we can safely expand the non-negative square $(|X|-t)^2$ and use it to obtain a quadratic inequality in $t$. Choosing the optimal value $t=\mathbb E[|X|]$ gives $\mathbb E[|X|]^2 \leq \mathbb E[X^2]$, which is the desired estimate.
[/proofplan]
[step:Use the quadratic pointwise bound to prove integrability]
For every $x \in \mathbb R$,
\begin{align*}
0 \leq (|x|-1)^2 = x^2 - 2|x| + 1,
\end{align*}
and hence
\begin{align*}
|x| \leq \frac{x^2+1}{2}.
\end{align*}
Applying this pointwise inequality to $x=X(\omega)$ for $\omega \in \Omega$ gives
\begin{align*}
|X(\omega)| \leq \frac{X(\omega)^2+1}{2}.
\end{align*}
Since $X^2$ is integrable by hypothesis and $\mathbb P(\Omega)=1$, we obtain
\begin{align*}
\mathbb E[|X|]
= \int_\Omega |X(\omega)|\,d\mathbb P(\omega)
\leq \frac{1}{2}\int_\Omega X(\omega)^2\,d\mathbb P(\omega)
+ \frac{1}{2}\int_\Omega 1\,d\mathbb P(\omega)
= \frac{\mathbb E[X^2]+1}{2}
< \infty.
\end{align*}
Thus $X \in L^1(\Omega,\mathcal F,\mathbb P)$.
[guided]
The first issue is not the sharp inequality, but the basic fact that $\mathbb E[|X|]$ is finite. We cannot manipulate $\mathbb E[|X|]$ as a real number until we have proved this. The elementary estimate we need comes from a non-negative square: for every $x \in \mathbb R$,
\begin{align*}
0 \leq (|x|-1)^2 = x^2 - 2|x| + 1.
\end{align*}
Rearranging this inequality gives
\begin{align*}
|x| \leq \frac{x^2+1}{2}.
\end{align*}
Now substitute $x=X(\omega)$ for each $\omega \in \Omega$. Since $X$ is a real-valued [random variable](/page/Random%20Variable), this gives the pointwise estimate
\begin{align*}
|X(\omega)| \leq \frac{X(\omega)^2+1}{2}.
\end{align*}
The right-hand side is integrable with respect to $\mathbb P$: the term $X^2$ is integrable by the square-integrability hypothesis, and the constant function $1: \Omega \to \mathbb R$ is integrable because $\mathbb P$ is a probability measure and $\mathbb P(\Omega)=1$. Therefore
\begin{align*}
\mathbb E[|X|]
= \int_\Omega |X(\omega)|\,d\mathbb P(\omega)
\leq \frac{1}{2}\int_\Omega X(\omega)^2\,d\mathbb P(\omega)
+ \frac{1}{2}\int_\Omega 1\,d\mathbb P(\omega)
= \frac{\mathbb E[X^2]+1}{2}
< \infty.
\end{align*}
This proves that $X$ is integrable, so $\mathbb E[|X|]$ is now a finite real number.
[/guided]
[/step]
[step:Expand a non-negative square to obtain the sharp estimate]
Define the finite numbers
\begin{align*}
A := \mathbb E[|X|],
\qquad
B := \mathbb E[X^2].
\end{align*}
For each $t \in \mathbb R$, the random variable
\begin{align*}
\Omega &\to \mathbb R \\
\omega &\mapsto (|X(\omega)|-t)^2
\end{align*}
is non-negative. It is also integrable, because the pointwise identity
\begin{align*}
(|X(\omega)|-t)^2 = X(\omega)^2 - 2t|X(\omega)| + t^2
\end{align*}
expresses it as a linear combination of the integrable random variables $X^2$, $|X|$, and the constant function $1: \Omega \to \mathbb R$. Therefore its expectation is non-negative. Expanding the square and using the finiteness of $A$ and $B$ gives
\begin{align*}
0
\leq \int_\Omega (|X(\omega)|-t)^2\,d\mathbb P(\omega)
= B - 2tA + t^2.
\end{align*}
Taking $t=A$ yields
\begin{align*}
0 \leq B - A^2.
\end{align*}
Thus
\begin{align*}
\mathbb E[|X|]^2 \leq \mathbb E[X^2].
\end{align*}
Since $\mathbb E[|X|]\geq 0$ and $\mathbb E[X^2]\geq 0$, taking square roots gives
\begin{align*}
\mathbb E[|X|] \leq \sqrt{\mathbb E[X^2]}.
\end{align*}
This proves the claimed inequality.
[/step]