Help with solving 3 simultaneous sine equations.

100 Views Asked by At

Is it even possible to solve $3$ sine equations with $3$ unknowns? I tried to do so, but i always reach a dead end. For example, i have these $3$ equations that I am stuck on:

$2.3 = \sin(2.93a-b)+c$

$1.91 = \sin(3.55a-b)+c$

$1.99 = \sin(3.93a-b)+c$

I've tried subtracting equation $1$ from equation $2$, and then applying various trig rules. However, I didn't solve much this is what I've tried to do so far

If it is not possible to solve a sine system of equations, why is that so?

2

There are 2 best solutions below

2
On
  • First of all, let us observe that

$$\text{if} \ (a,b,c) \ \text{is a solution, then} \ \begin{cases} (a,b+2p\pi,c)\\(-a,-b+(2q+1)\pi,c)\end{cases} \ \text{are solutions as well} \tag{1}$$

for any $p,q \in \mathbb{Z}$.

  • Second point : variable $c$ can be eliminated by subtraction in this way :

$$\begin{cases}2.3 &=& \sin(2.93a-b)+c\\ 1.91 &=& \sin(3.55a-b)+c\\ 1.99 &=& \sin(3.93a-b)+c\end{cases} \implies \begin{cases}\sin(2.93a-b)-\sin(3.55a-b)-0.39&=&0& (Eq. i)\\ \sin(3.93a-b)-\sin(3.55a-b)-0.08&=&0&(Eq. ii)\end{cases}$$

(a 2-variables problem is much simpler to solve...)

  • Third point : we are in a case where (numerical) Newton-Raphson method can be fruitfully applied. You will find a description of this method in an answer of mine to a recent question here. Using it (see Matlab program below), I have found what I would call a fundamental solution

$$(a,b,c)\approx(1.333855072239,0.116009111999,2.905658851511)\tag{2}$$

with an infinity of other "cousin" solutions deduced from this one through one of the two transformations given in (1).

Here is a graphical representation of the very intricated curves defined by equations (Eq. i) and (Eq. ii) in the plane with coordinates $(a,b)$. Intersections of red and blue curves give the roots (some of them, all "cousins" of solution given by (2), have been materialized).

enter image description here

One can guess on this graphical representations other solutions, for example this one :

$$(a,b,c)\approx(5.963166188745,4.979302298302,2.37352956047)\tag{3}$$

Matlab program :

h=0.000001; % small increment
format long;
fa=@(a,b)(sin(2.93*a-b)-sin(3.55*a-b)-0.39); % difference between 1st and 2nd equation
fb=@(a,b)(sin(3.93*a-b)-sin(3.55*a-b)-0.08); % same thing with 2nd and third.
V=rand(2,1); % random initialization
for k=1:20
   a=V(1);b=V(2);
   J1=[fa(a,b),fa(a,b)
       fb(a,b),fb(a,b)];
   J2=[fa(a+h,b),fa(a,b+h)
       fb(a+h,b),fb(a,b+h)];
   J=(J2-J1)/h; % approx. Jacobian
   V=V-inv(J)*[fa(a,b),fb(a,b)]', % Newton-Raphson step
end;
[fa(a,b),fb(a,b)], % sanity check : should be very close to [0,0]
[2.3-sin(2.93*a-b),1.91-sin(3.55*a-b),1.99-sin(3.93*a-b)],  % values of c
2
On

It bothers me that there is no coefficient multiplying the $\sin()$ terms. In terms of curve fitting, you need those factors.

I will demonstrate in solving a related equation for three points $(x_i,y_i)$ and $i=1\ldots3$

$$ y_i = c + r \sin\left( x_i - b \right) $$

This assumes $a=1$ and then introduces a new coefficient $r$ in front of the $\sin()$ function.

The above equation can be expressed as as system of equations

$$ \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} = \begin{bmatrix} 1 & \sin(x_1) & \cos(x_1) \\ 1 & \sin(x_2) & \cos(x_2) \\ 1 & \sin(x_3) & \cos(x_3) \\ \end{bmatrix} \begin{bmatrix} c \\ r \cos(b) \\ -r \sin(b) \end{bmatrix} $$

as the expansion of the above $y_i = c + r \cos(b) \sin(x_i) - r \sin(b) \cos(x_i)$ is applied to the three points.

The solution for the given points is evaluated using the Vandermode matrix method below:

$$ \begin{bmatrix} c \\ r \cos(b) \\ -r \sin(b) \end{bmatrix} = \begin{bmatrix} 1 & \sin(1.93) & \cos(1.93) \\ 1 & \sin(3.55) & \cos(3.55) \\ 1 & \sin(3.93) & \cos(3.93) \\ \end{bmatrix}^{-1} \begin{bmatrix} 2.3 \\ 1.91 \\ 1.99 \end{bmatrix} = \begin{bmatrix} 2.397740934545856 \\ 0.08185188456904127 \\ 0.4960298267574926 \end{bmatrix} $$

with $$\boxed{c = 2.397740934545856}$$ $$\boxed{r = \sqrt{0.08185188456904127^2 + 0.4960298267574926^2} = 0.5027378243583545}$$ and $$\boxed{b = \tan^{-1}\left( \frac{-0.4960298267574926}{0.08185188456904127} \right) = -1.407256042281151}$$

and graph

chart