# Function that describes this relation

Take a circle that is centered at the origin and two lines, 0.5 above and below the origin with slope $$a$$. The points that the lines intersect the circle to the right of the origin are named $$A$$ and $$B$$. What would be the function that takes the input of slope $$a$$ and returns the distance between the two points? It looks very similar to $$1/n^{x^2}$$, but I can't find any way to transform the function to fit the curve. I also tried using a CAS, but I couldn't get a function that fits the curve, and solving it by hand quickly proved to be extremely tedious. The values at $$1$$ and $$-1$$ are $$1$$ over the square root of $$2$$, and here is an image of the curve. • Doesn't it depend on the radius of the circle? – Mark Fischler May 16 at 0:49
• Nope, because any distance along the lines you go the distance between two points on them will not change – TigerGold May 16 at 0:52
• Using brute-force elementary algebra (in Maple), I get a distance of $$\frac{1}{\sqrt{1+a^2}}$$ – quasi May 16 at 1:11
• That works, I'm so stupid – TigerGold May 16 at 1:14
• OMG, I guess we are all silly. The two lines are a fixed distance apart. By symmetry , the line between the intersection points with the circle is perpendicular to the two lines. So we can translate that line segment to touch $(0,\frac12)$ on one side. Then in the small right triangle formed by the line between $(0,-\frac12)$ and $(0,+\frac12)$, the perpendicular dropped to line A at point $P$, and the segment from the origin to P, the hypotenuse is $1$ and angle ABP is the same as the angle $\theta$ between the lines and the horizontal. So BP = $\cos \theta$ which is same as answer. – Mark Fischler May 16 at 15:12

## 1 Answer

Let the two points be at coordinates $$(b_x,b_y)$$ and $$(a_x,a_y)$$. Also, temporarily let the slope be called $$s$$, to avoid confusion with the coordinates of point $$A$$.
Then we have four equations in the four coordinates, saying that the two points lie on the circle and on the respective lines: $$b_x^2 + b_y^2 = r^2 \\ a_x^2 + a_y^2 = r^2 \\ b_y =s b_x - \frac12 \\ a_y = s a_x + \frac12$$ The solution to these equations with positive $$a_x, b_x$$ is $$\pmatrix{a\\b} = \left( \frac{\sqrt{4(1+s^2)r^2-1} \mp s}{2(1+s^2)},\,\,\, \frac12\left( \pm \frac1{1+s^2} + \frac{\sqrt{4(1+s^2)r^2-1}}{1+s^2} \right)\right)$$ where the $$+$$ sign in $$\pm$$ refers to $$a$$ and the $$-$$ sign to $$b$$.

The answer $$d$$ is obtained by substituting these into $$\sqrt{(x_x-a_x)^2+(b_y-a_y)^2}$$ and simplifies to $$d = \frac1{\sqrt{1+s^2}}$$ or in terms of $$a$$ as the slope,

$$d = \frac1{\sqrt{1+a^2}}$$