A few days ago I wrote about how to systematically solve trig equations. That post was abstract and general. This post will be concrete and specific, looking at the special case of quadratic equations in sines and cosines, i.e. any equation of the form

As outlined earlier, we turn the equation into a system of equations in s and c.

The resultant of

and

as a function of s is

where

## Example 1

Let’s look at a particular example. Suppose we want to solve

Then the possible sine values are the roots of

This equation as four real roots: s = −0.993462, −0.300859, −0.0996236, or 0.966329.

So any solution θ to our original equation must have sine equal to one of these values. Now sine takes on each value twice during each period, so we have a little work left to find the values of θ. Take the last root for example. If we take the arcsine of 0.966329 we get 1.31056, and θ = 1.31056 is not a solution to our equation. But arcsin(y) returns only one possible solution to the equation sin(x) = y. In this case, θ = π − 1.31056 is the solution we’re looking for.

The full set of solutions for 0 ≤ θ < 2π are

In the example above our polynomial in s had four real roots in [−1, 1]. In general we could have roots outside this interval, including complex roots. If we’re looking for solutions with real values of θ then we discard these.

## Example 2

Now suppose we want to solve

Our resultant is

and the roots are 0.119029, 0.987302, and −0.766973 ± 0.319513i.

If we’re only interested in real values of θ then the two solutions are arcsin(0.119029) = 0.119312 and arcsin(0.987302) = 1.41127. But there are two complex solutions, θ = 3.91711 ± 0.433731i.

## One thought on “Solving quadratic trig equations”

1. George Plousos

Hi,

Examples 1 and 2 each contain a quartic equation, whose roots are simply given. Here I solve these two equations using the trigonometric method, as this method fits the topic of the article. The shapes of the geometric interpretation of these solutions are not included but you can see what they look like in the example image I posted in the tweet comments that leads here:

Example 1:
——————-

y^4 + Ay^3 + By^2 + Cy + D = 0     (1)

where

A = (4280/10009), B = (-9200/10009), C = (-3840/10009), D = (-288/10009)

y = – A/4 =>

x^4 + ax^2 +bx + c = 0     (2)

where

a = (-3A^2)/8 + B = -0.987743
b = (A^3)/8 – AB/2 + C = -0.177355
c = (-3A^4)/256 + (BA^2)/16 – AC/4 + D = 0.00134352

Resolved cubic of (2):

z^3 – az^2 – 4cz + 4ac – b^2 = 0 =>
z_1 = 0.179766
z_2= -0.214614
z_3 = -0.952895

R = sqr((b^2)/(4c) – a) = 2.615492

cosω_n = sqr(0.5 + sqr(0.25 – c/(z_n)^2))
sinω_n = sqr(0.5 – sqr(0.25 – c/(z_n)^2))
for n = 1, 2, 3 =>
cosω_1 = 0.978027, sinω_1 = 0.208480     (ω_1 ~ 12.03°)
cosω_2 = 0.984848, sinω_2 = 0.173418     (ω_2 ~ 9.99°)
cosω_3 = 0.999259, sinω_3 = 0.038495     (ω_3 ~ 2.21°)

then the roots of (2) will be

x_1 = +2R sinω_1 sinω_2 sinω_3 = +0.007280
x_2 = +2R sinω_1 cosω_2 cosω_3 = +1.073236
x_3 = -2R cosω_1 sinω_2 cosω_3 = -0.886557
x_4 = -2R cosω_1 cosω_2 sinω_3 = -0.193958

and the required roots of (1) will be

y_1 = x_1 – A/4 = -0.099624
y_2 = x_2 – A/4 = +0.966332
y_3 = x_3 – A/4 = -0.993461
y_4 = x_1 – A/4 = -0.300862

Example 2:
——————-

y^4 + Ay^3 + By^2 + Cy + D = 0     (1)

where

A = (4280/10009), B = (-8900/10009), C = (-5840/10009), D = (812/10009)

y = – A/4 =>

x^4 + ax^2 +bx + c = 0     (2)

where

a = (-3A^2)/8 + B = -0.957770
b = (A^3)/8 – AB/2 + C = -0.383583
c = (-3A^4)/256 + (BA^2)/16 – AC/4 + D = 0.132949

Resolved cubic of (2):

z^3 – az^2 – 4cz + 4ac – b^2 = 0 =>
z_1 = 0.784998
z_2= -0.871384+0.277424i
z_3 = -0.871384-0.277424i

R = sqr((b^2)/(4c) – a) = 1.111057

cosω_n = sqr(0.5 + sqr(0.25 – c/(z_n)^2))
sinω_n = sqr(0.5 – sqr(0.25 – c/(z_n)^2))
for n = 1, 2, 3 =>
cosω_1 = 0.827690, sinω_1 = 0.561185     (ω_1 ~ 34.14°)
cosω_2 = 0.934348-0.066727i, sinω_2 = 0.395364+0.157693i     (ω_2 ~ (0.40+0.17i)°)
cosω_3 = 0.934348+0.066727, sinω_3 = 0.395364-0.157693i     (ω_3 ~ (0.40-0.17)°)

then the roots of (2) will be

x_1 = +2R sinω_1 sinω_2 sinω_3 = +0.225934
x_2 = +2R sinω_1 cosω_2 cosω_3 = +1.094206
x_3 = -2R cosω_1 sinω_2 cosω_3 = -0.660069-0.319512i
x_4 = -2R cosω_1 cosω_2 sinω_3 = -0.660069+0.319512i

and the required roots of (1) will be

y_1 = x_1 – A/4 = +0.119030
y_2 = x_2 – A/4 = +0.987302
y_3 = x_3 – A/4 = -0.766973-0.319512i
y_4 = x_1 – A/4 = -0.766973+0.319512i