we rearrange the standard triple-angle trigonometric identity for sine to make it more clear the cubic polynomial that you need to solve for the one-third angle trigonometric identity.
4*(sin x)^3 - 3*(sin x) + (sin(3x)) = 0
given sin(3x) in the constant term, solve for (sin x) by your favorite root-finding algorithm, for example, Newton's method.
what is a good starting guess for Newton's method? maybe use the first few terms of the Taylor expansion of sine.
although you could use the cubic formula directly to solve the cubic equation, that requires computing the cube root of a complex number. the standard technique for doing that involves sine and cosine of 1/3 of an angle, so that feels like cheating. previously.
similarly for cosine:
4*(cos x)^3 - 3*(cos x) - (cos(3x)) = 0
slightly more explicitly, these therefore are the one-third angle trigonometric identities:
sin(y/3) = RootOf(4*z^3 - 3*z + sin(y) == 0, z)
cos(y/3) = RootOf(4*z^3 - 3*z - cos(y) == 0, z)
here are the half-angle identities written using the same notation:
sin(y/2) = RootOf(2*z^2 - (1-cos(y)) == 0, z)
= +- sqrt((1-cos(y))/2)
cos(y/2) = RootOf(2*z^2 - (1+cos(y)) == 0, z)
= +- sqrt((1+cos(y))/2)
it is very convenient that the triple angle identity for sine is a polynomial in only sines, so requires only solving a single cubic equation. worse would have been having to solve a simultaneous system of two cubic equations in (sin x)^3, (cos x)^3, lower powers, and cross terms.
in general, to derive a polynomial for cos(n*x) in powers of only (cos x), expand de Moivre's formula cos(n*x) + i*sin(n*x) = (cos(x) + i*sin(x))^n and collect real terms. the powers of (sin x) in the real terms will only be even. this is very convenient: substitute the Pythagorean identity (sin^2 = 1 - cos^2) to transform the even powers of (sin x) into (cos x). the resulting polynomials in (cos x) (called Chebyshev polynomials) can be solved for (cos x) by your favorite root-finding method.
for sine, there are two possibilities:
if n is even, we still work with the collected real terms as above. the powers of (cos x) in the real terms will be only even. transform the even powers of (cos x) into (sin x) via the Pythagorean identity to get a polynomial in (sin x) with constant term that involves cos(n*x). (for example, note how the half-angle identity for sin(x/2) involves (cos x).)
if n is odd, collect imaginary terms. the powers of (cos x) will all be even, so convert them to (sin x) by the Pythagorean identity, yielding a polynomial in (sin x) with a constant term involving sin(n*x).
the Pythagorean identity and de Moivre's identity are certainly two of the most wonderful things in mathematics.
No comments:
Post a Comment