3 岩手県花巻市大田 清水寺 明治25年(1892)
安富有恒:和算—岩手の現存算額のすべて,青磁社,東京都,1987.
http://www.wasan.jp/iwatenosangaku_yasutomi.pdf
キーワード:楕円,正三角形
#Julia #SymPy #算額 #和算 #数学
楕円の中に,合同な正三角形を 3 個容れる。楕円の短径が与えられたときに,長径を求める術を述べよ。

楕円の長半径,短半径,中心座標を \(a, b, (0,y_0)\)
正三角形の一辺の長さを x, 楕円上の正三角形の頂点座標を \( (x/2, \sqrt{3}x/2), (x, 0), (0, -\sqrt{3}x/2)\)
とおき,以下の連立方程式を解く。
注:楕円の長径は x 軸上にあるのではない。また,結果的に,楕円は長径≒短径で,ほぼ円に近い。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms x::positive, a::positive, b::positive, y0::positive
eq1 = (x/2)^2/a^2 + (√Sym(3)x/2 - y0)^2/b^2 - 1
eq2 = x^2/a^2 + y0^2/b^2 - 1
eq3 = y0 + √Sym(3)x/2 - b
res = solve([eq1, eq2, eq3], (a, x, y0))[1]
(sqrt(42)*b/6, 28*sqrt(3)*b/45, b/15)
楕円の長径 \(a\) は 短径 \(b\) の \(\sqrt{42}/6 = \sqrt{7/6}\) 倍である。
描画関数プログラムのソースを見る
function draw(b, more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(x, a, y0) = (28*sqrt(3)*b/45, sqrt(42)*b/6, b/15)
@printf("b = %g, x = %g, a = %g, y0 = %g\n", b, x, a, y0)
plot([0, x, x/2, 0], [0, 0, √3x/2, 0], color=:blue)
plot!([0, -x, -x/2, 0], [0, 0, √3x/2, 0], color=:blue)
plot!([x/2, 0, -x/2, x/2], [0, -√3x/2, 0, 0], color=:blue)
ellipse(0, y0, a, b, 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)
point(a, y0)
point(-a, y0)
point(x/2, √3x/2)
point(x, 0, " x", :blue, :left, :vcenter)
point(0, y0, "y0", :red, :center, :bottom, delta=delta/2)
point(0, y0 - b, "y0-b", :red, :center, delta=-delta/2)
point(0, y0 + b, "y0+b", :red, :center, :bottom, delta=delta/2)
point(a, y0, "(a,y0)", :red, :left, :bottom, delta=delta/2)
dimension_line(-a, y0, a, y0, "長径", :black, :center, :bottom, delta=3delta, length=4delta)
plot!(xlims=(-a - 3delta, a + 8delta), ylims=(y0 - b - 5delta, y0 + b + delta))
end
end;
draw(1, true)
以下のアイコンをクリックして応援してください