難撚到


The formula arises from solving the geometric relationships for an inscribed semicircle:
1. Setup: Consider a rectangle from (0,0) to (m,n). Place one endpoint of the diameter at (x,0) on the bottom side and the other at (0,y) on the left side.
• The center of the semicircle is at (x/2, y/2).
• The radius r satisfies the diameter length: 2r = √(x² + y²).
2. Tangency Constraints: For the arc to be tangent to the right side (x = m) and top side (y = n):
• Distance from center to right side: m - x/2 = r → x = 2(m - r).
• Distance from center to top side: n - y/2 = r → y = 2(n - r).
3. Substitute and Solve:
• Plug into the diameter equation: 2r = √(2(m - r))² + (2(n - r))².
• Simplify: r = √(m - r)² + (n - r)².
• Square both sides: r² = (m - r)² + (n - r)².
• Expand: r² = m² - 2mr + r² + n² - 2nr + r².
• Rearrange: 0 = r² + m² + n² - 2r(m + n).
• Quadratic form: r² - 2(m + n)r + (m² + n²) = 0.
• Solve using quadratic formula: r = (m + n) ± √(m + n)² - (m² + n²) = (m + n) ± √(2mn).
• Select the smaller root (minus sign) for physical feasibility: r = (m + n) - √(2mn).