# Finding the radius of a circle given that it is tangent to both axes and contains (10, 9)

A circle is tangent to both axes in the 1st quadrant of the xy-plane. If the point (10, 9) is on the circle, what is the circle radius?

• try Solve[Norm[{10, 9} - {r ,r}] == r, r]?
– kglr
Jun 24, 2019 at 9:07
• There are two such circles. Which one do you want? Jun 24, 2019 at 21:58

You can use the new in M12 function GeometricScene for this, although it will return machine number results:

instance = RandomInstance @ GeometricScene[
{c, z->{10,9}, o->{0,0}, p->{10,0}, q->{0,10}},
{
GeometricAssertion[{CircleThrough[{z}, c], InfiniteLine[{o,p}]}, "Tangent"],
GeometricAssertion[{CircleThrough[{z}, c], InfiniteLine[{o,q}]}, "Tangent"]
}
]


The two GeometricAssertion statements assert that the circle through the point z is tangent to the x and y axes.

The center of the circle is located at:

c /. instance["Points"]


{5.58359, 5.58359}

If you want to obtain the other circle, you can add a PlanarAngle predicate:

big = RandomInstance @ GeometricScene[
{c,z->{10,9},o->{0,0},p->{10,0},q->{0,10}},
{
PlanarAngle[{c,z,o}] > 90 Degree,
GeometricAssertion[{CircleThrough[{z}, c], InfiniteLine[{o, p}]},"Tangent"],
GeometricAssertion[{CircleThrough[{z}, c], InfiniteLine[{o, q}]},"Tangent"]
}
]


• This is exactly the kind of question that GeometricScene is so useful for!
– Carl Lange
Jun 24, 2019 at 21:51
• Please add reference material. How did you derive this equation? Jun 26, 2019 at 16:52
• @usmanharoon I added a bit more explanation. Look up the functions in the documentation center for more details. Jun 26, 2019 at 17:15

The circles tangent to the two axes are Circle[{r, r}, r] for some r. Since the unknown circle passes through pt = {10, 9} the distance from pt to the center {r,r} must be r. So,

pt = {10, 9};
Solve[Norm[pt - {r, r}] == r, r]


{{r -> 19 - 6 Sqrt[5]}, {r -> 19 + 6 Sqrt[5]}}

Move the black dot around to see the two circles that touch the axes and pass through the black point:

Manipulate[sol = Solve[Norm[pt - {r, r}] == r, r];
Graphics[{AbsolutePointSize[10], Black, Dynamic[Point @ Round[pt, 1/10]],
Dynamic@Text[Style[ToString[Round[pt, 1/10], InputForm], 14],
pt, {-1.25, -1}],
AbsolutePointSize[5], Thick,
{Red, Point[{{r, 0}, {r, r}, {0, r}}], Circle[{r, r}, r],
Dashing[Small], Arrow[{{r, r}, {r, 0}}], Arrow[{{r, r}, {0, r}}]} /. sol[[1]],
{Blue, Point[{{r, 0}, {r, r}, {0, r}}], Circle[{r, r}, r],
Dashing[Small], Arrow[{{r, r}, {r, 0}}], Arrow[{{r, r}, {0, r}}]} /. sol[[2]]},
Frame -> True, FrameStyle -> FontSize -> 16,
FrameTicks -> ({{{#, Pane[InputForm@#, ImageSize -> {60, 20},
Alignment -> Right]} & /@ #, None},
{{#, Pane[InputForm@#, ImageSize -> {60, 20},
Alignment -> Center]} & /@ #, None}} &@
Round[Flatten[r /. sol], 1/10]), ImageSize -> 400,
PlotRangePadding -> 0], {{pt, {10, 9}}, Locator,
Appearance -> None}, AppearanceElements -> None, TrackedSymbols -> {pt}]


• can you explain it in simple terms Jun 24, 2019 at 17:04
• Is this derived theorem? [Norm[pt - {r, r}] == r, r Jun 26, 2019 at 16:53
• @usmanharoon, Norm[pt - {r, r}] == r represents the statement "the point pt lies on the circle with center {r,r}" . Norm[pt - {r, r}]  is the distance from pt to the center and this distance must be equal to the radius of the circle.
– kglr
Jun 26, 2019 at 18:25