# Thread: problem in solving equation..

1. hi all,

x=L1cos q1+L2 cos(q1+ q2);
y=L1sin q1+L2 sin(q1+q2);

x,y and L1 L2 values are know..
how to find q1 and q2...

In other words, From the given diagram...
x,y, L1,L2 are known...
how to find q1& q2...

2. Hello, nani!

I have part of the solution.

Those subscripts are messy; I'll modify the problem.

Solve for $p$ and $q.$

. . $\begin{array}{ccc}x &=& L\cos(p) + M\cos(p+q) \\
y &=& L\sin(p) + M\sin(p+q) \end{array}$

$x,y,L,M$ are constants.

Square the equations: . $\begin{array}{ccc}
x^2 &=& L^2\cos^2(p) + 2LM\cos(p)\cos(p+q) + M^2\cos^2(p+q) \\
y^2 &=& L^2\sin^2(p) + 2LM\sin(p)\sin(p+q) + M^2\sin^2(p+q)
\end{array}$

$\text{Add: }\;x^2+y^2 \;=\;L^2\underbrace{\bigg[\sin^2(p) + \cos^2(p)\bigg]}_{\text{This is 1}}$ $+ \;2LM\underbrace{\bigg[\cos(p)\cos(p+q) + \sin(p)\sin(p+q)\bigg]}_{\text{This is }\cos(q)}$ $+ \;M^2\underbrace{\bigg[\sin^2(p+q) + \cos^2(p+q)\bigg]}_{\text{This is 1}}$

We have: . $x^2+y^2 \;=\;L^2 + 2LM\cos(q) + M^2 \qquad\Rightarrow\qquad \cos(q) \;=\;\frac{(x^2+y^2) - (L^2+M^2)}{2LM}$

Therefore: . $q \;=\;\cos^{-1}\left[\frac{(x^2+y^2) - (L^2+M^2)}{2LM}\right]$

3. thanx soroban...

4. pal am unable to get the value of p(using ur solution for q).. help me out with this pls......