算額(その683)
和算問題あれこれ 2 令和5年2月の問題-No.1(茨城県 板橋不動願成寺)
https://gunmawasan.web.fc2.com/k-n-mondai.html
直角三角形の中に正方形,長方形,等円 2 個がある。
鈎,股 がそれぞれ 27 寸,36 寸のとき,等円の直径を求めよ。
この問題は,算額(70)
https://blog.goo.ne.jp/r-de-r/e/071461791de5889b7aaceea141d47ced
東京都府中市 大国魂神社
http://www2.ttcn.ne.jp/~nagai/sangaku/sangakumondai1.htm
のものに似ているが,鈎,股に接する等円が正方形,長方形との接し方に違いがある。
式の記述を簡単にするために,問の図を左右を反転させた図で考える。
鈎,股,弦の長さをを「鈎」,「股」,「弦」
長方形の長辺,短辺の長さを「長」,「短」
正方形の一辺の長さを「方」
等円のと中心座標を「径」,(x1, 短 + 径/2)
として,以下の連立方程式を解く。
include("julia-source.txt");
# julia-source.txt ソース https://blog.goo.ne.jp/r-de-r/e/ad3a427b84bb416c4f5b73089ae813cf
using SymPy
@syms 鈎::positive, 股::positive, 弦::positive,
方::positive, 長::positive, 短::positive, 径::positive,
x1
(鈎, 股) = (Sym(27), Sym(36))
弦 = sqrt(鈎^2 + 股^2)
eq1 = (1 + 4//3 - 5//3)方 - 径
eq2 = 鈎 - (5//4 + 3//5)*方 - 短
eq3 = (弦 - (3//4 + 1 + 4//3)*方)^2 - 短^2 - (股 - 径 - 長)^2
eq4 = dist(4方/5, 短, 0, 鈎 - 5方/4, 径/2, 径/2) - 径^2/4
eq5 = dist(股, 0, 0, 鈎, x1, 短 + 径/2) - 径^2/4
res = solve([eq1, eq2, eq3, eq4, eq5], (方, 長, 短, 径, x1))
4-element Vector{NTuple{5, Sym}}:
(12, 108/5, 24/5, 8, 88/5)
(12, 108/5, 24/5, 8, 464/15)
(12, 172/5, 24/5, 8, 88/5)
(12, 172/5, 24/5, 8, 464/15)
4 組の解が得られるが,最初のものが適解である。
鈎,股 が 27寸, 36寸のとき,等円の直径は 8 寸である。
正方形の一辺の長さは 12寸,長方形の長辺,短辺の長さはそれぞれ 108/5 = 21.6寸,24/5 = 4.8寸である。
大国魂神社の算額と比較すると,鈎股に接する等円と長方形の短辺が接するように長方形の長辺を長くしただけであることがわかる。
using Plots
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(鈎, 股) = (27, 36)
弦 = sqrt(鈎^2 + 股^2)
(方, 長, 短, 径, x1) = (12, 108/5, 24/5, 8, 88/5)
r = 径/2
plot([0, 股, 0, 0], [0, 0, 鈎, 0], color=:black, lw=0.5)
circle(r, r, r)
circle(x1, 短 + r, r)
rect(2r + 長, 0, 2r, 短, :blue)
plot!([4方/5, 0, 3方/5, 7方/5, 4方/5],
[短, 鈎 -5方/4, 鈎 - 9方/20, 鈎 - 21方/20, 短], color=:green, lw=0.5)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
vline!([0], color=:black, lw=0.5)
hline!([0], color=:black, lw=0.5)
point(股, 0, " 股", :black, :left, :bottom, delta=delta)
point(0, 鈎, " 鈎", :black, :left, :bottom, delta=delta/2)
point(r, r, "等円:r,(r,r)", :red, :center, delta=-delta)
point(x1, 短 + r, "等円:r\n(x1,短+r)", :red, :center, delta=-delta)
point(2r + 長, 0, " 2r+長", :blue, :left, :bottom, delta=delta)
point(4方/5, 短, "a", :green, :center, delta=-delta)
point(0, 鈎 -5方/4, " b", :green, :left, :vcenter)
point(3方/5, 鈎 - 9方/20, " c", :green, :left, :bottom)
point(7方/5, 鈎 - 21方/20, " d", :green, :left, :bottom)
end
end;