三四 武蔵国埼玉郡下忍村遍照院境内 金毘羅社(神楽堂) 天保11年(1840)
埼玉県立図書館:埼玉県史料集 第二集『埼玉の算額』,昭和44年,誠美堂印刷所,埼玉県与野市.
キーワード:外円,楕円,二等辺三角形
#Julia #SymPy #算額 #和算 #数学
外円の中に二等辺三角形を設け,その内外に 3 個の等楕円を容れる。二等辺三角形の外にある楕円は外円と接しており,その長径は最大である。短径が 1 寸のとき,外円の直径を求めよ。

外円の半径と中心座標を \(R,\ (0,\ 0)\)
楕円の長半径,短半径,中心座標を \(a,\ b,\ (0,\ b)\)
とおき,以下の連立方程式を解く。
「二等辺三角形の外にある楕円は外円と接しており,その長径は最大である」とは,外円は楕円の曲率円である。よって,\(R = a^2/b\)
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms a::positive, b::positive, R::positive, h::positive, x::positive,
A::positive, H::positive, P::positive, Q::positive,
x0::positive, y0::positive
eq1 = R - a^2/b;
二等辺三角形に内接する楕円の長軸,短軸については算法助術の公式97が適用できる。
eq2 = A^4*H*(2H - Q)^2 - A^4*Q*(2H - Q)^2 - A^2*H*P^2*(2H - Q)^2
eq2 = eq2(A => 2x, H => h, P => 2a, Q => 2b) |> simplify |> println
64*x^2*(b - h)^2*(-a^2*h - 2*b*x^2 + h*x^2)
\(x ≠ 0,\ b ≠ h\) なので,\(-a^2 h - 2b x^2 + h x^2 = 0\) という方程式を解くことになる。
eq2 = -a^2*h - 2*b*x^2 + h*x^2;
res = solve([eq1, eq2], (R, a))[1]
(-x^2*(2*b - h)/(b*h), x*sqrt(-2*b + h)/sqrt(h))
次いで,\(x,\ h,\ x_0,\ y_0\) を求める。
eq3 = -b^2*x0/(a^2*(y0 - b)) + h/x
eq4 = h/x - x0/y0
eq5 = x0^2/a^2 + (y0 - b)^2/b^2 - 1
eq6 = R^2 - (x^2 + (R - h)^2);
まず,eq3, eq4 から \(x_0,\ y_0\) を求める。
res2 = solve([eq3, eq4], (x0, y0));
# x0
res2[x0] |> println
a^2*b*h/(x*(a^2 - b^2))
# y0
res2[y0] |> println
a^2*b/(a^2 - b^2)
次いで,eq5, eq6 から \(x,\ h\) を求める。
eq5 = eq5(x0 => res2[x0], y0 => res2[y0])(R => res[1], a => res[2]) |> simplify |> numerator
eq6 = eq6(x0 => res2[x0], y0 => res2[y0])(R => res[1], a => res[2])
solve([eq5, eq6], (h, x))[1] # 1 of 2
(3*b, 3*b)
\(h = x = 3b\) である。
前に求めた \(R = -x^2(2b - h)/(b h)\) の \(x,\ h\) に \(3b\) を代入すると \(R = 3b\) である。
R = -x^2*(2*b - h)/(b*h)
R(x => 3b, h => 3b) |> println
3*b
外円の直径は,楕円の短径の 3 倍である。
楕円の短径が 1 寸のとき,外円の直径は 3 寸である。
\(R = x = h = 3b\) ということは,「二等辺三角形」は直角二等辺三角形で,その底辺は外円の直径である。
最後の最後に,\(a = x\sqrt{-2b + h}/\sqrt{h}\) の,\(x, h\) に \(3b\) を代入すると \(a = \sqrt{3}b\) である。
a = x*sqrt(-2*b + h)/sqrt(h)
a(x => 3b, h => 3b) |> println
sqrt(3)*b
二等辺三角形の外の 2 個の楕円は,上の二等辺三角形の中の楕円と合同なので,楕円を内包する下の二等辺三角形も直角二等辺三角形であり,楕円の長軸は上の二等辺三角形の底辺と 45° の角をなす。
描画関数プログラムのソースを見る
function draw(b, more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
R = 3b
a = √3b
h = R
x = R
@printf("R = %g, a = %g, h = %g, x = %g\n", R, a, h, x)
plot([x, 0, -x, x], [0, R, 0, 0], color=:green, lw=0.5)
circle(0, 0, R, :blue)
ellipse(0, b, a, b, color=:red)
ellipse(2b/√2, -2b/√2, a, b, φ=45, color=:red)
ellipse(-2b/√2, -2b/√2, a, b, φ=135, color=:red)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
hline!([0], color=:gray80, lw=0.5)
vline!([0], color=:gray80, lw=0.5)
(x0, y0) = (0.75, 0.75)
plot!([0, √2R, 0, 0], [0, 0, -√2R, 0], color=:gray70, lw=0.5, style=:dash)
plot!([0, -√2R, 0, 0], [0, 0, -√2R, 0], color=:gray70, lw=0.5, style=:dash)
point(0, b, "楕円:a,b,(0,b)", :red, :center, delta=-delta/2)
point( (R - b)/√2, -(R - b)/√2)
point(-(R - b)/√2, -(R - b)/√2)
point(R, 0, " R", :blue, :left, :bottom, delta=delta/2)
point(√2R, 0, " √2R", :blue, :right, :bottom, delta=delta/2)
point(0, -√2R, " √2R", :blue, :left, :bottom, delta=delta/2)
end
end;
draw(1/2, true)
以下のアイコンをクリックして応援してください