Locus of midpoint of line with endpoints always on x and y axis.

analytic geometry

I came across the following question:

A line segment of length 6 moves in such a way that its endpoints remain on the x-axis and y-axis. What is the equation of the locus of its midpoint?

And I proceeded with the following:
Let (x,y) be the midpoint of the line segment. enter image description here

From the description of the question we can see that the locus will be symmetric about the x-axis as well as the y-axis. So, I just solved for the first quadrant.

From the figure I saw that
$\left(y+\sqrt{\left(3^{2}-x^{2}\right)}\right)^{2}+\left(x+\sqrt{\left(3^{2}-y^{2}\right)}\right)^{2}=6^{2}$
, since (x,y) splits the segment into two parts which are of length 3 each.
Solving this I arrived at $y\sqrt{9-x^{2}}+x\sqrt{9-y^{2}}=9$.

Upon doing some probing I found that this is the equation for the the part of the circle $x^{2}+y^{2}=9$ in the first quadrant.

However, trying to plot the original equation $y\sqrt{9-x^{2}}+x\sqrt{9-y^{2}}=9$ in Desmos, does not render any graph. Upon selecting values such as 8.999 (or something closer to 9) for the RHS, I am able to get some sort of approximation of the circle equation to be rendered.
Link to graph.

I was wondering, what was wrong with the equation that caused it not to get rendered. Is there an issue with the equation or is it related to some technicality in Desmos.

Best Answer

If you consider $\angle ABC = \theta$ in your figure, having $AB=6 \implies CB = 6\cos\theta, \ CA = 6\sin\theta$, and $C$ being the origin, assuming the line moves about in the positive quadrant, we get

$B=(6\cos\theta,0), \ C = (0,6\sin\theta) \implies \text{midpoint of }BC =(3\cos\theta,3\sin\theta), \ 0\le\theta\le \dfrac{\pi}2 $

So the midpoint has co-ordinates $(x,y)=(3\cos\theta,3\sin\theta)$ with $\theta \in \left[0,\dfrac{\pi}2\right] \\ \implies x^2+y^2=9$ but restricted only to the quarter in the first quadrant.

I am adding this as an answer because this way you don't come across the formula you have presented. I tried out some graphs on Desmos by beginning with $$x\sqrt{9-y^2} + y\sqrt{9-x^2}=9 \qquad (1)$$ which, as you have observed doesn't yield a graph, but playing around with the components in this formula, the following do produce graphs $$x\sqrt{9-y^2} + y\sqrt{9-x}=9 \\ x\sqrt{9-y} + y\sqrt{9-x^2}=9 \\ x\sqrt{9-y} + y\sqrt{9-x}=9$$ and the following don't $$\sqrt{9-y^2} + \sqrt{9-x^2}=9 \\ \sqrt{9-y} + \sqrt{9-x}=9 \\ \sqrt{9-y} + \sqrt{9-x^2}=9$$

Coming back to your formula, note that $$x^2+y^2=9 \implies \sqrt{9-y^2}=|x|\ne x$$ so, if Desmos had to graph your formula $(1)$, it should ideally graph both $$x|x|+y|y|=9\text{ and } x^2+y^2=9$$ since squaring adds unnecessary roots as Mick has noted, which have some amount of overlap but these are not entirely the same, so Desmos is kind of confused, I guess, as to which one you want, this definitely has to do with the graphing algorithm.

Point of interest: $$x\sqrt{9-y^2} + y\sqrt{9-x^2}=9$$ leads to both $$x^2+y^2=9 \text{ and } x|x|+y|y|=9$$ and the above two formulae overlap exactly in the quarter of the circle in the first quadrant.

Related Question