2
$\begingroup$

In my research, I have a system of trig equations that I would like to invert. I know $\alpha$ and $\beta$ ($\theta$ is a constant) in the following system.

$$\cos \alpha = \cos \theta \cos x + \sin \theta \sin x \cos y$$ $$\tan \beta = \frac{\cos x +\cos \theta \cos \alpha}{\sin \theta \sin x \sin y} $$

I would like to find an inversion in the form: $$\text{trig}(x) =\; ...$$ $$\text{trig}(y) = \;...$$

How can this be done?

$\endgroup$
5
  • $\begingroup$ @JeanMarie Fixed it. $\endgroup$ – Brian.C.Seymour Dec 24 '20 at 22:55
  • $\begingroup$ Use tangent half angle formulas $\endgroup$ – Jean Marie Dec 24 '20 at 22:57
  • $\begingroup$ What is the origin of your issue ? Spherical trigonometry ? $\endgroup$ – Jean Marie Dec 25 '20 at 15:19
  • $\begingroup$ Mathematica finds an expression so hideous it won't even show me all of it. I would suggest trying numerical methods for this. $\endgroup$ – K.defaoite Dec 25 '20 at 15:38
  • 1
    $\begingroup$ @JeanMarie I believe it comes from a problem similar to spherical trigonometry. It’s two coordinate systems for the orientation of a binary emitting gravitational waves. $\endgroup$ – Brian.C.Seymour Dec 25 '20 at 16:57
2
$\begingroup$

$$\cos(\alpha) = \cos (\theta) \cos( x) + \sin (\theta) \sin (x) \cos( y)\tag 1$$ $$\tan (\beta) = \frac{\cos (x) +\cos (\theta) \cos (\alpha)}{\sin (\theta) \sin (x) \sin (y)}\tag 2$$

From $(1)$ $$\cos(y)=\csc (\theta ) \csc (x) (\cos (\alpha )-\cos (\theta ) \cos (x))\tag 3$$ From $(2)$ $$\sin(y)=\cos (\alpha ) \cot (\beta ) \cot (\theta ) \csc (x)+\cot (\beta ) \csc (\theta ) \cot (x)\tag 4$$ Using $\cos^2(y)+\sin^2(y)=1$, we end with $$1=(\cos (\alpha ) \cot (\beta ) \cot (\theta ) \csc (x)+\cot (\beta ) \csc (\theta ) \cot (x))^2+(\cot (\theta ) \cot (x)-\cos (\alpha ) \csc (\theta ) \csc (x))^2$$

Now, using the tangent half-angle substitution $x=2 \tan ^{-1}(t)$, we end with a quadratic in $t^2$ $$a + b t^2+c t^4 =0$$ where $$a=16 \cos (\alpha ) \cos (2 \beta ) \cot (\theta ) \csc (\theta )+4 \sin ^2(\alpha ) \cos (2 \beta )+$$ $$\csc ^2(\theta ) (\cos (2 \alpha ) (\cos (2 \theta )+3)+9)+3 \cot ^2(\theta )-3$$ $$b=-2 \cos (2 (\alpha -\beta ))-2 \cos (2 (\alpha +\beta ))-16 \sin ^2(\alpha ) \csc ^2(\theta )-$$ $$4 \cos (2 \alpha )+4 \cos (2 \beta )-12$$ $$c=-16 \cos (\alpha ) \cos (2 \beta ) \cot (\theta ) \csc (\theta )+4 \sin ^2(\alpha ) \cos (2 \beta )+$$ $$\csc ^2(\theta ) (\cos (2 \alpha ) (\cos (2 \theta )+3)+9)+3 \cot ^2(\theta )-3$$

Applied to the case use by @Jean Marie $\alpha=\theta=\frac\pi 4 $ and $\beta=\tan ^{-1}(2))$, this leads to $$132 t^4-152 t^2+36=0$$ giving the four roots $$t=\pm \frac{1}{\sqrt{3}} \qquad \text{and} \qquad t=\pm \frac{3}{\sqrt{11}} $$ that is to say $$x=\pm \frac \pi 3\approx \pm1.04720 \qquad \text{and} \qquad x=\pm2 \tan ^{-1}\left(\frac{3}{\sqrt{11}}\right)\approx 1.47063$$ and then the corresponding $y$'s using $(3)$ or $(4)$.

$\endgroup$
2
  • $\begingroup$ Excellent solution ! Nice idea to have taken back my example in order to compare solutions. $\endgroup$ – Jean Marie Dec 25 '20 at 15:26
  • $\begingroup$ This is a great solution! Thanks! $\endgroup$ – Brian.C.Seymour Dec 27 '20 at 22:42
2
$\begingroup$

$$\cos \alpha = \cos \theta \cos x + \sin \theta \sin x \cos y$$ $$\tan \beta = \frac{\cos x +\cos \theta \cos \alpha}{\sin \theta \sin x \sin y} $$ you set $\cos x=t;\;\sin x=u;\;\cos y=v;\;\sin y=w$ and get $$\cos \alpha = \cos \theta\, t + \sin \theta\, u v$$ $$\tan \beta = \frac{t +\cos \theta \cos \alpha}{\sin \theta\, u w} $$

add the conditions $$t^2+u^2=1;\;v^2+w^2=1$$

If you send the constant values I can try to solve it for you.

It is too complicated to solve it in general.

$\endgroup$
1
$\begingroup$

Not an answer, just illustrating what I said in my comment:

enter image description here

$\endgroup$
1
$\begingroup$

It's doubtful there are explicit formulas as you write them. Nevertheless, using tangent half angle formulas:

$$\cos x=\dfrac{1-t^2}{1+t^2}, \ \ \sin x = \dfrac{2t}{1+t^2}, \ \ \tan x=\dfrac{2t}{1-t^2}$$

$$\cos y=\dfrac{1-u^2}{1+u^2}, \ \ \sin y = \dfrac{2u}{1+u^2}, \ \ \tan y=\dfrac{2u}{1-u^2}$$

with $t=\tan \tfrac{x}{2} \ \text{and} \ \ u=\tan \tfrac{y}{2}$, you have a method of attack providing solutions in (most) trigonometric equations.

Indeed, with these formulas, the given system:

$$\begin{cases}\cos \alpha & =& \cos \theta \cos x + \sin \theta \sin x \cos y\\ \tan \beta & = & \dfrac{\cos x +\cos \theta \cos \alpha}{\sin \theta \sin x \sin y}\end{cases}$$

becomes, with evident notations:

$$\begin{cases}C_1 & = & C_3 \dfrac{1-t^2}{1+t^2}+S_3\dfrac{2t}{1+t^2} \dfrac{1-u^2}{1+u^2}\\ T_2 & = & \dfrac{\dfrac{1-t^2}{1+t^2} +C_3 C_1}{S_3 \dfrac{2t}{1+t^2} \dfrac{2u}{1+u^2}}\end{cases}$$

In this way, your issue is brought back to the intersection between 2 curves with (in general) 4th degree polynomial equations:

$$\begin{cases}S_3 2t(1-u^2)& = &(1+u^2)(C_1(1+t^2)-C_3(1-t^2)) \ \ \ & (a)\\4T_2S_3tu & = & (1+u^2)((1-t^2)+C_1C_3 (1+t^2)) \ \ \ & (b)\end{cases}\tag{1}$$

which can have at most $4 \times 4 = 16 $ real solutions $(t_k,u_k)$.

Here is a case with 4 solutions (corresponding to case $\alpha=\theta=\pi/4$ and $\beta=$arctan $2$): the curve in blue (resp. in red) has equation (a) (resp. (b)) in (1); ($t$ on abscissas and $u$ on the ordinates) giving, for the indicated root, $t=0.5782=\tan \dfrac{x}{2} \implies x=1.0485 $ radians and the same thing for $u=0.5164 =\tan \dfrac{y}{2} \implies y=0.9534 $ radians.

enter image description here


Edit: An afterthought after having seen the elegant solution by Claude Leibovici.

I didn't notice at first that equations (1) (a) and (b) are separable under the form:

$$\begin{cases}\dfrac{1-u^2}{1+u^2}& = &\dfrac{C_1(1+t^2)-C_3(1-t^2)}{S_3 2t} \ \ \ & (a)\\ \dfrac{2u}{1+u^2} & = & \dfrac{(1-t^2)+C_1C_3 (1+t^2)} {2T_2S_3t}\ \ \ & (b)\end{cases}\tag{2}$$

where we recognize in the two LHS $\cos y$ and $\sin y$ resp. Expressing that $\cos^2 y+\sin^2 y=1$ gives the same kind of fourth degree equation for $t$ as Claude has found...

$\endgroup$
2
  • $\begingroup$ Haha ! What about $\pi/3$ as your solution ? Joyeux Noël $\endgroup$ – Claude Leibovici Dec 25 '20 at 7:47
  • $\begingroup$ Good catch, Claude! Joyeux Noël! $\endgroup$ – Jean Marie Dec 25 '20 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.