第41回  算数問題 (6月5日〜7月4日) 

下の図のように AB=AD=15cm BD=24cmの二等辺三角形と BC=CD=20cm BD=24cmの二等辺三角形の
BDの部分をくっつけて四角形 ABCD を 作りました。
この四角形に内接する円の半径はいくらになるでしょうか
注:図はとっても不正確です。

    → 
解答

これが正確な図です いたるところに 3:4:5の直角三角形ができていますね(*^_^*)

そしてこれが内接円を描いた図。円の中心をO、円とAD CDとの接点をH,G とすると
四角形AGDHは正方形であることがわかります。
AH:OH=3:4より AH:HD=3:4
円の半径 OH=HD=4/7AD=15×4/7=60/7cm となります。

解答 2

上の図で 四角形ABCDの面積は 直角三角形ACD2つ分なので 2×1/2×15×20=300

また この面積は 三角形AOD2つ分と 三角形OCD2つ分の面積の和にひとしいので
円の半径をrとすると 2×1/2×(15+20)r=35r
よって 35r=300から r=60/7
解答 3 (浜田 明巳 さん)
浜田さんの VBによる解答はここにあります その1  その2
右クリックで自分のPCに保存し その1 のEXEファイルを実行してください


図形の問題なので,Visual Basicで解いてみた.
 座標系を導入し,直線BDをx軸,直線ACをy軸,点Dのある方をx>0の部分,点Aのある方をy>0の部分とする.
内接円O(Ox,Oy)の中心はAC(y軸)上にあり,AD<CDから,Ox=0,Cy<Oy<Dyとなる.
シラミつぶしにOyに値を代入し,OからAD,CDまでの距離の差が最小になる場合を求め,そのときの距離を半径rとすればよい.
 このプログラムにより,半径は60/7cmとなる.

Option Explicit
Sub Form_Load()
  Picture1.Scale (-15, 12)-(15, -18)
  Picture1.BackColor = vbWhite
  Picture2.BackColor = vbWhite
  Picture2.Picture = LoadPicture("sansuu-041-1.gif")
  Picture3.BackColor = vbWhite
End Sub
Sub Command1_Click()
  Dim Ax As Double
  Dim Ay As Double
  Dim Bx As Double
  Dim By As Double
  Dim Cx As Double
  Dim Cy As Double
  Dim Dx As Double
  Dim Dy As Double
  Dim Ox As Double
  Dim Oy As Double
  Dim r As Double
  Dim Oy_min As Double
  Dim Oy_max As Double
  Dim Oy_min0 As Double
  Dim Oy_max0 As Double
  Dim Oyy As Double
  Dim r1 As Double
  Dim r2 As Double
  Dim rr As Double
  Dim rr1 As Double
  Dim rr2 As Double
  Dim a As Double
  Dim b As Double
  Dim c As Double
  Dim d As Double
  Dim kizami As Double
  Dim sa As Double
  Dim min As Double
  Dim kotae As String
  Dim ten_hankei As Double
  Dim dankai As Integer
  Dim dankai_max As Integer
  '
  ten_hankei = 0.05
  Dx = 24 * 0.5
  Dy = 0
  Ax = 0
  Ay = Sqr(15 * 15 - Dx * Dx)
  Bx = -Dx
  By = 0
  Cx = 0
  Cy = -Sqr(20 * 20 - Dx * Dx)
  Ox = 0
  kizami = 0.01
  Oy_max0 = 0
  Oy_min0 = Cy + kizami
  'AD:y=(Dy-Ay)/(Dx-Ax)*(x-Ax)+Ay=a*x+b
  a = (Dy - Ay) / (Dx - Ax)
  b = a * (-Ax) + Ay
  'CD:y=(Dy-Cy)/(Dx-Cx)*(x-Cx)+Cy=c*x+d
  c = (Dy - Cy) / (Dx - Cx)
  d = c * (-Cx) + Cy
  dankai_max = 14
  min = 1000000
  For dankai = 1 To dankai_max + 1
   If dankai = 1 Then
    Oy_min = Oy_min0
    Oy_max = Oy_max0
   ElseIf dankai <= dankai_max Then
    Oy_min = max2(Oyy - kizami, Oy_min0)
    Oy_max = min2(Oyy + kizami, Oy_max0)
    kizami = kizami * 0.1
   Else
    Oy_min = Oyy
    Oy_max = Oyy
   End If
   For Oy = Oy_min To Oy_max Step kizami
    If dankai <= dankai_max Then
     'AD:-a*x+y-b=0
     r1 = Abs(-a * Ox + Oy - b) / Sqr((-a) * (-a) + 1 * 1)
     'CD:-c*x+y-d=0
     r2 = Abs(-c * Ox + Oy - d) / Sqr((-c) * (-c) + 1 * 1)
     r = (r1 + r2) * 0.5
     sa = Abs(r1 - r2)
     If min > sa Then
      min = sa
      rr = r
      rr1 = r1
      rr2 = r2
      Oyy = Oy
      Picture3.Cls
      Picture3.Print "半径="; rr; "cm(?), OからAD,CDまでの距離の差="; min; "cm"
     End If
     Picture1.Cls
     Picture1.Circle (Ox, Oyy), rr1, vbGreen
     Picture1.Circle (Ox, Oyy), rr2, vbGreen
     Picture1.Circle (Ox, Oyy), rr, vbGreen
     Picture1.Circle (Ox, Oyy), ten_hankei, vbGreen
    Else
     Oy = Oyy
     r = rr
     kotae = bunsuu(r)
     Picture3.Cls
     Picture3.Print "半径="; r; "cm="; kotae; "cm, OからAD,CDまでの距離の差="; min; "cm"
     Picture1.Cls
    End If
    Picture1.Line (Ax, Ay)-(Bx, By), vbBlack
    Picture1.Line -(Cx, Cy), vbBlack
    Picture1.Line -(Dx, Dy), vbBlack
    Picture1.Line -(Ax, Ay), vbBlack
    Picture1.Circle (Ox, Oy), r, vbRed
    Picture1.Circle (Ox, Oy), ten_hankei, vbRed
    Picture1.CurrentX = Ax
    Picture1.CurrentY = Ay
    Picture1.Print "A"
    Picture1.CurrentX = Bx
    Picture1.CurrentY = By
    Picture1.Print "B"
    Picture1.CurrentX = Cx
    Picture1.CurrentY = Cy
    Picture1.Print "C"
    Picture1.CurrentX = Dx
    Picture1.CurrentY = Dy
    Picture1.Print "D"
    Picture1.CurrentX = Ox
    Picture1.CurrentY = Oy
    Picture1.Print "O"
   Next Oy
  Next dankai
End Sub
Sub Command2_Click()
  Unload Me
End Sub
Private Function min2(ByVal x As Double, ByVal y As Double) As Double
  If x < y Then
   min2 = x
  Else
   min2 = y
  End If
End Function
Private Function max2(ByVal x As Double, ByVal y As Double) As Double
  If x > y Then
   max2 = x
  Else
   max2 = y
  End If
End Function
Private Function GCM(ByVal a As Integer, ByVal b As Integer) As Integer
  If b = 0 Then
   GCM = a
  Else
   GCM = GCM(b, a Mod b)
  End If
End Function
Private Function bunsuu(ByVal x As Double) As String
  Dim n As Integer
  Dim sa As Double
  Dim min As Double
  Dim bumbo As Integer
  Dim bunshi As Integer
  min = 10000 '********
  If Int(x) = x Then
   bunsuu = Str(x)
  Else
   n = Int(x)
   x = x - n
   For bumbo = 2 To 1000 '********
    For bunshi = 1 To bumbo - 1
     If GCM(bumbo, bunshi) = 1 Then
      sa = Abs(x - bunshi / bumbo)
      If min > sa Then
       min = sa
       bunsuu = Str(n * bumbo + bunshi) + "/" + Str(bumbo)
      End If
     End If
    Next bunshi
   Next bumbo
  End If
End Function