5. Find the largest real number $C$, such that for any positive integer $n$ and $0=x_{0}<x_{1}<\cdots<x_{n}=1$, the following inequality holds:
$$
\sum_{i=1}^{n} x_{i}^{2}(x_{i}-x_{i-1})>C .
$$
5. First prove: $C \geqslant \frac{1}{3}$.

From $x_{k} \geqslant x_{k-1} \geqslant 0$, we get
$$
\begin{array}{l}
3 \sum_{k=1}^{n} x_{k}^{2}\left(x_{k}-x_{k-1}\right) \\
=\sum_{k=1}^{n}\left(x_{k}^{2}+x_{k}^{2}+x_{k}^{2}\right)\left(x_{k}-x_{k-1}\right) \\
>\sum_{k=1}^{n}\left(x_{k}^{2}+x_{k} x_{k-1}+x_{k-1}^{2}\right)\left(x_{k}-x_{k-1}\right) \\
=\sum_{k=1}^{n}\left(x_{k}^{3}-x_{k-1}^{3}\right)=x_{n}^{3}-x_{0}^{3}=1-0=1 .
\end{array}
$$

Next, prove: If $C>\frac{1}{3}$, then there exists
$$
0=x_{0}<x_{1}<\cdots<x_{n}=1
$$
such that
$$
\sum_{k=1}^{n} x_{k}^{2}\left(x_{k}-x_{k-1}\right)<C .
$$

For example, when $x_{k}=\frac{k}{n}$, $n \geqslant 3$ and $\frac{1}{n}<C-\frac{1}{3}$, we have
$$
\begin{array}{l}
\sum_{k=1}^{n} x_{k}^{2}\left(x_{k}-x_{k-1}\right)=\frac{1}{n^{3}} \sum_{k=1}^{n} k^{2} \\
=\frac{n(n+1)(2 n+1)}{6 n^{3}}=\frac{1}{3}+\frac{1}{2 n}\left(1+\frac{3}{n}\right) \\
<\frac{1}{3}+\frac{1}{n}<C .
\end{array}
$$

Therefore, $C=\frac{1}{3}$.