Solve the trig system of equations This is a repost, I'm new here and I did a terrible job explaining the question last time.
I'm trying to make an IK system, the rig basicly works in 2d with the bones shown below.
(Rig in Unreal)
The map of the Bones is as such.
^Original on paper
a, b, c, x, & y are known I need to solve for $\alpha$ and $\theta$
The equations I have right now are:
$ x = a\cos(\theta)-b\sin(\frac{\pi}{2}-\alpha+\theta)+c\cos(\theta)$
$y = -(a\sin(\theta)+b\cos(\frac{\pi}{2}-\alpha+\theta)+c\sin(\theta)) $
The equations can be simplified (thanks to Blue)
$d := a + c$
$\phi := \alpha-\theta$
$ x = d\cos\theta-b\cos\phi$
$ y = d\sin\theta+b\sin\phi$
$\alpha = \theta+\phi$
With this method you have to solve for $\phi$ and $\theta$
I have tried a lot of different ways to solve for $\phi$ but all of them end with me getting stuck and or it becomes unequal (making them useless).
Edit: thanks for all the support, I didn't think anyone would answer, but I typed in the equations wrong, I forget the "a"s at the beginning and the - on the y. I guess that's what waking up does. Sorry!
 A: Here is a method.
$x^2 + y^2 = $
$d^2(\cos^2\theta + \sin^2\theta) + b^2(\cos^2\phi + \sin^2\phi) - 2db (\cos\theta\cos\phi - \sin\theta\sin\phi) = $
$ d^2 + b^2 - 2db\cos(\theta + \phi)$
You said that you know $x, y, d$ and $b$. Therefore, $\cos(\theta + \phi) = \frac{d^2 + b^2 - x^2 - y^2}{2db}$ and you can find $\theta + \phi$ by taking the $\arccos$ of both sides.
Now you know the value of $\theta + \phi$, you can do the same trick but subtract $y^2$ instead of add it this time. So
$x^2 - y^2 = d^2 - b^2 - 2db(\cos(\theta - \phi))$ (skipping some of the working because it is the same as before.
This time, you get
$\cos(\theta - \phi) = \frac{d^2 - b^2 - x^2 + y^2}{2db}$ and so you can find $\theta - \phi$ by taking the $\arccos$ of both sides.
Now you know the value of both $\theta + \phi$ and $\theta - \phi$. Let
$A = \theta + \phi$
$B = \theta - \phi$
Then $\theta = \frac{A+B}{2}$ and $\phi = \frac{A-B}{2}$
A: Suggested start too long for a comment.
The third and fourth equations have the form
$$
x = r\cos \sigma + s \sin \tau
$$
$$
y = r\sin \sigma + s \cos \tau
$$
with $x$, $y$, $r$ and $s$ known since computable from known things.
I think you can solve these for the angles $\sigma$ and $\tau$ by squaring each and playing with $\sin^2+\cos^2 = 1$ and  the addition formula for $\sin$.
Then you can use $\sigma$ and $\tau$   to calculate $\alpha$ and $\theta$.
