赞
踩
该方法是求解对称矩阵全部特征值和特征向量的一种方法,它基于以下结论:
①任何实对称矩阵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中的一对非零的非对角元素化成零并且使得非对角元素的平方和减小。反复进行上述过程,使变换后的矩阵的非对角元素的平方和趋于零,从而使该矩阵近似为对角矩阵,得到全部特征值和特征向量。
设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[
易见
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\{
若
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ϕ)=(aii−ajj)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\{\right. ⎩ ⎨ ⎧bik=aikcos(ϕ)+ajksin(ϕ)bjk=−aiksin(ϕ)+ajkcos(ϕ)aki(1)=bkicos(ϕ)+bkjsin(ϕ)akj(1)=−bkisin(ϕ)+bkjcos(ϕ)bik=aikcos(ϕ)+ajksin(ϕ)bjk=−aiksin(ϕ)+ajkcos(ϕ)a(1)ki=bkicos(ϕ)+bkjsin(ϕ)a(1)kj=−bkisin(ϕ)+bkjcos(ϕ)
分别令 k = i , j k=i,j k=i,j,可求得 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\{\right. {aii(1)=biicos(ϕ)+bijsin(ϕ)ajj(1)=−bjisin(ϕ)+bjjcos(ϕ)a(1)ii=biicos(ϕ)+bijsin(ϕ)a(1)jj=−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\{\right. {aii(1)=(aiicos(ϕ)+ajisin(ϕ))⋅cos(ϕ)+(aijcos(ϕ)+ajjsin(ϕ))⋅sin(ϕ)ajj(1)=−(−aiisin(ϕ)+ajicos(ϕ))⋅sin(ϕ)+(−aijsin(ϕ)+ajjcos(ϕ))⋅cos(ϕ)a(1)ii=(aiicos(ϕ)+ajisin(ϕ))⋅cos(ϕ)+(aijcos(ϕ)+ajjsin(ϕ))⋅sin(ϕ)a(1)jj=−(−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\{\right. \tag{1} {aii(1)=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)ajj(1)=aiisin2(ϕ)+ajjcos2(ϕ)−aijsin(2ϕ)(1)a(1)ii=aiicos2(ϕ)+ajjsin2(ϕ)+aijsin(2ϕ)a(1)jj=aiisin2(ϕ)+ajjcos2(ϕ)−aijsin(2ϕ)
基于对称性,有 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)=(ajj−aii)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ϕ)=(aii−ajj)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ϕ)=c⋅cos(2ϕ)c⋅sin(2ϕ) ,可得
{ 2 a i j = c ⋅ s i n ( 2 ϕ ) a i i − a j j = c ⋅ c o s ( 2 ϕ ) \left\{\right. {2aij=c⋅sin(2ϕ)aii−ajj=c⋅cos(2ϕ)2aij=c⋅sin(2ϕ)aii−ajj=c⋅cos(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)=c⋅cos(2ϕ)⋅(0.5⋅sin(2ϕ))−0.5c⋅sin(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\{\right. {bki=vii⋅aik+0=aikbkj=vjj⋅ajk+0=ajkbki=vii⋅aik+0=aikbkj=vjj⋅ajk+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\{\right. \tag{4} {aik(1)=aki(1)=aikcos(ϕ)+ajksin(ϕ)akj(1)=ajk(1)=−akisin(ϕ)+akjcos(ϕ)(4)a(1)ik=a(1)ki=aikcos(ϕ)+ajksin(ϕ)a(1)kj=a(1)jk=−akisin(ϕ)+akjcos(ϕ)
且当 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)=vll⋅akl+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=l(akl(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=l且k,l=i,j∑(akl(1))2+2k=l且k,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=l且k,l=i,j∑akl2+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=l且k,l=i,j∑akl2+2k=l且k,l=i,j∑(aik2+ajk2) =k=l且k,l=i,j∑akl2+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)−2aij2<E(A),非对角元素平方和严格单调递减,由(1)式可知,对角元素平方和单调增加,当然,由旋转特性(旋转后向量长度不变)也可以得到结论。
通过一系列旋转变换将 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)}=max∣al,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(ϕ)=t⋅c
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)=c2⋅ai,i(k)+s2⋅aj,j(k)+2s⋅c⋅ai,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)=s2⋅ai,i(k)+c2⋅aj,j(k)−2s⋅c⋅ai,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)=c⋅ai,l(k)+s⋅aj,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)=−s⋅ai,l(k)+c⋅aj,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=m(al,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ϕ)=1−tan2(ϕ)2tan(ϕ) ∴cot(2ϕ)=2tan(ϕ)1−tan2(ϕ)
.
令 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+2o⋅t−1=0
.
运用二次求根公式 x = − b ± b 2 − 4 a c 2 a x=\frac{-b±\sqrt{b^2 - 4ac}}{2a} x=2a−b±b2−4ac ,当 Δ = b 2 − 4 a c > 0 时 \Delta=b^2 - 4ac>0时 Δ=b2−4ac>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=2−2o±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=−o−∣o+δ∣<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=−o−o2+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=−o−o2+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)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。