当前位置:   article > 正文

雅可比旋转(Jacobi法)求对称矩阵的特征值和特征向量_如何通过雅可比矩阵求矩阵的特征值和特征向量

如何通过雅可比矩阵求矩阵的特征值和特征向量

雅可比方法

该方法是求解对称矩阵全部特征值和特征向量的一种方法,它基于以下结论:
任何实对称矩阵A可以通过正交相似变换成对角型,即存在正交矩阵Q,使得
Q T A Q = d i a g ( λ 1 , λ 2 , … , λ n ) Q^TAQ=diag(λ1,λ2,…,λn) QTAQ=diag(λ1,λ2,,λn)

其中λi(i=1,2,…,n)是A的特征值,Q中各列为相应的特征向量。

在正交相似变换下,矩阵元素的平方和不变。 即设 A = ( a i j ) n × n A=(a_{ij})_{n×n} A=(aij)n×n,Q为正交矩阵,记 B = Q T A Q = ( b i j ) n × n B=Q^TAQ=(b_{ij})_{n×n} B=QTAQ=(bij)n×n, 则
∑ i , j = 1 n a i , j 2 = ∑ i , j = 1 n b i , j 2 ∑_{i,j=1}^n a_{i,j}^2=∑_{i,j=1}^n b_{i,j}^2 i,j=1nai,j2=i,j=1nbi,j2

Jacobi方法的基本思想是通过一次正交变换,将A中的一对非零的非对角元素化成零并且使得非对角元素的平方和减小反复进行上述过程,使变换后的矩阵的非对角元素的平方和趋于零,从而使该矩阵近似为对角矩阵,得到全部特征值和特征向量。

1、矩阵的旋转变换

设A为n阶实对称矩阵,考虑矩阵
V i j ( ϕ ) = [ 1 0 0 0 0 0 c o s ( ϕ ) 0 s i n ( ϕ ) 0 0 0 1 0 0 0 − s i n ( ϕ ) 0 c o s ( ϕ ) 0 0 0 0 0 1 ] V_{ij}(ϕ) =\left[

100000cos(ϕ)0sin(ϕ)0001000sin(ϕ)0cos(ϕ)000001
\right] Vij(ϕ)= 100000cos(ϕ)0sin(ϕ)0001000sin(ϕ)0cos(ϕ)000001
易见 V i j ( ϕ ) V_{ij}(ϕ) Vij(ϕ)是正交矩阵,记 A ( 1 ) = V i j A V i j T = ( a i j ( 1 ) ) A^{(1)}=V_{ij}AV_{ij}^T = (a_{ij}^{(1)}) A(1)=VijAVijT=(aij(1)),可得
{ a i i ( 1 ) = a i i c o s 2 ( ϕ ) + a j j s i n 2 ( ϕ ) + a i j s i n ( 2 ϕ ) a j j ( 1 ) = a i i s i n 2 ( ϕ ) + a j j c o s 2 ( ϕ ) − a i j s i n ( 2 ϕ ) a i k ( 1 ) = a k i ( 1 ) = a i k c o s ( ϕ ) + a j k s i n ( ϕ ) a k j ( 1 ) = a j k ( 1 ) = − a k i s i n ( ϕ ) + a k j c o s ( ϕ ) a k l ( 1 ) = a l k ( 1 ) = a k l a i j ( 1 ) = a j i ( 1 ) = ( a j j − a i i ) s i n ( ϕ ) c o s ( ϕ ) + a i j c o s ( 2 ϕ ) \left\{
aii(1)=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)ajj(1)=aiisin2(ϕ)+ajjcos2(ϕ)aijsin(2ϕ)aik(1)=aki(1)=aikcos(ϕ)+ajksin(ϕ)akj(1)=ajk(1)=akisin(ϕ)+akjcos(ϕ)akl(1)=alk(1)=aklaij(1)=aji(1)=(ajjaii)sin(ϕ)cos(ϕ)+aijcos(2ϕ)
\right.
aii(1)=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)ajj(1)=aiisin2(ϕ)+ajjcos2(ϕ)aijsin(2ϕ)aik(1)=aki(1)=aikcos(ϕ)+ajksin(ϕ)akj(1)=ajk(1)=akisin(ϕ)+akjcos(ϕ)akl(1)=alk(1)=aklaij(1)=aji(1)=(ajjaii)sin(ϕ)cos(ϕ)+aijcos(2ϕ)

a i j ≠ 0 a_{ij}≠0 aij=0,取ϕ使得 t a n ( 2 ϕ ) = 2 a i j ( a i i − a j j ) tan(2ϕ) = \frac{2a_{ij}}{(a_{ii}-a_{jj})} tan(2ϕ)=(aiiajj)2aij,其中 ∣ ϕ ∣ < π 4 |ϕ|<\frac{\pi}{4} ϕ<4π,则有
a i j ( 1 ) = a j i ( 1 ) = 0 a_{ij}^{(1)} = a_{ji}^{(1)} =0 aij(1)=aji(1)=0

推导如下

注意到 B = V i j A B=V_{ij}A B=VijA的第i,j行元素 以及 B V i j T = A BV_{ij}^T = A BVijT=A的第i,j行元素 为
{ b i k = a i k c o s ( ϕ ) + a j k s i n ( ϕ ) b j k = − a i k s i n ( ϕ ) + a j k c o s ( ϕ ) a k i ( 1 ) = b k i c o s ( ϕ ) + b k j s i n ( ϕ ) a k j ( 1 ) = − b k i s i n ( ϕ ) + b k j c o s ( ϕ ) \left\{

bik=aikcos(ϕ)+ajksin(ϕ)bjk=aiksin(ϕ)+ajkcos(ϕ)aki(1)=bkicos(ϕ)+bkjsin(ϕ)akj(1)=bkisin(ϕ)+bkjcos(ϕ)
\right. bik=aikcos(ϕ)+ajksin(ϕ)bjk=aiksin(ϕ)+ajkcos(ϕ)aki(1)=bkicos(ϕ)+bkjsin(ϕ)akj(1)=bkisin(ϕ)+bkjcos(ϕ)

分别令 k = i , j k=i,j k=ij,可求得 a i i ( 1 ) , a i j ( 1 ) , a j j ( 1 ) , a j i ( 1 ) a_{ii}^{(1)},a_{ij}^{(1)},a_{jj}^{(1)},a_{ji}^{(1)} aii(1),aij(1),ajj(1),aji(1),其中有
{ a i i ( 1 ) = b i i c o s ( ϕ ) + b i j s i n ( ϕ ) a j j ( 1 ) = − b j i s i n ( ϕ ) + b j j c o s ( ϕ ) \left\{

aii(1)=biicos(ϕ)+bijsin(ϕ)ajj(1)=bjisin(ϕ)+bjjcos(ϕ)
\right. {aii(1)=biicos(ϕ)+bijsin(ϕ)ajj(1)=bjisin(ϕ)+bjjcos(ϕ)
b b b带入 a ( 1 ) a^{(1)} a(1),
{ a i i ( 1 ) = ( a i i c o s ( ϕ ) + a j i s i n ( ϕ ) ) ⋅ c o s ( ϕ ) + ( a i j c o s ( ϕ ) + a j j s i n ( ϕ ) ) ⋅ s i n ( ϕ ) a j j ( 1 ) = − ( − a i i s i n ( ϕ ) + a j i c o s ( ϕ ) ) ⋅ s i n ( ϕ ) + ( − a i j s i n ( ϕ ) + a j j c o s ( ϕ ) ) ⋅ c o s ( ϕ ) \left\{
aii(1)=(aiicos(ϕ)+ajisin(ϕ))cos(ϕ)+(aijcos(ϕ)+ajjsin(ϕ))sin(ϕ)ajj(1)=(aiisin(ϕ)+ajicos(ϕ))sin(ϕ)+(aijsin(ϕ)+ajjcos(ϕ))cos(ϕ)
\right.
{aii(1)=(aiicos(ϕ)+ajisin(ϕ))cos(ϕ)+(aijcos(ϕ)+ajjsin(ϕ))sin(ϕ)ajj(1)=(aiisin(ϕ)+ajicos(ϕ))sin(ϕ)+(aijsin(ϕ)+ajjcos(ϕ))cos(ϕ)

基于对称矩阵具有 a j i = a i j a_{ji} = a_{ij} aji=aij化简可得
{ a i i ( 1 ) = a i i c o s 2 ( ϕ ) + a j j s i n 2 ( ϕ ) + a i j s i n ( 2 ϕ ) a j j ( 1 ) = a i i s i n 2 ( ϕ ) + a j j c o s 2 ( ϕ ) − a i j s i n ( 2 ϕ ) (1) \left\{
aii(1)=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)ajj(1)=aiisin2(ϕ)+ajjcos2(ϕ)aijsin(2ϕ)
\right. \tag{1}
{aii(1)=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)ajj(1)=aiisin2(ϕ)+ajjcos2(ϕ)aijsin(2ϕ)(1)

基于对称性,有 a i j ( 1 ) = a j i ( 1 ) a_{ij}^{(1)}=a_{ji}^{(1)} aij(1)=aji(1),可求得:
a j i ( 1 ) = a i j ( 1 ) = − b i i s i n ( ϕ ) + b i j c o s ( ϕ ) a_{ji}^{(1)}=a_{ij}^{(1)}=-b_{ii} sin(ϕ)+b_{ij} cos(ϕ) aji(1)=aij(1)=biisin(ϕ)+bijcos(ϕ)
.
b i k b_{ik} bik带入,可得
a j i ( 1 ) = − ( a i i c o s ( ϕ ) + a j i s i n ( ϕ ) ) ⋅ s i n ( ϕ ) + ( a i j c o s ( ϕ ) + a j j s i n ( ϕ ) ) ⋅ c o s ( ϕ ) a_{ji}^{(1)}=-(a_{ii} cos(ϕ)+a_{ji} sin(ϕ))\cdot sin(ϕ)+ (a_{ij} cos(ϕ)+a_{jj} sin(ϕ))\cdot cos(ϕ) aji(1)=(aiicos(ϕ)+ajisin(ϕ))sin(ϕ)+(aijcos(ϕ)+ajjsin(ϕ))cos(ϕ)
.
基于对称矩阵具有 a j i = a i j a_{ji} = a_{ij} aji=aij化简可得
a i j ( 1 ) = a j i ( 1 ) = ( a j j − a i i ) s i n ( ϕ ) c o s ( ϕ ) + a i j c o s ( 2 ϕ ) (2) a_{ij}^{(1)}=a_{ji}^{(1)} =(ajj - aii) sin(ϕ)cos(ϕ)+a_{ij}cos(2ϕ) \tag{2} aij(1)=aji(1)=(ajjaii)sin(ϕ)cos(ϕ)+aijcos(2ϕ)(2)
.
a i j ≠ 0 a_{ij}≠0 aij=0,取ϕ使得 t a n ( 2 ϕ ) = 2 a i j ( a i i − a j j ) tan(2ϕ) = \frac{2a_{ij}}{(a_{ii}-a_{jj})} tan(2ϕ)=(aiiajj)2aij,其中 ∣ 2 ϕ ∣ < π 2 |2ϕ|<\frac{\pi}{2} ∣2ϕ<2π,则
t a n ( 2 ϕ ) = c ⋅ s i n ( 2 ϕ ) c ⋅ c o s ( 2 ϕ ) tan(2ϕ) = \frac{c \cdot sin(2ϕ)}{c \cdot cos(2ϕ)} tan(2ϕ)=ccos(2ϕ)csin(2ϕ) ,可得
{ 2 a i j = c ⋅ s i n ( 2 ϕ ) a i i − a j j = c ⋅ c o s ( 2 ϕ ) \left\{
2aij=csin(2ϕ)aiiajj=ccos(2ϕ)
\right.
{2aij=csin(2ϕ)aiiajj=ccos(2ϕ)

则有 a i j ( 1 ) = a j i ( 1 ) = c ⋅ c o s ( 2 ϕ ) ⋅ ( 0.5 ⋅ s i n ( 2 ϕ ) ) − 0.5 c ⋅ s i n ( 2 ϕ ) c o s ( 2 ϕ ) a_{ij}^{(1)} = a_{ji}^{(1)} =c \cdot cos(2ϕ) \cdot (0.5\cdot sin(2ϕ) )- 0.5c \cdot sin(2ϕ)cos(2ϕ) aij(1)=aji(1)=ccos(2ϕ)(0.5sin(2ϕ))0.5csin(2ϕ)cos(2ϕ),化简可得
a i j ( 1 ) = a j i ( 1 ) = 0 (3) a_{ij}^{(1)} = a_{ji}^{(1)} = 0 \tag{3} aij(1)=aji(1)=0(3)

k ≠ i , j k≠i,j k=i,j时,仅有 v k k = 1 v_{kk}=1 vkk=1,故有
{ b k i = v i i ⋅ a i k + 0 = a i k b k j = v j j ⋅ a j k + 0 = a j k \left\{

bki=viiaik+0=aikbkj=vjjajk+0=ajk
\right. {bki=viiaik+0=aikbkj=vjjajk+0=ajk
b b b带入 a ( 1 ) a^{(1)} a(1),且基于矩阵对称性,可得
{ a i k ( 1 ) = a k i ( 1 ) = a i k c o s ( ϕ ) + a j k s i n ( ϕ ) a k j ( 1 ) = a j k ( 1 ) = − a k i s i n ( ϕ ) + a k j c o s ( ϕ ) (4) \left\{
aik(1)=aki(1)=aikcos(ϕ)+ajksin(ϕ)akj(1)=ajk(1)=akisin(ϕ)+akjcos(ϕ)
\right. \tag{4}
{aik(1)=aki(1)=aikcos(ϕ)+ajksin(ϕ)akj(1)=ajk(1)=akisin(ϕ)+akjcos(ϕ)(4)

且当 l ≠ i , j l≠i,j l=i,j时, V T V^T VT中仅有 v k k = 1 v_{kk}=1 vkk=1,故有 a k l ( 1 ) = v l l ⋅ a k l + 0 a_{kl}^{(1)}= v_{ll} \cdot a_{kl} + 0 akl(1)=vllakl+0 , 可得
a k l ( 1 ) = a l k ( 1 ) = a k l (5) a_{kl}^{(1)}=a_{lk}^{(1)}=a_{kl} \tag{5} akl(1)=alk(1)=akl(5)

A ( 1 ) A^{(1)} A(1)重复上述过程,得到 A ( 2 ) A^{(2)} A(2)…,可以证明输入这种变换不一定使得矩阵中非对角元素中零元素的个数单调增加,但可以保证非对角元素的平方和递减。

以A和 A ( 1 ) A^{(1)} A(1)为例,设 E ( A ) = ∑ k ≠ l a k l 2 E(A)=∑_{k≠l}a_{kl}^2 E(A)=k=lakl2 E ( A ) ( 1 ) = ∑ k ≠ l ( a k l ( 1 ) ) 2 E(A)^{(1)}=∑_{k≠l}(a_{kl}^{(1)})^2 E(A)(1)=k=lakl(1)2,即
.
E ( A ) ( 1 ) = ∑ k ≠ l 且 k , l ≠ i , j ( a k l ( 1 ) ) 2 + 2 ∑ k ≠ l 且 k , l = i , j ( ( a i k ( 1 ) ) 2 + ( a j k ( 1 ) ) 2 ) E(A)^{(1)}=∑_{k≠l 且 k,l ≠ i,j}(a_{kl}^{(1)})^2 + 2∑_{k≠l 且 k,l = i,j}((a_{ik}^{(1)})^2 + (a_{jk}^{(1)})^2) E(A)(1)=k=lk,l=i,jakl(1)2+2k=lk,l=i,j(aik(1)2+ajk(1)2)
由 (5)、(3)二式可得
E ( A ) ( 1 ) = ∑ k ≠ l 且 k , l ≠ i , j a k l 2 + 0 E(A)^{(1)}= ∑_{k≠l 且 k,l ≠ i,j}a_{kl}^2 + 0 E(A)(1)=k=lk,l=i,jakl2+0
E ( A ) E(A) E(A)
E ( A ) = ∑ k ≠ l 且 k , l ≠ i , j a k l 2 + 2 ∑ k ≠ l 且 k , l = i , j ( a i k 2 + a j k 2 )   = ∑ k ≠ l 且 k , l ≠ i , j a k l 2 + 2 a i j 2 E(A)=∑_{k≠l 且 k,l ≠ i,j}a_{kl}^2 + 2∑_{k≠l 且 k,l = i,j}(a_{ik}^2 + a_{jk}^2)\\ \ \\ = ∑_{k≠l 且 k,l ≠ i,j}a_{kl}^2 + 2a_{ij}^2 E(A)=k=lk,l=i,jakl2+2k=lk,l=i,j(aik2+ajk2) =k=lk,l=i,jakl2+2aij2
由于(3)式条件为 a i j ≠ 0 a_{ij}≠0 aij=0,故在上述旋转变换下, E ( A ) ( 1 ) = E ( A ) − 2 a i j 2 < E ( A ) E(A)^{(1)} = E(A) - 2a_{ij}^2 < E(A) E(A)(1)=E(A)2aij2E(A)非对角元素平方和严格单调递减,由(1)式可知,对角元素平方和单调增加,当然,由旋转特性(旋转后向量长度不变)也可以得到结论。

2、Jacobi方法

通过一系列旋转变换将 A A A变成 A ( k + 1 ) A^{(k+1)} A(k+1),求得A的全部特征值和特征向量,该方法被称为Jacobi方法。计算过程如下

①令k=0, A ( k ) = A A^{(k)}=A A(k)=A
②求整数 i , j i,j i,j,使得 { a i , j ( k ) } = m a x ∣ a l , m ( k ) ∣ \{a_{i,j}^{(k)}\}=max |a_{l,m}^{(k)}| {ai,j(k)}=maxal,m(k),其中 l ≠ m l≠m l=m
③计算旋转矩阵
o = c o t ( 2 ϕ ) = ( a i i ( k ) − a j j ( k ) ) 2 a i j ( k ) o = cot(2ϕ) = \frac{(a_{ii}^{(k)}-a_{jj}^{(k)})}{2a_{ij}^{(k)}} o=cot(2ϕ)=2aij(k)(aii(k)ajj(k))
t = t a n ( ϕ ) = s i g n ( o ) ⋅ ( o 2 + 1 − ∣ o ∣ ) t = tan(ϕ) = sign(o) \cdot (\sqrt{o^2+1} - |o|) t=tan(ϕ)=sign(o)(o2+1 o)
c = c o s ( ϕ ) = 1 1 + t 2 c = cos(ϕ) =\frac{1}{\sqrt{1+t^2}} c=cos(ϕ)=1+t2 1
s = s i n ( ϕ ) = t ⋅ c s = sin(ϕ) = t \cdot c s=sin(ϕ)=tc
V ( k ) = V i , j ( ϕ ) V^{(k)} = V_{i,j}(ϕ) V(k)=Vi,j(ϕ)

④计算 A ( k ) A^{(k)} A(k)

a l , m ( k + 1 ) = a m , l ( k + 1 ) = a l m ( k ) a_{l,m}^{(k+1)}=a_{m,l}^{(k+1)} = a_{lm}^{(k)} al,m(k+1)=am,l(k+1)=alm(k),其中 l , m ≠ i , j l,m ≠ i,j l,m=i,j
a i , j ( k + 1 ) = a j , i ( k + 1 ) = 0 a_{i,j}^{(k+1)}=a_{j,i}^{(k+1)} = 0 ai,j(k+1)=aj,i(k+1)=0

a i , i ( k + 1 ) = c 2 ⋅ a i , i ( k ) + s 2 ⋅ a j , j ( k ) + 2 s ⋅ c ⋅ a i , j ( k ) a_{i,i}^{(k+1)}=c^2 \cdot a_{i,i}^{(k)} + s^2 \cdot a_{j,j}^{(k)}+ 2s\cdot c\cdot a_{i,j}^{(k)} ai,i(k+1)=c2ai,i(k)+s2aj,j(k)+2scai,j(k)
a j , j ( k + 1 ) = s 2 ⋅ a i , i ( k ) + c 2 ⋅ a j , j ( k ) − 2 s ⋅ c ⋅ a i , j ( k ) a_{j,j}^{(k+1)}= s^2 \cdot a_{i,i}^{(k)}+c^2 \cdot a_{j,j}^{(k)} - 2s\cdot c\cdot a_{i,j}^{(k)} aj,j(k+1)=s2ai,i(k)+c2aj,j(k)2scai,j(k)

再计算 a i , l ( k + 1 ) 、 a j , l ( k + 1 ) a_{i,l}^{(k+1)}、a_{j,l}^{(k+1)} ai,l(k+1)aj,l(k+1),其中 l ≠ i , j l ≠ i,j l=i,j

a i , l ( k + 1 ) = a l , i ( k + 1 ) = c ⋅ a i , l ( k ) + s ⋅ a j , l ( k ) a_{i,l}^{(k+1)}= a_{l,i}^{(k+1)} = c\cdot a_{i,l}^{(k)}+s\cdot a_{j,l}^{(k)} ai,l(k+1)=al,i(k+1)=cai,l(k)+saj,l(k)
a j , l ( k + 1 ) = a l , j ( k + 1 ) = − s ⋅ a i , l ( k ) + c ⋅ a j , l ( k ) a_{j,l}^{(k+1)}= a_{l,j}^{(k+1)} = -s\cdot a_{i,l}^{(k)}+c\cdot a_{j,l}^{(k)} aj,l(k+1)=al,j(k+1)=sai,l(k)+caj,l(k)

⑤计算 E ( A ) ( k + 1 ) E(A)^{(k+1)} E(A)(k+1)

E ( A ) ( k + 11 ) = ∑ l ≠ m ( a l , m ( k + 1 ) ) 2 E(A)^{(k+11)}=∑_{l≠m}(a_{l,m}^{(k+1)})^2 E(A)(k+11)=l=mal,m(k+1)2

⑥若 E ( A ) ( k + 11 ) < ε E(A)^{(k+11)} < ε E(A)(k+11)<ε,则退出。可得特征值和特征向量

补充一点,在步骤③中,运用三角函数知识可由 c o t ( 2 ϕ ) cot(2ϕ) cot(2ϕ)求得 t a n ( ϕ ) tan(ϕ) tan(ϕ)
c o t ( 2 ϕ ) = 1 t a n ( 2 ϕ )   ∵ t a n ( 2 ϕ ) = 2 t a n ( ϕ ) 1 − t a n 2 ( ϕ )   ∴ c o t ( 2 ϕ ) = 1 − t a n 2 ( ϕ ) 2 t a n ( ϕ ) cot(2ϕ)=\frac{1}{tan (2ϕ)} \\ \ \\ ∵tan(2ϕ)=\frac{2 tan(ϕ)}{1-tan^2(ϕ)}\\ \ \\ ∴cot(2ϕ)=\frac{1-tan^2(ϕ)}{2 tan(ϕ)} cot(2ϕ)=tan(2ϕ)1 tan(2ϕ)=1tan2(ϕ)2tan(ϕ) cot(2ϕ)=2tan(ϕ)1tan2(ϕ)
.
o = c o t ( 2 ϕ ) o=cot(2ϕ) o=cot(2ϕ), t = t a n ( ϕ ) t=tan(ϕ) t=tan(ϕ), 则有 t 2 + 2 o ⋅ t − 1 = 0 t^2 +2 o\cdot t - 1=0 t2+2ot1=0
.
运用二次求根公式 x = − b ± b 2 − 4 a c 2 a x=\frac{-b±\sqrt{b^2 - 4ac}}{2a} x=2ab±b24ac ,当 Δ = b 2 − 4 a c > 0 时 \Delta=b^2 - 4ac>0时 Δ=b24ac>0可得
.
t = − 2 o ± 4 o 2 + 4 2 = − o ± o 2 + 1 t=\frac{-2o ±\sqrt{4o^2 + 4}}{2}=-o ±\sqrt{o^2 + 1} t=22o±4o2+4 =o±o2+1
.
由于 o 2 + 1 > ∣ o ∣ \sqrt{o^2 + 1}>|o| o2+1 >o,故 t = − o ± ∣ o + δ ∣ t=-o ± |o+\delta| t=o±o+δ,在区间 [ − π / 4 , π / 4 ] [-\pi/4,\pi/4] [π/4,π/4]上,

假设 ϕ > 0 ϕ>0 ϕ>0 t = − o − ∣ o + δ ∣ < 0 t=-o - |o+\delta|<0 t=oo+δ<0与其 t a n ( ϕ ) tan(ϕ) tan(ϕ)值矛盾,故取 t = − o + o 2 + 1 t=-o+\sqrt{o^2 + 1} t=o+o2+1

假设 ϕ < 0 ϕ<0 ϕ<0 t = − o + ∣ o + δ ∣ > 0 t=-o + |o+\delta|>0 t=o+o+δ>0与其 t a n ( ϕ ) tan(ϕ) tan(ϕ)值矛盾,故取 t = − o − o 2 + 1 t=-o - \sqrt{o^2 + 1} t=oo2+1

综上,有:
o > 0 o>0 o>0时,取 t = − o + o 2 + 1 t=-o + \sqrt{o^2 + 1} t=o+o2+1 ,等价于 t = − ∣ o ∣ + o 2 + 1 t=-|o| + \sqrt{o^2 + 1} t=o+o2+1
o < 0 o<0 o<0时,取 t = − o − o 2 + 1 t=-o - \sqrt{o^2 + 1} t=oo2+1 ,等价于 t = − ( − ∣ o ∣ ) − o 2 + 1 t=-(-|o|) - \sqrt{o^2 + 1} t=(o)o2+1
设sign为符号函数,则有
t = s i g n ( o ) ⋅ ( − ∣ o ∣ + o 2 + 1 ) t=sign(o)\cdot(-|o| + \sqrt{o^2 + 1}) t=sign(o)(o+o2+1 )
.
.
若ϕ很小,则o就很大,可能导致 o 2 o^2 o2在计算机上溢出,可取极限分析
t = l i m o − > + ∞ o 2 + 1 − o t=lim_{o->+∞} \sqrt{o^2 +1}-o t=limo>+o2+1 o

采用 o 2 + 1 + o \sqrt{o^2+1}+o o2+1 +o进行分子有理化,得到
( o 2 + 1 − o ) ⋅ ( o 2 + 1 + o ) o 2 + 1 + o = 1 o 2 + 1 + o \frac{(\sqrt{o^2 +1}-o)\cdot (\sqrt{o^2 +1}+o)}{\sqrt{o^2 +1}+o}=\frac{1}{\sqrt{o^2 +1}+o} o2+1 +o(o2+1 o)(o2+1 +o)=o2+1 +o1

故当ϕ很小时,有 t a n ( ϕ ) = l i m o − > + ∞ o 2 + 1 − o = 1 2 o tan(ϕ)=lim_{o->+∞} \sqrt{o^2 +1}-o = \frac{1}{2o} tan(ϕ)=limo>+o2+1 o=2o1
.
t a n ( ϕ ) = s i n ( ϕ ) c o s ( ϕ ) tan(ϕ)=\frac{sin(ϕ)}{cos(ϕ)} tan(ϕ)=cos(ϕ)sin(ϕ),可得 s i n ( ϕ ) = t a n ( ϕ ) ⋅ c o s ( ϕ ) sin(ϕ)=tan(ϕ)\cdot cos(ϕ) sin(ϕ)=tan(ϕ)cos(ϕ)
.
1 + t a n 2 ϕ = 1 c o s 2 ϕ 1+tan²ϕ=\frac{1}{cos²ϕ} 1+tan2ϕ=cos2ϕ1三角函数关系,可推得 c o s ( ϕ ) = 1 t a n 2 ( ϕ ) + 1 cos(ϕ)=\frac{1}{\sqrt{tan^2(ϕ)+1}} cos(ϕ)=tan2(ϕ)+1 1

更多参考雅可比矩阵(Jacobi)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/176711
推荐阅读
相关标签
  

闽ICP备14008679号