积分法推导正整数平方和公式

积分法推导正整数平方和公式

  • 积分法推导正整数平方和公式
    • 思路
    • 推导过程(2020.1.4)
    • 推导过程(2020.1.6)

积分法推导正整数平方和公式

正整数平方和公式:
1 2 + 2 2 + 3 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 \Large 1^2 + 2^2 + 3^2 + \cdots + n^2 = \frac{n(n+1)(2n+1)}{6} 12+22+32++n2=6n(n+1)(2n+1)

思路

我们并不知道如何求 ∑ i = 1 n i 2 \large \sum_{i=1}^{n} i^2 i=1ni2
但是我们知道如何求 ∑ i = 1 n i \large \sum_{i=1}^{n} i i=1ni
受求导法求等差数列乘等比数列前n项和的启发产生了个有意思的思路
可以试图借助 ∫ 2 x d x = x 2 + C \large \int 2x dx = x^2 + C 2xdx=x2+C 来搭建桥梁,求解。

推导过程(2020.1.4)

f ( n ) = 2 n f(n) = 2n f(n)=2n,则
∫ f ( n ) d n = n 2 + C \int f(n) dn = n^2 + C f(n)dn=n2+C
我们现在要求
∑ i = 1 n ∫ f ( i ) d n \sum_{i=1}^{n} \int f(i)dn i=1nf(i)dn
那么可以得出
∑ i = 1 n i 2 = ∑ i = 1 n ( ∫ f ( i ) d n − C ) + n C = ( ∫ ∑ i = 1 n f ( i ) d n ) − n C + n C = ( ∫ 2 ∑ i = 1 n i d n ) − n C + n C = ( ∫ 2 ⋅ ( 1 + n ) n 2 d n ) − n C + n C = ( ∫ ( n 2 + n ) d n ) − n C + n C = n 3 3 + n 2 2 + n C \begin{alignedat}{2} \sum_{i=1}^{n} i^2& = \sum_{i=1}^{n} (\int f(i) dn - C) + nC\\ & = (\int \sum_{i=1}^{n} f(i) dn) - nC + nC\\ & = (\int 2\sum_{i=1}^{n} i dn) - nC + nC\\ & = (\int 2\cdot \frac{(1+n)n}{2} dn) - nC + nC\\ & = (\int (n^2+n) dn) - nC + nC\\ & = \frac{n^3}{3} + \frac{n^2}{2} + nC \end{alignedat} i=1ni2=i=1n(f(i)dnC)+nC=(i=1nf(i)dn)nC+nC=(2i=1nidn)nC+nC=(22(1+n)ndn)nC+nC=((n2+n)dn)nC+nC=3n3+2n2+nC
通分得:
原 式 = 2 n 3 + 3 n 2 + 6 n C 6 = n ( 2 n 2 + 3 n + 6 C ) 6 \begin{alignedat}{2} 原式& = \frac{2n^3 + 3n^2 + 6nC}{6}\\ & = \frac{n(2n^2 + 3n + 6C)}{6}\\ \end{alignedat} =62n3+3n2+6nC=6n(2n2+3n+6C)
我们将 n = 1 n=1 n=1代入,得:
2 + 3 + 6 C 6 = ∑ i = 1 1 i 2 = 1 2 = 1 \frac{2 + 3 + 6C}{6} = \sum_{i=1}^{1} i^2 = 1^2 = 1 62+3+6C=i=11i2=12=1
5 + 6 C = 6 5 + 6C = 6 5+6C=6 ,解得 C = 1 6 C=\frac{1}{6} C=61
所以:
原 式 = n ( 2 n 2 + 3 n + 1 ) 6 \begin{alignedat}{2} 原式& = \frac{n(2n^2 + 3n + 1)}{6}\\ \end{alignedat} =6n(2n2+3n+1)
因式分解得:
原 式 = n ( n + 1 ) ( 2 n + 1 ) 6 \begin{alignedat}{2} 原式& = \frac{n(n+1)(2n + 1)}{6} \end{alignedat} =6n(n+1)(2n+1)

1 2 + 2 2 + 3 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 \Large 1^2 + 2^2 + 3^2 + \cdots + n^2 = \frac{n(n+1)(2n+1)}{6} 12+22+32++n2=6n(n+1)(2n+1)
得解。

推导过程(2020.1.6)

我们首先来证明一个结论,由本人独立发现(要是有专业的结论的话也请大佬告诉我结论的名字)

设有一函数 f ( x ) f(x) f(x) f ( x ) = F ( x ) + C f(x) = F(x) + C f(x)=F(x)+C ,其中 F ( x ) F(x) F(x) 不含常数项,即 ∫ F ′ ( x ) d x = F ( x ) \int F'(x) dx = F(x) F(x)dx=F(x)
∑ i = 1 n [ ∫ F ′ ( x ) d x ∣ x = i + C ] = ∫ ∑ i = 1 n F ′ ( i ) d n + n C \Large \sum_{i=1}^{n} \Bigg[ \int F'(x)dx \Bigg|_{x=i} +C \Bigg] = \int \sum_{i=1}^{n} F'(i) dn + nC i=1n[F(x)dxx=i+C]=i=1nF(i)dn+nC
由于积分是求导的逆运算,我们可以证明对应的求导结论:
∑ i = 1 n d d x f ( x ) ∣ x = i = d d n ∑ i = 1 n f ( i ) \Large \sum_{i=1}^{n} \frac{d}{dx} f(x) \Bigg|_{x=i} = \frac{d}{dn} \sum_{i=1}^{n} f(i) i=1ndxdf(x)x=i=dndi=1nf(i)
证明过程如下:
我 们 可 以 设 : S ( n ) = ∑ i = 1 n f ( x ) \small 我们可以设 : \quad \large S(n) = \sum_{i=1}^{n}f(x) \quad :S(n)=i=1nf(x)
则 待 证 等 式 等 价 于 : ∑ i = 1 n d d x f ( x ) ∣ x = i = d d n S ( n ) \small 则待证等式等价于: \large \sum_{i=1}^{n} \frac{d}{dx} f(x) \Bigg|_{x=i} = \frac{d}{dn} S(n) :i=1ndxdf(x)x=i=dndS(n)
由函数 S ( n ) S(n) S(n)得定义可得:
f ( i ) = { S ( i ) i = 1 S ( i ) − S ( i − 1 ) i > 1 \large f(i) = \begin{cases} S(i) & i = 1\\ S(i) - S(i-1) & i>1 \end{cases} f(i)=S(i)S(i)S(i1)i=1i>1
所以我们根据导数定义将左边展开可以得到:
原 式 = ∑ i = 1 n [ lim ⁡ Δ x → 0 f ( i + Δ x ) − f ( i ) Δ x ] = lim ⁡ Δ x → 0 f ( 1 + Δ x ) − f ( 1 ) Δ x + ∑ i = 2 n { lim ⁡ Δ x → 0 [ S ( i + Δ x ) − S ( i − 1 + Δ x ) ] − [ S ( i ) − S ( i − 1 ) ] Δ x } = lim ⁡ Δ x → 0 f ( 1 + Δ x ) − f ( 1 ) Δ x + ∑ i = 2 n { lim ⁡ Δ x → 0 [ S ( i + Δ x ) − S ( i ) ] − [ S ( i − 1 + Δ x ) − S ( i − 1 ) ] Δ x } = lim ⁡ Δ x → 0 { [ S ( 1 + Δ x ) + f ( 1 ) ] } + { [ S ( 2 + Δ x ) + f ( 2 ) ] − [ S ( 1 + Δ x ) + f ( 1 ) ] } + ⋯ + { [ S ( n + Δ x ) + f ( n ) ] − [ S ( n − 1 + Δ x ) + f ( n − 1 ) ] } Δ x = lim ⁡ Δ x → 0 S ( n + Δ x ) − S ( n ) Δ x = d d n S ( n ) \begin{alignedat}{2} \small 原式= & \sum_{i=1}^{n} \Bigg[ \lim_{\Delta x \to 0} \frac{f(i+\Delta x)-f(i)}{\Delta x} \Bigg]\\ = & \lim_{\Delta x \to 0} \frac{f(1+\Delta x)-f(1)}{\Delta x} +\\ &\sum_{i=2}^{n} \Bigg\{ \lim_{\Delta x \to 0} \frac{ \Big[ S(i + \Delta x) - S(i-1 + \Delta x) \Big] - \Big[ S(i) - S(i-1) \Big] }{\Delta x} \Bigg\}\\ = & \lim_{\Delta x \to 0} \frac{f(1+\Delta x)-f(1)}{\Delta x} + \sum_{i=2}^{n} \Bigg\{ \lim_{\Delta x \to 0} \frac{ \Big[ S(i + \Delta x) - S(i) \Big] - \Big[ S(i-1 + \Delta x) - S(i-1) \Big] }{\Delta x} \Bigg\}\\ = & \lim_{\Delta x \to 0} \frac{ \Bigg\{\Big[ S(1+ \Delta x) + f(1) \Big]\Bigg\} +\Bigg\{\Big[ S(2+ \Delta x) + f(2) \Big] - \Big[ S(1+ \Delta x) + f(1) \Big]\Bigg\} + \cdots + \Bigg\{\Big[ S(n+ \Delta x) + f(n) \Big] - \Big[ S(n-1+ \Delta x) + f(n-1) \Big]\Bigg\} }{\Delta x}\\ = & \lim_{\Delta x \to 0} \frac{ S(n + \Delta x) - S(n) }{\Delta x}\\ = & \frac{d}{dn}S(n) \end{alignedat} ======i=1n[Δx0limΔxf(i+Δx)f(i)]Δx0limΔxf(1+Δx)f(1)+i=2n{ Δx0limΔx[S(i+Δx)S(i1+Δx)][S(i)S(i1)]}Δx0limΔxf(1+Δx)f(1)+i=2n{ Δx0limΔx[S(i+Δx)S(i)][S(i1+Δx)S(i1)]}Δx0limΔx{ [S(1+Δx)+f(1)]}+{ [S(2+Δx)+f(2)][S(1+Δx)+f(1)]}++{ [S(n+Δx)+f(n)][S(n1+Δx)+f(n1)]}Δx0limΔxS(n+Δx)S(n)dndS(n)
由此,我们证明了结论。


F ( x ) = x 2 F(x) = x^2 F(x)=x2 F ′ ( x ) = 2 x F'(x) = 2x F(x)=2x
∑ i = 1 n i 2 = ∑ i = 1 n ( ∫ F ′ ( x ) d x ∣ x = i + C ) = ∫ ∑ i = 1 n F ′ ( i ) d n + n C = ∫ 2 ∑ i = 1 n i d n + n C = ∫ 2 ⋅ ( 1 + n ) n 2 d n + n C = ∫ ( n 2 + n ) d n + n C = n 3 3 + n 2 2 + n C = 2 n 3 + 3 n 2 + 6 n C 6 = n ( 2 n 2 + 3 n + 6 C ) 6 \begin{alignedat}{2} \sum_{i=1}^{n} i^2 & = \sum_{i=1}^{n} (\int F'(x) dx\Bigg|_{x=i} + C)\\ & = \int \sum_{i=1}^{n} F'(i) dn + nC\\ & = \int 2\sum_{i=1}^{n} i dn + nC\\ & = \int 2\cdot \frac{(1+n)n}{2} dn + nC\\ & = \int (n^2+n) dn + nC\\ & = \frac{n^3}{3} + \frac{n^2}{2} + nC\\ & = \frac{2n^3 + 3n^2 + 6nC}{6}\\ & = \frac{n(2n^2 + 3n + 6C)}{6}\\ \end{alignedat} i=1ni2=i=1n(F(x)dxx=i+C)=i=1nF(i)dn+nC=2i=1nidn+nC=22(1+n)ndn+nC=(n2+n)dn+nC=3n3+2n2+nC=62n3+3n2+6nC=6n(2n2+3n+6C)
n = 1 n=1 n=1 代入
∑ i = 1 n i 2 = n ( 2 n 2 + 3 n + 6 C ) 6    1 = n ( 2 + 3 + 6 C ) 6 \sum_{i=1}^{n} i^2 = \frac{n(2n^2 + 3n + 6C)}{6}\\ \ \ 1 = \frac{n(2 + 3 + 6C)}{6} i=1ni2=6n(2n2+3n+6C)  1=6n(2+3+6C)
解得 C = 1 6 C = \frac{1}{6} C=61 , 可检验 n n n 取其他值时亦有 C = 1 6 C = \frac{1}{6} C=61
故:
∑ i = 1 n i 2 = n ( 2 n 2 + 3 n + 6 C ) 6 = n ( 2 n 2 + 3 n + 1 ) 6 \large \sum_{i=1}^{n} i^2 = \frac{n(2n^2 + 3n + 6C)}{6}= \frac{n(2n^2 + 3n + 1)}{6} i=1ni2=6n(2n2+3n+6C)=6n(2n2+3n+1)
因式分解得:
∑ i = 1 n i 2 = n ( n + 1 ) ( 2 n + 1 ) 6 \Large \sum_{i=1}^{n} i^2 = \frac{n(n + 1)(2n + 1)}{6} i=1ni2=6n(n+1)(2n+1)
得解。

2020.1.4 16:53
一些表达和数学符号的运用可能不准确,过程也许也不够严谨,但是受求导法求等差数列乘等比数列的前n项和的方法的启发,产生了这么个思路,在这里分享一下。
(敷衍地码完字滚回去继续复习明天的政治会考)
欢迎大佬指正问题,找时间完善内容。

2020.1.6 23:40
花了两天的时间来完善思路,闲暇时间里就在思考,终于得到一个比较严谨的证明过程。
之后有什么想法继续补充

你可能感兴趣的:(数学)