## 2009年10月30日星期五

### 三角恆等式

I read the following from 船山筆記
cos(x-A) = a
sin(x-B) = b
prove cos2(A-B) ≡ a2 + b2 - 2ab sin(A-B)
Two readers of the blog gave their solutions. One directly expanded cos2(A-B) ≡ cos2((x-B)-(x-A)) using the sum-of-angle formula. The other one cleverly noted that the LHS of the identity does not depend on x. So he/she differentiated the RHS and found that the derivative is indeed zero. Hence RHS is a constant function of x and the identity can be proved by putting x=B.

The two readers and the blogger, though, did not explain how the above trigonometric identity arises. So I did some calculations and found a way to explain the identity in a more natural manner. Here we go:

Replace B by B-π/2. Then the above problem becomes:
Let
cos(A-x) = a,
cos(B-x) = b.
Show that sin2(A-B) ≡ a2 + b2 - 2ab cos(A-B) ............ (#)
One may immediately recognise that the RHS of (#) is the squared magnitude of the difference of two complex numbers:
a2 + b2 - 2ab cos(A-B)
= | aeiB - beiA |2
= | (ei(A-x) - e-i(A-x)) eiB/2 - (ei(B-x) - e-i(B-x)) eiA/2 |2
= | (ei(A+B-x) - ei(-A+B+x) - ei(A+B-x) + ei(A-B+x))/2 |2
= | (-ei(-A+B+x) + ei(A-B+x))/2 |2
= | eix (ei(A-B) -e-i(A-B))/2 |2
= | eix i sin(A-B) |2
= sin2(A-B)
Now one can see why the RHS of (#) is independent of x.

The above result can be used to prove another trigonometric identity in 船山筆記, namely,
sin2 B ≡ cos2 A + cos2(A+B) - 2 cos A cos B cos(A+B).
Proof. Put x=0 and replace B by A+B in (#), we are done.