【证明】K倍角公式

今天考试有一道题居然需要用倍角公式的递推形式来帮助化简递推式从而构造矩阵进行快速幂。于是我就闲的蛋疼来yy一发证明。

前置技能:

Taylor展开(欧拉公式),组合数,二项式定理

倍角公式:

对于 ∀ K ∈ N ∗ , x ∈ R \forall K\in \mathbb{N_*},x\in \mathbb{R} KN,xR,如下公式总是成立: sin ⁡ ( K ∗ x ) = sin ⁡ ( x ) cos ⁡ ( ( K − 1 ) ∗ x ) + cos ⁡ ( x ) sin ⁡ ( ( K − 1 ) ∗ x ) \sin(K*x)=\sin(x)\cos((K-1)*x)+\cos(x)\sin((K-1)*x) sin(Kx)=sin(x)cos((K1)x)+cos(x)sin((K1)x) cos ⁡ ( K ∗ x ) = cos ⁡ ( x ) cos ⁡ ( ( K − 1 ) ∗ x ) − sin ⁡ ( x ) sin ⁡ ( ( K − 1 ) ∗ x ) \cos(K*x)=\cos(x)\cos((K-1)*x)-\sin(x)\sin((K-1)*x) cos(Kx)=cos(x)cos((K1)x)sin(x)sin((K1)x)

推导:

由于Taylor展开: cos ⁡ ( x ) = ∑ i = 0 ∞ ( − 1 ) i x 2 i ( 2 i ) ! sin ⁡ ( x ) = ∑ i = 0 ∞ ( − 1 ) i x 2 i + 1 ( 2 i + 1 ) ! exp ⁡ ( x ) = ∑ i = 0 ∞ x i i ! \begin{aligned} \cos(x)=&\sum_{i=0}^\infty(-1)^i\frac{x^{2i}}{(2i)!}\\ \sin(x)=&\sum_{i=0}^\infty(-1)^i\frac{x^{2i+1}}{(2i+1)!}\\ \exp(x)=&\sum_{i=0}^\infty\frac{x^{i}}{i!} \end{aligned} cos(x)=sin(x)=exp(x)=i=0(1)i(2i)!x2ii=0(1)i(2i+1)!x2i+1i=0i!xi

我们有欧拉公式 e i θ = exp ⁡ ( i θ ) = cos ⁡ ( θ ) + i sin ⁡ ( θ ) e^{i\theta}=\exp(i\theta)=\cos(\theta)+i\sin(\theta) eiθ=exp(iθ)=cos(θ)+isin(θ)

所以我们得到 cos ⁡ ( n θ ) + i sin ⁡ ( n θ ) = exp ⁡ ( i n θ ) = e i n θ = ( e i θ ) n = ( cos ⁡ ( θ ) + i sin ⁡ ( θ ) ) n \begin{aligned} \cos(n\theta)+i\sin(n\theta)&=\exp(in\theta)\\ &=e^{in\theta}\\ &=(e^{i\theta})^n\\ &=(\cos(\theta)+i\sin(\theta))^n \end{aligned} cos(nθ)+isin(nθ)=exp(inθ)=einθ=(eiθ)n=(cos(θ)+isin(θ))n

考虑 n n n为正整数的时候。
将上面的式子由二项式定理展开得到: cos ⁡ ( n θ ) + i sin ⁡ ( n θ ) = ∑ r = 0 n C n r cos ⁡ n − r ( θ ) ∗ i r sin ⁡ r ( θ ) = ( C n 0 cos ⁡ n ( θ ) + C n 2 cos ⁡ n − 2 ( θ ) sin ⁡ 2 ( θ ) + . . . ) + i ( C n 1 sin ⁡ ( θ ) cos ⁡ n − 1 ( θ ) + C n 3 sin ⁡ 3 ( θ ) cos ⁡ n − 3 ( θ ) + . . . ) \begin{aligned} \cos(n\theta)+i\sin(n\theta)=&\sum_{r=0}^{n}C_n^{r}\cos^{n-r}(\theta)*i^r\sin^r(\theta)\\ =&(C_n^0\cos^n(\theta)+C_n^2\cos^{n-2}(\theta)\sin^2(\theta)+...)\\&+i(C_n^1\sin(\theta)\cos^{n-1}(\theta)+C_n^3\sin^{3}(\theta)\cos^{n-3}(\theta)+...) \end{aligned} cos(nθ)+isin(nθ)==r=0nCnrcosnr(θ)irsinr(θ)(Cn0cosn(θ)+Cn2cosn2(θ)sin2(θ)+...)+i(Cn1sin(θ)cosn1(θ)+Cn3sin3(θ)cosn3(θ)+...)

实部和虚部分别对应一下就能得到: cos ⁡ ( n θ ) = ∑ i = 0 ⌊ n 2 ⌋ ( − 1 ) i C n 2 i cos ⁡ n − 2 i ( θ ) sin ⁡ 2 i ( θ ) sin ⁡ ( n θ ) = ∑ i = 1 ⌊ n − 1 2 ⌋ ( − 1 ) i C n 2 i + 1 cos ⁡ n − 2 i − 1 ( θ ) sin ⁡ 2 i + 1 ( θ ) \begin{aligned} \cos(n\theta)=&\sum_{i=0}^{\lfloor\frac{n}2\rfloor}(-1)^iC_n^{2i}\cos^{n-2i}(\theta)\sin^{2i}(\theta)\\ \sin(n\theta)=&\sum_{i=1}^{\lfloor\frac{n-1}2\rfloor}(-1)^iC_n^{2i+1}\cos^{n-2i-1}(\theta)\sin^{2i+1}(\theta) \end{aligned} cos(nθ)=sin(nθ)=i=02n(1)iCn2icosn2i(θ)sin2i(θ)i=12n1(1)iCn2i+1cosn2i1(θ)sin2i+1(θ)

现在我们得到了 K K K倍角公式的封闭形式

接下来只对正弦的公式进行推导,余弦的公式读者可以类似处理

我们回到原来的式子:
sin ⁡ ( K ∗ x ) = cos ⁡ ( x ) sin ⁡ ( ( K − 1 ) ∗ x ) + sin ⁡ ( x ) cos ⁡ ( ( K − 1 ) ∗ x ) = c o s ( x ) ( ∑ i = 1 ⌊ K − 2 2 ⌋ ( − 1 ) i C K − 1 2 i + 1 cos ⁡ K − 2 i − 2 ( x ) sin ⁡ 2 i + 1 ( x ) ) + sin ⁡ ( x ) ( ∑ i = 0 ⌊ K − 1 2 ⌋ ( − 1 ) i C K − 1 2 i cos ⁡ K − 2 i − 1 ( x ) sin ⁡ 2 i ( x ) ) \begin{aligned} \sin(K*x)=&\cos(x)\sin((K-1)*x)+\sin(x)\cos((K-1)*x)&\\=&cos(x)(\sum_{i=1}^{\lfloor\frac{K-2}2\rfloor}(-1)^iC_{K-1}^{2i+1}\cos^{K-2i-2}(x)\sin^{2i+1}(x))\\+&\sin(x)(\sum_{i=0}^{\lfloor\frac{K-1}2\rfloor}(-1)^iC_{K-1}^{2i}\cos^{K-2i-1}(x)\sin^{2i}(x))\\ \end{aligned} sin(Kx)==+cos(x)sin((K1)x)+sin(x)cos((K1)x)cos(x)(i=12K2(1)iCK12i+1cosK2i2(x)sin2i+1(x))sin(x)(i=02K1(1)iCK12icosK2i1(x)sin2i(x))

接下来暴力将 Σ \Sigma Σ外面的两个函数乘进去: ∑ i = 1 ⌊ K − 2 2 ⌋ ( − 1 ) i C K − 1 2 i + 1 cos ⁡ K − 2 i − 1 ( x ) sin ⁡ 2 i + 1 ( x ) + ∑ i = 0 ⌊ K − 1 2 ⌋ ( − 1 ) i C K − 1 2 i cos ⁡ K − 2 i − 1 ( x ) sin ⁡ 2 i + 1 ( x ) \begin{aligned} &\sum_{i=1}^{\lfloor\frac{K-2}2\rfloor}(-1)^iC_{K-1}^{2i+1}\cos^{K-2i-1}(x)\sin^{2i+1}(x)\\+&\sum_{i=0}^{\lfloor\frac{K-1}2\rfloor}(-1)^iC_{K-1}^{2i}\cos^{K-2i-1}(x)\sin^{2i+1}(x) \end{aligned} +i=12K2(1)iCK12i+1cosK2i1(x)sin2i+1(x)i=02K1(1)iCK12icosK2i1(x)sin2i+1(x)

接下来暴力将 Σ \Sigma Σ部分转成一样的合并同类项直接得到: ∑ i = 0 ⌊ K − 1 2 ⌋ ( − 1 ) i C K 2 i + 1 cos ⁡ K − 2 i − 1 ( x ) s i n 2 i + 1 ( x ) = sin ⁡ ( K ∗ x ) \sum_{i=0}^{\lfloor\frac{K-1}{2}\rfloor}(-1)^iC_{K}^{2i+1}\cos^{K-2i-1}(x)sin^{2i+1}(x)=\sin(K*x) i=02K1(1)iCK2i+1cosK2i1(x)sin2i+1(x)=sin(Kx)

其余三角函数同理可以推导出类似的递推公式,此处不再一一列举,相信读者都有能力自己推导出来。

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值