1^2+2^2+···+n^2阶梯型面积计算推演

The main purpose is to test the work condition of katex rendering.

(n+1)3=(n2+2n+1)(n+1)=n3+2n2+n+n2+2n+1=n3+3n2+3n+1\begin{aligned} (n+1)^3 &= (n^2+2n+1) \cdot (n+1)\\ &=n^3+2n^2+n+n^2+2n+1\\ &=n^3+3n^2+3n+1 \end{aligned}


(n+1)3n3=3n3+3n+1(2)(n+1)^3-n^3=3n^3+3n+1 \tag{2}


n3(n1)3=n3[(n1)2(n1)]=n3[(n22n+1)(n1)]=n3[n32n2+n(n22n+1)]=n3[n32n2+nn2+2n1]=n3[n33n2+3n1]3(n1)2+3(n1)+1=3n23n+13(n22n+1)+3n2=3n23n+13n26n+3+3n2=3n23n+13n23n+1=3n23n+1\begin{aligned} n^3-(n-1)^3&=n^3-[(n-1)^2(n-1)] \\ &=n^3-[(n^2-2n+1)(n-1)] \\ &=n^3-[n^3-2n^2+n-(n^2-2n+1)] \\ &=n^3-[n^3-2n^2+n-n^2+2n-1] \\ &=n^3-[n^3-3n^2+3n-1] \\ 3(n-1)^2+3(n-1)+1&=3n^2-3n+1 \\ 3(n^2-2n+1)+3n-2&=3n^2-3n+1 \\ 3n^2-6n+3+3n-2&=3n^2-3n+1 \\ 3n^2-3n+1&=3n^2-3n+1 \\ \end{aligned}


n3(n1)3=3n23n+1=3(n1)2+3(n1)+1(3)\begin{aligned} \quad n^3-(n-1)^3&=3n^2-3n+1 \\ &=3(n-1)^2+3(n-1)+1 \end{aligned} \tag{3}


n3(n1)3=3(n1)2+3(n1)+13323=322+32+12313=312+31+1\begin{aligned} n^3-(n-1)^3&=3(n-1)^2+3(n-1)+1 \\ 3^3-2^3&=3\cdot 2^2+3 \cdot 2+1 \\ 2^3-1^3&=3\cdot 1^2+3\cdot1+1 \\ \end{aligned}

n个等式两端分别相加

(n+1)31=3[12+22+32++n2]+3(1+2+3++n)+n(n+1)^3-1=3\cdot\left[ 1^2+2^2+3^2+\cdots+n^2 \right]+3\cdot(1+2+3+\cdots+n)+n

又有

1+2+3++n=(n+1)n21+2+3+\cdots+n=\frac{(n+1)n}{2}

代回可得

(n+1)31=3[12+22+32++n2]+3(n+1)n2+n(n+1)^3-1=3\cdot\left[ 1^2+2^2+3^2+\cdots+n^2 \right]+3\cdot\frac{(n+1)n}{2}+n

整理可得

3[12+22+32++n2]=[(n+1)31][3(n+1)n2+n]=(n+1)33(n+1)n2n1=(n+1)33(n+1)n2(n+1)=(n+1)[(n+1)23n21]=(n+1)[n2+2n+13n21]=(n+1)[n2+2n3n2]=(n+1)n[n+12]\begin{aligned} 3\cdot\left[ 1^2+2^2+3^2+\cdots+n^2 \right]&=\left[(n+1)^3-1\right]-\left[ 3\cdot\frac{(n+1)n}{2}+n \right] \\ &=(n+1)^3-3\cdot\frac{(n+1)n}{2}-n-1 \\ &=(n+1)^3-3\cdot\frac{(n+1)n}{2}-(n+1) \\ &=(n+1)\left[(n+1)^2-\frac{3n}{2}-1\right] \\ &=(n+1)\left[ n^2+2n+1- \frac{3n}{2}-1 \right] \\ &=(n+1)\left[n^2+2n-\frac{3n}{2} \right] \\ &=(n+1)n \left[n+\frac{1}{2}\right] \\ \end{aligned}

[12+22+32++n2]=16(n+1)n(2n+1)=(2n+1)(n+1)n6=(2n+1)(n2+n)6=(2n3+n2+2n2+n)6=2n3+3n2+n6\begin{aligned} \\ \left[ 1^2+2^2+3^2+\cdots+n^2 \right]&=\frac{1}{6} (n+1)n(2n+1) \\ &=\frac{(2n+1)(n+1)n}{6} \\ &=\frac{(2n+1)(n^2+n)}{6} \\ &=\frac{(2n^3+n^2+2n^2+n)}{6} \\ &=\frac{2n^3+3n^2+n}{6} \\ \end{aligned}

自然数平方和累加/梯形图形面积累加:

=n33+n22+n6=n33+n22+n6\begin{aligned} &=\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6} \\ &=\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6} \end{aligned}