Solving the system $\sin\theta\,(A+\cos\phi)=\cos\theta\,(B+\sin\phi)$, $\sin\phi\,(C+\cos\theta)=\cos\phi\,(D+\sin\theta)$

475 Views Asked by At

Is there an easy way to solve the following system of trigonometric equations (that is, to find $\theta$ and $\phi$)? A,B,C, and D are known constants.

$$\sin\theta\,(A+\cos\phi)=\cos\theta\,(B+\sin\phi)$$ $$\sin\phi\,(C+\cos\theta)=\cos\phi\,(D+\sin\theta)$$

All I can think of is to derive $\tan\theta$ in terms of $\phi$ from the first equation, and then plug it into the second equation, but then I'd come up with a complicated equation (although with only one variable). So I am wondering if there is a simpler method to do it. Thanks!

4

There are 4 best solutions below

0
On

I started with an assumption of $ A^2+B^2=C^2+D^2$. Here's what I came up with, $\sin\theta(A+\cos\phi)= \cos\theta(B+\sin\phi) \Rightarrow A\sin\theta-B\cos\theta=-\sin(\theta-\phi) \ldots (1)$

Similarly $C\sin\phi-D\cos\phi = \sin(\theta-\phi) \ldots (2)$.

$\therefore (1)$ & $(2)$ together give $A\sin\theta-B\cos\theta= D\cos\phi-C\sin\phi$ $ \Rightarrow \sin(\theta-\theta_1)=\sin(\phi_1-\phi) \ldots (3)$, where both $\theta_1$ and $\phi_1 $ are known because $A,B,C,D$ are known, namely $\tan\theta_1=\frac{B}{A}$ and $\tan\phi_1=\frac{D}{C}$.

Now the solution of equation $(3)$ gives $\theta-\theta_1=\phi_1-\phi$ (Discarding any general solution). It implies $\theta= \phi_1+\theta_1-\phi \ldots (4)$

Substituting the value of $\theta$ in $(2)$ gives $\sin(\phi-\phi_1)=\sin(\phi_1+\theta_1-2\phi) \Rightarrow \phi=\frac{1}{3}(2\phi_1+\theta_1).$ Value of $\theta$ can be found from $(4)$. Here I did not consider any general solution because ranges of $\theta$ and $\phi$ are not specified.

0
On

One partial answer (really a comment too long for the comment box) in the more general case where $A^2 + B^2 \neq C^2 + D^2$. The system can be recast as \begin{align*} \sin \theta \cos \phi - \cos \theta \sin \phi &= B \cos \theta - A \sin \theta \\ \sin \theta \cos \phi - \cos \theta \sin \phi &= C \sin \phi - D \cos \phi \end{align*} The LHS of both equations is $\sin (\theta - \phi)$, and each RHS can be rewritten with the help of phasor diagrams as \begin{align*} -A \sin \theta + B \cos \theta &= \sqrt{A^2 + B^2} \sin \left(\theta + \frac{\pi}{2} + \arctan \frac{A}{B}\right) \\ C \sin \phi - D \cos \phi &= \sqrt{C^2 + D^2} \sin\left(\phi - \arctan \frac{C}{D}\right) \end{align*} and equating these quantities may least may simplify the task of finding a solution numerically, but I doubt an analytic solution is possible.

12
On

I find it numerically easier to solve this equivalent pairs:

$$\sin(\theta-\phi) = -A \sin(\theta) + B \cos(\theta)$$ $$\sin(\theta-\phi) = C \sin(\phi) - D \sin(\phi) $$

If A,B are constants, convert (-A,B) to angle notation, $r_\theta ∠ γ_\theta $
If C,D are constants, do the same: (C,-D) → $r_\phi ∠ γ_\phi $

Let $x=\theta-\phi, \text{we have } \sin(x) = r_\theta \sin(\theta + γ_\theta) = r_\phi \sin(\phi + γ_\phi)$

$$\theta = \sin^{-1}({ \sin(x) \over r_\theta}) - γ_\theta $$ $$\phi = \sin^{-1}({ \sin(x) \over r_\phi}) - γ_\phi $$ You can guess the gap of angles, x, solve for the 2 angles, and try the new gap.

Example, say A=1, B=4, C=7, D=8

x $= +0.0000, \text{ we get } \theta≈-1.8158, \phi≈0.8520$
x $ = -2.6678, \text{ we get } \theta≈-1.9267, \phi≈0.8090$
x $= -2.7357, \text{ we get } \theta≈-1.9117, \phi≈0.8148$
x $= -2.7265, \text{ we get } \theta≈-1.9137, \phi≈0.8140$
x $= -2.7277, \text{ we get } \theta≈-1.9135, \phi≈0.8141$
x $= -2.7276, \text{ we get } \theta≈-1.9135, \phi≈0.8141$


We can speed up convergence with Newton's method: $$f(x)= \theta-\phi-x= \{\sin^{-1}({ \sin(x) \over r_\theta}) - γ_\theta\} - \{ \sin^{-1}({ \sin(x) \over r_\phi}) - γ_\phi \} - x $$ $$f'(x)=\large \cos(x) \left({1 \over \sqrt{r_\theta^2-\sin(x)^2}} - {1 \over \sqrt{r_\phi^2-\sin(x)^2}}\right) -1 $$

For the same example, iterate with $x = x - \large{f(x) \over f'(x)}$:

+0.0
-3.13285623900302
-2.72899493772358
-2.72760870383572
-2.72760865698240 $ → (\theta,\phi) = (-1.91349280095738, 0.81411585602502)$

0
On

I think that you initial idea is worth to use.

From the first equation $$\theta=\tan ^{-1}\left(\frac{B+\sin (\phi )}{A+\cos (\phi )}\right)$$ which means that we look for the zero of $$f(\phi)=\left(C+\frac{1}{\sqrt{x^2(\phi)+1}}\right) \sin (\phi )-\left(D+\frac{x(\phi)}{\sqrt{x^2(\phi)+1}}\right) \cos (\phi )$$ where $x(\phi)=\frac{B+\sin (\phi )}{A+\cos (\phi )}$

Using $A=1$, $B=4$, $C=7$, $D=8$ as albert chan did and using Newton method, the iterates are $$\left( \begin{array}{cc} n & \phi_n \\ 0 & 0.00000000 \\ 1 & 1.20154495 \\ 2 & 0.87333496 \\ 3 & 0.88478716 \\ 4 & 0.88478758 \end{array} \right)$$ from which $\theta=1.24111220$.

As I wrote in comments, I do not know why our solutions are different.

For sure, the analytical expression of $f'(\phi)$ would be quite messy but using central differences will not make any problem.