System of nonlinear equations with steps Can you please help me to solve the given system of nonlinear equation:
$$d^2=(x-b_1)^2+(y-a_1)^2$$
$$l^2=(x-b_2)^2+(y-a_2)^2$$
I would appreciate If you can share the steps. Thank you very much!!
Kind Regards,
Nikola
 A: $$l^2-d^2=-2b_2x+2b_1x-2a_2y+2a_1y+b_2^2+a_2^2-b_1^2-a_1^2,$$  write it in the form $y=mx+n$, substitute it in one of the starting equations and solve a quadratic equation.
A: Hint: The answer of @MichealRozenberg is better. I just wanted to post my answer because it has an interesting geometrical flavor to it. 
First, use the substitution $u=x-b_1$ and $v=y-a_1$ to translate the center of the first circle into the origin.
Then use $\tan(\alpha) = \frac{a_2-a_1}{b_2-b_1}$ to determine the angle of ration $\alpha$ use this to rotate the equations with this substitution:
$$z = \cos(-\alpha)u-\sin(-\alpha)v=\cos(\alpha)u+\sin(\alpha)v$$
$$w = \sin(-\alpha)u+\cos(-\alpha)v=-\sin(\alpha)u+\cos(\alpha)v.$$
What we have done by these substitutions is that we transformed the initial problem to the distance of one circle in the origin with radius $d$ and another circle which has its center at the $x$-axis and a radius of $l$.
A: You say in some comments that you’re planning to automate this, so instead of trying to find a messy closed-form formula that you’re bound to make errors in when coding it up, I think you’d be better off with an algorithm that lets you compute the solution, if one exists.  
Start by subtracting the two equations from each other. This will give you the equation of a line, $\lambda x+\mu y+\tau=0$, that also passes through the intersection points. (In fact, every non-zero linear combination of the two equations passes through these points.) Find the intersection $\mathbf p$ of this line with the line through the two circle centers. The five points form four right triangles, so use the Pythagorean theorem to compute the distance between $\mathbf p$ and the intersection points. Move that distance along the intersection line, and you’re done.  
More specifically, working in homogeneous coordinates we have $$\mathbf l = [\lambda:\mu:\tau]=[2(b_1-b_2):2(a_1-a_2):a_2^2-a_1^2+b_2^2-b_1^2+d^2-l^2]$$ as in Michael Rozenberg’s answer. The centers of the two circles are at $\mathbf c_1=[b_1:a_1:1]$ and $\mathbf c_2=[b_2:a_2:1]$. The line through these points is $$\mathbf m=\mathbf c_1\times\mathbf c_2=[a_1-a_2:b_2-b_1:a_2b_1-a_1b_2]$$ and $\mathbf p=\mathbf l\times\mathbf m$. At this point, I’m going to stop expanding the expressions in terms of the original coefficients in the interests of space and sanity. The fully-expanded expressions aren’t particularly enlightening.  
For the next step, convert $\mathbf p$ to its Cartesian equivalent $\tilde{\mathbf p}$ by dividing through by the last element. The distance between $\tilde{\mathbf p}$ and the circles’ intersections is found via the Pythagorean theorem, using either circle: $$\begin{align} \alpha^2 &= d^2-\|\tilde{\mathbf p}-\tilde{\mathbf c}_1\|^2 \\ &= l^2-\|\tilde{\mathbf p}-\tilde{\mathbf c}_2\|^2. \end{align}$$ Finally, the intersection points are $$\tilde{\mathbf p}\pm\alpha{(\mu,-\lambda)\over\sqrt{\lambda^2+\mu^2}}.$$ If $\alpha^2 = 0$, then the circles are tangent (one intersection point), while $\alpha^2\lt0$ means that the circles don’t intersect at all. If you insist on having a closed-form formula, you can certainly substitute the original coefficients into this cascade of computations and try to simplify the ugly expressions that result, but I find it much simpler and less error-prone to break it down into steps and give the intermediate results names.  
Using Michael Rozenberg’s example of $(x-2)^2+(y+3)^2=25$, $(x+4)^2+(y+6)^2=4$, the difference between the equations is $-12x-6y-60=0$, so we compute: $$\mathbf l=[-12:-6:-60] \\
\mathbf m=[2:-3:1]\times[-4:-6:1] = [3:-6:-24] \\
\mathbf p=\mathbf l\times\mathbf m = [-216:-468:90] \\
\tilde{\mathbf p} = \left(-\frac{12}5,-\frac{26}5\right) \\ 
\tilde{\mathbf p}-\tilde{\mathbf c}_1 = \left(-\frac{22}5,-\frac{11}5\right) \\ 
\alpha = \sqrt{25-\frac{121}5} = {2\over\sqrt{5}}.$$ The two intersection points are then $$\left(-\frac{12}5,-\frac{26}5\right)\pm{2\over\sqrt{5}}{(-6,12)\over6\sqrt5}$$ or $\left(-\frac{14}5,-\frac{22}5\right)$ and $(-2,-6)$.  
