Problem:
Solve for the values of a, b
Equation 1:
$$(x_1-a)^2+(y_1-b)=r^2$$
Equation 2:
$$(x_2-a)^2+(y_2-b)^2=r^2$$
Where, $x_1, x_2, y_1, y_2$ and $r$ are all constant values
For the purposes of this problem $x_2 = 0$ and $y_1 = 0$
My Solution:
Eq. 1 and 2 become
**Equation 1a:**$$(x_1-a)^2+b^2=r^2$$ **Equation 2a:**$$a^2+(y_2-b)^2=r^2$$
Expanding Eq. 1a
**Equation 1b:**$$b^2+a^2-2ax_1-r^2+x_1^2=0$$ **Equation 2b:**$$a^2+b^2-2by_2-r^2+y_2^2=0$$
Solving for b $$b=\pm\sqrt{r^2-a^2+2ax_1-x^2}$$ Substituting the value of b into Eq. 2b and solving for a using the quadratic equation I end up with the coefficients to the quadratic equation as such.
$$A=(4x_1^2+4y_2^2)$$ $$B=(4x_1y_2^2-8y_2x_1-4x_1^3)$$ $$C=(2y_2^2x_1^2-4y_2^2r^2+x_1^4+y_2^4)$$
plugging in the coefficients into $$f(x)=\frac{-b^2\pm\sqrt{b^2-4ac}}{2a}$$
I then have the two values of a which I subsequently plug back into Eq. 1a and solve for b.
note: To test my solution I have used the equation of a circle with non-zero (a, b) values to determine what the value of a, b should be at various x and y values.
My Question(s):
The value I calculate for a is approximately half of the true value of a yet despite extensive review I cannot find my error.
1: Is there anything unique about solving a system of quadratic equations that would create error?
2: Is it likely that the error is a rounding error introduced by the program used to calculate a?
3: Is there something wrong with my approach?
Exact Solution:
Subtracting Eq. 2b from Eq. 1b
$$-2ax_1+2by_2+x_1^2-y_2^2=0$$ $$b=\frac{ax_1}{y_2}-\frac{x_1^2}{2y_2}+\frac{y_2}{2}$$
When b is substituted into Eq. 1b we get the following coefficients which can be plugged into the quadratic equation to get a.
$$A=(1+\frac{x_1^2}{y_2^2})$$ $$B=(-x_1-\frac{x_1^3}{y_2^2})$$ $$C=(\frac{x_1^2}{2}+\frac{x_1^4}{4y_2^2}+\frac{y_2^2}{4}-{r^2})$$
The system of equations:
$$\left\{\begin{aligned}&x^2+y^2=z^2\\&q^2+t^2=z^2\end{aligned}\right.$$
the solutions have the form:
$$x=4p^4-s^4$$
$$y=4p^2s^2$$
$$q=4ps(2p^2-s^2)$$
$$t=4p^4-8p^2s^2+s^4$$
$$z=4p^4+s^4$$
$p,s$ - integers.
Although it is written decision system Diofantovy equations. I think the difficulty is not to find solutions such what .