It has been a while since last time I have tried to solve a trigonometric problem
$x_0 = a\cos(x) + b\cos(x+y-\pi) + c\cos(x+y+z-2\pi)$
$y_0 = a\sin(x) + b\sin(x+y-\pi) + c\sin(x+y+z-2\pi)$
Is it possible to come up with a closed solution?
If you are wondering where this is coming from, I have a theoretical robotic arm which can freely move in a $2$-dimensional space. It is made up of $3$ segments of length $a$, $b$ and $c$. connected to each other. $x$ is the angle between the first segment $a$ and the $x$-axis. $y$ is the angle between the segment $a$ and $b$ and $z$ is the angle between $b$ and $c$.
Given a point in the $2$-dimensional space $(x_0,y_0)$, I want to determine in which way the robotic arm has to be placed in order to have its end in $(x_0,y_0)$. That position can be determinated by the $3$ angles which connect the $3$ parts of the arm. If you also think there is a better approach to the problem, that is welcome as well.
Given that you have two equations in three unknowns, you should expect a one-parameter family of solutions. Note that if you only had the first two segments you could find the position of the joint by drawing a circle of radius $a$ around the origin and a circle of radius $b$ around $(x0,y0)$ There will normally be two intersection points and you can pick either one. Adding another segment gives the degree of freedom.
It gets a little cleaner if you measure $y$ and $z$ from straight-the $\pi$'s go away.
In the two segment case it is probably easier to do the circles: let $(x,y)$ be the joint position. You have $$x^2+y^2=a^2\\(x-x0)^2+(y-y0)^2=b^2\\-2xx0+x0^2-2yy0+y0^2=b^2-a^2\\y=\frac {a^2-b^2-2xx0+x0^2+y0^2}{2y0}$$ Plug the last into the first and you have a quadratic in $x$