[Math] How to solve the following simultaneous trig equations

systems of equationstrigonometry

Equation 1
$X$ = $a_1\sin(\theta_1) + a_2\cos(\theta_2)$

Equation 2
$Y$ = $a_1\cos(\theta_1) + a_2\sin(\theta_2)$

where $X, Y, a_1,a_2$ are known.

WHAT I HAVE DONE SO FAR

Let
$sin(\theta_1) = u_1$
$cos(\theta_1) = v_1$
$sin(\theta_2) = u_2$
$cos(\theta_2) = v_2$

And hence according to trig identities,
$u_1^2 + v_1^2 = 1$ (3)

$u_2^2 + v_2^2 = 1$ (4)

substituting (3) and (4) in the original equations, I obtained,
$a_2^2v_2^2 + a_1^2v_1^2 – 2Xa_2v_2 = a_1^2 – X^2$ (Equation 5)

$a_1^2v_1^2 + a_2^2v_2^2 – 2Ya_1v_1 = a_2^2 – Y^2$ (Equation 6)

$a_1^2u_1^2 + a_2^2u_2^2 – 2Xa_1u_1 = a_2^2 – X^2$ (Equation 7)

$a_1^2u_1^2 + a_2^2u_2^2 – 2Ya_2u_2 = a_2^2 – Y^2$ (Equation 8)

How do I proceed from here?
These systems of 4 non-linear equation. Is developing an analytical solution possible? Or should try to find a numerical solution using some libraries?

Thanks,
Vino

Best Answer

If you rename the trigonometric expressions wth something like $\sin(\theta_1)=u_1$, $\sin(\theta_2)=u_2$, $\cos(\theta_1)=v_1$, $\cos(\theta_2)=v_2$, and impose the additional identities $u_1^2+v_1^2=1$, $u_2^2+v_2^2=1$, then you have a system of 4 equations and 4 unknowns that you can solve.

Related Question