算額(その546)
七十二 群馬県富岡市一ノ宮 貫前神社 嘉永2年(1849)
群馬県和算研究会:群馬の算額,上武印刷株式会社,高崎市,1987年3月31日.
群馬の算額 72−4 貫前神社 嘉永2年
http://takasakiwasan.web.fc2.com/gunnsann/g072-4.html
弧(弓形)の中に 2 本の斜線を入れ,各領域に 3 個の等円を入れる。弦の長さが 8 寸,矢の長さが 3 寸のとき,等円の直径はいかほどか。
弧を円の一部に含む円の半径と中心座標を R, (0, 0)
弦と y 軸の交点の座標を (0, y)
等円の半径と中心座標を r, (0, y + r), (x, y + r)
とおき,以下の連立方程式を解く。
include("julia-source.txt");
using SymPy
@syms R::positive, r::positive, x::positive, y::positive, a::positive, 矢::positive, 弦::positive
eq1 = y + 矢 - R
eq2 = sqrt(R^2 - y^2) - 弦/2
eq3 = x^2 + (y + r)^2 - (R - r)^2
eq4 = r/(矢 - r) - a/sqrt(矢^2 + a^2)
eq5 = distance(0, R, a, y, x, y + r) - r^2
eq5 = 2r/x - 矢/sqrt(矢^2 + a^2)
res = solve([eq1, eq2, eq3, eq4, eq5], (R, r, x, y, a));
7 組の解が得られるが,6 番目の解が適解である。
res[6]
(弦^2/(8*矢) + 矢/2, 矢*sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2))/(sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2))), 弦*sqrt(-sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)))/(2*sqrt(sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)))), 弦^2/(8*矢) - 矢/2, sqrt(矢)*sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2))/2)
res[6][2] |> println
矢*sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2))/(sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)))
SymPy では簡約化できないようなので,手動で簡約化する。
分母の有理化のために分子・分母に (sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) - sqrt(2*矢 + sqrt(弦^2 + 4*矢^2))) を掛ける。
num = numerator(res[6][2]) * (sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) - sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)));
den = denominator(res[6][2]) * (sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) - sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)));
num2 = num |> expand |> simplify
num2 |> println
矢*(-弦 - 2*矢 + sqrt(弦^2 + 4*矢^2))
den2 = den |> expand |> simplify
den2 |> println
-4*矢
num2/den2 |> factor |> println
-(-弦 - 2*矢 + sqrt(弦^2 + 4*矢^2))/4
等円の半径は 「弦 + 2矢 - sqrt(弦^2 + 4*矢^2))/4」 である。
(矢, 弦) = (3, 8)
(弦 + 2矢 - sqrt(弦^2 + 4*矢^2))/4
1.0
その他のパラメータは以下の通り。
R = 4.16667; r = 1; x = 2.3094; y = 1.16667; a = 1.73205
矢 = 3; 弦 = 4
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(矢, 弦) = (3, 8)
(R, r, x, y, a) = (弦^2/(8*矢) + 矢/2, 矢*sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2))/(sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2))), 弦*sqrt(-sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)))/(2*sqrt(sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2)) + sqrt(2*矢 + sqrt(弦^2 + 4*矢^2)))), 弦^2/(8*矢) - 矢/2, sqrt(矢)*sqrt(-2*矢 + sqrt(弦^2 + 4*矢^2))/2)
# (R, r, x, y, a) = [5, 1, 2.5, 2, 1.8]
@printf("R = %g; r = %g; x = %g; y = %g; a = %g\n", R, r, x, y, a)
@printf("矢 = %g; 弦 = %g\n", R - y, sqrt(R^2 - y^2))
θ = atand(y, 弦/2)
plot()
circle(0, 0, R, beginangle=θ, endangle=181-θ)
circle(0, y + r, r, :green)
circle(x, y + r, r, :green)
circle(-x, y + r, r, :green)
plot!([-a, 0, a], [y, R, y], color=:magenta, lw=0.5)
segment(-弦/2, y, 弦/2, y, :blue)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
point(0, R, " R", :red, :left, :bottom, delta=delta/2)
point(0, y, " y", :blue)
point(弦/2, y, "(弦/2,y) ", :blue, :right, :top, delta=-delta/2)
point(a, y, "(a,y) ", :blue, :center, :top, delta=-delta/2)
point(0, y + r, " y+r", :green, :left, :vcenter)
point(x, y + r, "(x,y+r)", :green, :center, :top, delta=-delta/2)
end
end;