# Solving these two equations simultaneously

I'm having a hard time to solve these two equations simultaneously. I'm arriving to a very long equation..

$$x_0^2+y_0^2=(7\sqrt{2})^2=98$$

$$\sqrt{25+(x_0+2)^2}+\sqrt{4+(y_0-5)^2}=7\sqrt{2}$$

-
It should be noted that you are not looking for a specific point but rather a function (according to WolframAlpha). –  Shahar Aug 21 '14 at 16:59
The real solution is only $(x_0,y_0)=(-7,7)$ according to SWP –  Jlamprong Aug 21 '14 at 17:02
The general form of the second equation appears to be $\sqrt{y_c^2+(x-x_c)^2} + \sqrt{x_c^2+(y-y_c)^2} = R^2$. This has to be solved together with $\sqrt{x^2+y^2}=R$ when $x_c=-2$, $y_c=5$ and $R^2=98$ are given. –  ja72 Aug 21 '14 at 17:07
@Jlamprong, what is SWP? –  Vikram Aug 21 '14 at 17:08
@Vikram: SWP is here –  Jlamprong Aug 21 '14 at 17:32

Solving for $x_{0}$ in the equation $x_{0}^{2} + y_{0}^{2} = (7\sqrt{2})^{2}$ gives:

$x_{0} = \pm \sqrt{ 98 - y_{0}^{2}}$

Substituting in the positive one for $x_{0}$ in the equation $\sqrt{25 + (x_{0} + 2)^{2}} + \sqrt{4 + (y_{0} - 5)^{2}} = 7\sqrt{2}$, we get:

$\sqrt{25 + (\sqrt{ 98 - y_{0}^{2}} + 2)^{2}} + \sqrt{4 + (y_{0} - 5)^{2}} = 7\sqrt{2}$

If we expand the $(\sqrt{ 98 - y_{0}^{2}} + 2)^{2}$, we get:

$98 - y_{0}^{2} + 4\sqrt{98 - y_{0}^{2}} + 4 = 102 - y_{0}^{2} + 4\sqrt{98 - y_{0}^{2}}$

And plugging this back into the original expression gives:

$\sqrt{25 + 102 - y_{0}^{2} + 4\sqrt{98 - y_{0}^{2}}} + \sqrt{4 + (y_{0} - 5)^{2}} = 7\sqrt{2}$

Combining like terms gives:

$\sqrt{127 - y_{0}^{2} + 4\sqrt{98 - y_{0}^{2}}} + \sqrt{4 + (y_{0} - 5)^{2}} = 7\sqrt{2}$

Now moving $\sqrt{4 + (y_{0} - 5)^{2}}$ onto the other side of the equation and squaring both sides gives:

$127 - y_{0}^{2} + 4\sqrt{98 - y_{0}^{2}} = 98 - 14\sqrt{4 + (y_{0} - 5)^{2}} - (4 + (y_{0} - 5)^{2})$

Expanding everything and combining like terms gives:

$35 - 10y_{0} + 4\sqrt{98 - y_{0}^{2}} = - 14\sqrt{4 + (y_{0} - 5)^{2}}$

Squaring both sides again gives:

$[35 - 10y_{0} + 4\sqrt{98 - y_{0}^{2}}]^{2} = 196(4 + (y_{0} - 5)^{2})$

After combining like terms:

$1225 - 700y_{0} + 280\sqrt{98 - y_{0}^{2}} + 100y_{0}^{2} -80y_{0}\sqrt{98 - y_{0}^{2}} + 16(98 - y_{0})^{2} = 196(4 + (y_{0} - 5)^{2})$

Further simplifying gives:

$154889 - 3836y_{0} + 280\sqrt{98 - y_{0}^{2}} + 116y_{0}^{2} -80y_{0}\sqrt{98 - y_{0}^{2}} = 784 + 196y_{0}^{2} - 1960y_{0} + 4900$

Making one side $0$ gives:

$149205 - 1876y_{0} + 280\sqrt{98 - y_{0}^{2}} - 80y_{0}^{2} -80y_{0}\sqrt{98 - y_{0}^{2}} = 0$

Moving the square root to the other side of the equation gives:

$149205 - 1876y_{0} - 80y_{0}^{2} = (80y_{0} - 280)\sqrt{98 - y_{0}^{2}}$

Squaring both sides gives:

$(149205 - 1876y_{0} - 80y_{0}^{2})^{2} = (80y_{0} - 280)^{2}(98 - y_{0}^{2})$

At this point, I just plugged this into WolframAlpha to solve for $y$. It gave the approximate solutions (which would need to be checked.....):

$y_{0} = -9.89852, 1.97077, 5.09124, 9.88832, 3.47410 - 1.53347i$... (approximations)

The moral of this story is that by hand calculations do not eventually "get better" in the event that someone else wants to try them.

-
LOL!!!!, +1 for the moral of the story :D –  Vikram Aug 21 '14 at 17:00
@Vikram Haha, typing this out gave me a headache! –  user46944 Aug 21 '14 at 17:05

Drop subscripts of $x$ and $y$.

Put $u=x+2, v=y-5$.

Then the equations become $$(u-2)^2+(v+5)^2=(7\sqrt{2})^2 \qquad \cdots (1)$$ and $$\sqrt{25+u^2}+\sqrt{4+v^2}=7\sqrt{2}\qquad \cdots (2)$$

Squaring $(2)$ equals $(1)$, i.e. \begin{align}(25+u^2)+(4+v^2)+2\sqrt{(25+u^2)(4+v^2)}&=(u^2-4u+4)+(v^2+10v+25)\\ \sqrt{(25+u^2)(4+v^2)}&=-2u+5v\\ \end{align}

Squaring: \begin{align} 100+4u^2+25v^2+u^2v^2&=4u^2-20uv+25v^2\\ (uv)^2+20uv+100&=0\\ (uv+10)^2&=0\\ uv&=-10 \Rightarrow v=-\frac{10}u\end{align}

Substituting back into $(1)$: \begin{align} (u-2)^2+(-\frac {10}u+5)^2&=98\\ \end{align}

Solving numerically gives \begin{align}u&=-5, -2.6893, \quad \ \; 0.6752,\ 11.0142\\ v=-\frac {10}u &=\quad 2,\ \ 3.7184, \; -14.8104, -0.9079\\ x=u-2&=-7, -4.6893, \ -1.3248, \ \ \ 9.0142\\ y=v+5&=\ \ 7,\quad 8.7184, \ -9.8104, \ \ \ 4.0921 \end{align}

Checking by substitution shows that only the first two sets of numbers are valid, hence solution is $$(x,y)=(-7,7), (-4.6893, 8.7184)\qquad \blacksquare$$

-
nice trick! the original/parent problem is here:math.stackexchange.com/questions/905035/… –  Vikram Aug 21 '14 at 21:43
@vikram - thanks! and thanks to everyone for the upvotes! :) –  hypergeometric Aug 22 '14 at 15:31

This is not an answer yet, but perhaps it helps:

The first equation represents a circle of radius $7\sqrt{2}$ with center $0$. The second equation is obviously a bounded and symmetrical set around its center around $(-2,5)$

I did a quick plot and there might be a solution but it seems to be no more than one.

-
nice plot... if you plot both the circle and wannabe circle/diamond (diamoid?) on desmos.com and look closely there are actually two points of intersection, and not one tangential point of contact as may appear initially. –  hypergeometric Aug 22 '14 at 15:34
Thats why I was very vague when talking about the number of solutions=) Thanks for the link, I did not know that site! –  flawr Aug 22 '14 at 15:41

Use polar coordinates $(x,y) = (-r \sin \theta, r \cos \theta)$ to get $r=\sqrt{98}$ and

$$\sqrt{98 \cos^2 \theta - 2 \sqrt{98} (5) \cos \theta + (-2)^2 + (5)^2} + \\ \sqrt{98 \sin^2 \theta+2 \sqrt{98} (-2) \sin\theta + (-2)^2 +(5)^2 } = \sqrt{98}$$

Numerically there are two solutions at $\theta=28.27437°$ and $\theta=45°$ for the solutions

$$(x_0,y_0) = ( -4.6893, 8.7184 ) \\ (x_0,y_0) = ( -7, 7 )$$

-