Setting up Gauss-Seidel System

Given the equations: $$a \sin (\theta_1) + b \sin (\theta_1 + \theta_2) = c_1$$ $$a \cos (\theta_1) + b \cos (\theta_1 + \theta_2) = c_2$$

How should we go about solving the equations for x1 and x2 using iterative methods such as Gauss- Seidel? The problem I am facing is isolating for $\theta_1$ and $\theta_2$. In most cases I have read, given a set of equations such as:

$$a_1 x_1 + b_1 x_2 = c_1$$ $$a_2 x_1 +b_2 x_2 = c_2$$

I would set up my system of equations as such: $$\left[ \begin{matrix} a_1 & b_1 \\ a_2 & b_2 \\ \end{matrix} \right] \left[ \begin{matrix} x_1\\ x_2 \end{matrix} \right] = \left[ \begin{matrix} c_1\\ c_2 \end{matrix} \right]$$ Assuming the system is diagonally dominant, I would set up my equations of iteration as such: $$x_1^{(k+1)} = \frac{(c_1 - b_1 x_2^{(k)})}{a_1}$$ $$x_2^{(k+1)} = \frac{(c_2 - a_2 x_1^{(k)})}{a_2}$$

However for my original question, I am struggling with setting up the system as I am not sure how to isolate for $\theta_1$ & $\theta_2$ as I did with $x_1$ & $x_2$ in the matrix equation above. Any help is appreciated.

UPDATE: Gauss-Seidel method may not work on a non linear system such as this.

$$a \sin (x) + b \sin (y) = c_1$$

$$a \cos (x) + b \cos (y) = c_2$$

where $x=\theta_1$ and $y=\theta_1+\theta_2$.

Square both equations:

$$a^2 \sin^2 (x) + 2ab\sin (x) \sin (y) +b^2\sin^2(y)= c_1^2$$

$$a^2 \cos^2 (x) + 2ab\cos (x) \cos (y) +b^2\cos^2(y)= c_2^2$$

sum both equations:

$$a^2+2ab\cos(y-x)+b^2=c_1^2+c_2^2\to \cos(y-x)=\frac{(c_1^2+c_2^2)-(a^2+b^2)}{2ab}$$

but $y-x=\theta_2$ so,

$$\theta_2=\arccos\left(\frac{(c_1^2+c_2^2)-(a^2+b^2)}{2ab}\right)$$

Now find $\theta_1$.

• Thanks for the answer, I understand this problem can be solved algebraically but I have to set up the system so that it can be solved iteratively using numerical methods, in this case, Gauss-Seidel. I am having a problem with setting up the matrix equation and the iterative equations for $\theta_1$ and $\theta_2$ Jun 18, 2017 at 21:25
• @skbrhmn: As far as I know, Gauss works for linear systems which is not the case here. If you really want use it I suggest you solve the system for $a$ and $b$ and then use algebra to get the angles. Jun 18, 2017 at 21:56
• Thanks, you are right. I was hoping that there would be a way to linearize the system and then use Gauss-Seidel. Jun 18, 2017 at 23:32