2
$\begingroup$

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?

See the attached image. Sorry for bad drawing

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

2 Answers 2

8
$\begingroup$

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"]
    }
]

enter image description here

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"]
    }
]

enter image description here

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

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}]

enter image description here

$\endgroup$
3
  • $\begingroup$ can you explain it in simple terms $\endgroup$ Jun 24, 2019 at 17:04
  • $\begingroup$ Is this derived theorem? [Norm[pt - {r, r}] == r, r $\endgroup$ Jun 26, 2019 at 16:53
  • 1
    $\begingroup$ @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. $\endgroup$
    – kglr
    Jun 26, 2019 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.