System of equations always produces approximately the same value? I'm trying to solve a localization problem. That is, given the coordinates of three parties ($P_1$, $P_2$, and $P_3$), the time at which each party "saw" some signal ($t_1$, $t_2$, and $t_3$), and the velocity of that signal ($s$), I want to determine the coordinates ($[x,y]$) of the source. Here, we can assume that the three parties and the source are coplanar.
I believe this to be representable as a non-linear system of 3 equations in 2 unknowns. That is:

I then perform some manipulation and set these equations equal to zero. Using those equations, I utilize the GNU Scientific Library's multiroot finder to determine $x$ and $y$.
For some reason, I always get a point at approximately the center of the incircle of the triangle with vertices fixed at the 3 centers, even though I know the source to be outside of the triangle formed by the three observers. So, I attempted another solution:
I take the time of arrival at one party (the "baseline") to be $t=0$ (this choice is arbitrary), and then I assign to each party a circle (centered on that party) with a radius given by the difference of this time and arrival at the party (so, the "baseline" party will be assigned a circle of radius $0$, party $P_i$ will be assigned a circle with radius $t_i - t_{baseline}$).
Now, I increment the radius of each circle by a small amount (the same amount for each circle), until all three intersect at some point (of course, I take into account some threshold since I'm incrementing by a discrete amount). Here, too, my localization is at approximately the center of the incircle of the triangle formed by the three parties. This occurs even when I produce "faux" data, designed specifically to produce a localization outside of the triangle formed by the three parties.
What's going on here?
 A: Your formulation of this problem is spot on except that the third equation should have $s(t_1-t_3)$ instead of $s(t_3-t_1).$ I'm assuming that this is the issue. The idea is of course that we have three past "light" cones that map out when and where the signal could have originated (one cone per observer). The cones take the form
$$s^2 dt^2 - dx^2 -dy^2 = 0$$
or equivalently
$$t=t_k-\frac{1}{s}\sqrt{(x-x_k)^2+(y-y_k)^2}\tag{1}$$ for $k\in\{1,2,3\} .$ The event can be narrowed down to some point $(t,x,y)$ in spacetime where these three "light" cones intersect. This means that the intersection of the cones for the first and third observers would be
$$t_3-\frac{1}{s}\sqrt{(x-x_3)^2+(y-y_3)^2}=t_1-\frac{1}{s}\sqrt{(x-x_1)^2+(y-y_1)^2}$$
and thus
$$\sqrt{(x-x_1)^2+(y-y_1)^2}+s(t_3-t_1) = \sqrt{(x-x_3)^2+(y-y_3)^2}$$
or
$$\sqrt{(x-x_k)^2+(y-y_k)^2}+s(t_\ell-t_k) = \sqrt{(x-x_\ell)^2+(y-y_\ell)^2} \tag{2}$$
where $k\neq \ell.$
Something to note is that you shouldn't provide all three equations to the solver. There are only two unknowns in $\textbf{(2)}$ and thus it only needs two equations. If you use the system $\textbf{(1)}$ instead then you will need to provide three equations and you will also get the time of the original pulse from the reference point of the source.
MATLAB didn't seem to have any issue for the test systems that I used. Let me know if you have any other questions.
