# Thread: Linear equation system

1. ## Linear equation system

So... I've got the above linear equation system. I need to find alpha1 and alpha2, the rest is assumed as known. I was thinking of solving it by solving first equation for sina1 which equals to (x1-x2-d2*cosa2) / d1 and then substitute it into the second equation, but in order to do that I have to change it to cosa1. Looked through all the trigonometric identities, just can't find the solution... Any thoughts?

Thanks!!!

2. Hello, crapmathematician!

Too many subscripts . . . I'll simplify slightly.

But then, I haven't finished the problem either . . .

$\begin{array}{cccccc}
x_1 - d_1\sin\alpha &=& x_2 + d_2\cos\beta & [1] \\
y_1 - d_1\cos\alpha &=& y_2 + d_2\sin\beta & [2] \end{array}$

Solve for $\alpha\text{ and }\beta.$
$\begin{array}{ccccccc}
\text{[1] becomes:} & d_1\sin\alpha + d_2\cos\beta & =& x_1-x_2 & [3] \\ \\[-3mm]
\text{[2] becomes:} & d_1\cos\alpha + d_2\sin\beta &=& y_1-y_2 & [4] \end{array}$

$\begin{array}{ccccccc}
\text{Square [3]:} & d_1^2\sin^2\!\alpha + 2d_1d_2\sin\alpha\cos\beta + d_2^2\cos^2\!\beta &=& (x_1-x_2)^2 \\ \\[-3mm]
\text{Square [4]:} & d_1^2\cos^2\!\alpha + 2d_1d_2\sin\beta\cos\alpha + d_2^1\sin^2\!\beta &=& (y_1-y_2)^2 \end{array}$

$\text{Add: }\;d_1^2\underbrace{(\sin^2\!\alpha + \cos^2\!\alpha)}_{\text{This is 1}} + 2d_1d_2\underbrace{(\sin\alpha\cos\beta + \sin\beta\cos\alpha)}_{\text{This is }\sin(\alpha+\beta)} +$ . $d_2^2\underbrace{(\sin^2\!\beta + \cos^2\!\beta)}_{\text{This is 1}} \;=\;(x_1-x_2)^2 + (y_1-y_2)^2$

We have: . $d_1^2 + 2d_1d_2\sin(\alpha+\beta) + d_2^2 \;=\;(x_1-x_2)^2 + (y_1 - y_2)^2$

Hence: . $\sin(\alpha + \beta) \;=\;\frac{(x_1-x_2)^2 + (y_1-y_2)^2 - (d_1^2 + d_2^1)}{2d_1d_2}$

Multiply [3] times [4]:

. . $d_1^2\sin\alpha\cos\alpha \;+\; d_1d_2\sin\alpha\sin\beta \;+\; d_1d_2\cos\alpha\cos\beta \;+\; d_2^2\sin\beta\cos\beta \;=\;(x_1-x_2)(y_1-y_2)$

. . $d_1d_2\underbrace{(\cos\alpha\cos\beta \;+\; \sin\alpha\sin\beta)}_{\text{This is }\cos(\alpha - \beta)} \;+\; \underbrace{d_1^2\sin\alpha\cos\alpha \;+\; d_2^2\sin\beta\cos\beta}_{\text{But these don't combine!}} \;=\;(x_1-x_2)(y_1-y_2)$

So I've hit a wall . . .

The best I can do is:

. . $d_1d_2\cos(\alpha - \beta) + \tfrac{1}{2}\left(d_1\sin2\alpha + d_2\sin2\beta\right) \;=\;(x_1-x_2)(y_1-y_2)$

Any ideas?

3. OK... I have tried to substitute
$
sin\alpha_1 = \tfrac {x_1-x_2-d_2\cos\alpha_2}{d_1}
$

(which I got from equation 1 when extracting for $sin\alpha_1$) into equation 2 by using a formula Sin(arccos x)=Cos(arcsinx)=sqrt(1-x^2). Thus I have put $1- (\tfrac {x_1-x_2-d_2\cos\alpha_2}{d_1})^2$ into equation 2, though after solving I get something that is as huge as:

$
y_1^2 - d_1 (d_1 - x_1^2 + x_2^2 + d_2^2\cos^2\alpha_2 - 2x_2x_1 - 2x_1d_2\cos\alpha_2 + 2x_2d_2\cos\alpha_2) = y_2^2 + d_2^2\sin^2\alpha_2
$

and it does not solve anywhere further as there are two unknowns... PEOPLE, PLEASE HELP!!!!!