<s>[INST] Can you show that the LHS equals the RHS in this equation, by showing how I can get the expression on the RHS? $$
\frac{1^2+2^2+...+(n-1)^2}{n^3} = \frac{(n-1)n(2n-1)}{6n^3}
$$
Can someone show me step by step how I can transform the LHS to the RHS? If possible, using high school-level math.
I have now edited the title, because I didn't formulate myself right. I would like to know how I can derive the expression on the RHS, without knowing it.
 [/INST] Consider the geometric progression
$$
\sum_{k=1}^{n-1} x^k=\frac{x^{n}-x}{x-1}.\tag1
$$
Differentiating $(1)$ with respect to $x$ yields
$$
\sum_{k=1}^{n-1} kx^{k-1}=\frac{(n-1)x^{n}-nx^{n-1}+1}{(x-1)^2}.\tag2
$$
Multiplying $(2)$ by $x$ yields
$$
\sum_{k=1}^{n-1} kx^{k}=\frac{(n-1)x^{n+1}-nx^{n}+x}{(x-1)^2}.\tag3
$$
Differentiating $(3)$ with respect to $x$ yields
$$
\sum_{k=1}^{n-1} k^2x^{k-1}=\frac{(-2n^2+2n+1)x^{n}+n^2x^{n-1}+(n-1)^2x^{n+1}-x-1}{(x-1)^3}.\tag4
$$
Setting $x=1$ to $(4)$ and evaluating the RHS at $x\to1$ by L'Hospital's rule yields
\begin{align}
\sum_{k=1}^{n-1} k^2&=\lim_{x\to1}\frac{(-2n^2+2n+1)x^{n}+n^2x^{n-1}+(n-1)^2x^{n+1}-x-1}{(x-1)^3}\\
&=\large\color{darkgreen}{\frac{n(n-1)(2n-1)}{6}}.\tag5
\end{align}
Hence, using $(5)$ we obtain
$$
\large\frac{1}{n^3}\sum_{k=1}^{n-1} k^2=\color{blue}{\frac{1^2+2^2+\cdots+(n-1)^2}{n^3}=\frac{n(n-1)(2n-1)}{6n^3}}.
$$
</s>