50 岩手県一関市弥栄字北ノ沢 白山神社 慶應2年(1866)
安富有恒:和算—岩手の現存算額のすべて,青磁社,東京都,1987.
http://www.wasan.jp/iwatenosangaku_yasutomi.pdf
キーワード:円3個,楕円,直線上
#Julia #SymPy #算額 #和算 #数学
直線上に楕円 1 個,等円 3 個が載っている。楕円と等円は共通接点を持ち,楕円の長径が 27 寸,短径が 9 寸のとき,等円の直径はいかほどか。

楕円の長半径,短半径およびその中心座標を \(a, b, (0, a)\)
等円の半径と中心座標を \(r, (x, r), (0, a - d/2)\)
楕円の中の等円の中心と楕円の中心の距離を \(d\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms a::positive, b::positive, r::positive, x::positive,
d::positive
eq1 = x^2 - 4r^2*(a^2*r^2 - b^4)/(a^2 - b^2)/r^2 # 算法助術-公式99
eq2 = (a - r)^2 - (a^2*r + b^2*r)^2*(b^2 - r^2)/(b^2*r^2*(a^2 - b^2)) # 算法助術-公式99
eq3 = 4d^2 - 4(a^2 - b^2)*(b^2 - r^2)/b^2; # 算法助術-公式84
res = solve([eq1, eq2, eq3], (r, x, d))[2]
(b^2*(3*a^2 + b^2)/(a*(a^2 + 3*b^2)), 4*b^2*sqrt(2*a^2 + 2*b^2)/(a^2 + 3*b^2), (a^4 - 2*a^2*b^2 + b^4)/(a*(a^2 + 3*b^2)))
# r
res[1]
\(\displaystyle \frac{b^{2} \left( 3 \cdot a^{2} + b^{2} \right)}{a \left( a^{2} + 3 b^{2} \right)}\)
術は以下のようであるが,簡約化すると同じものである。
@syms 長径, 短径
位 = (長径/短径)^2 + 3
等円径 = (短径^2/長径 + 3長径)/位 |> simplify
\(\displaystyle \frac{短径^{2} \left( 短径^{2} + 3 長径^{2} \right)}{長径 \left( 3 短径^{2} + 長径^{2} \right)}\)
楕円の長径が 27,短径が 9 のとき,等円の直径は 7 である。
描画関数プログラムのソースを見る
function draw(a, b, more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(r, x, d) = (b^2*(3*a^2 + b^2)/(a*(a^2 + 3*b^2)), 4*b^2*sqrt(2*a^2 + 2*b^2)/(a^2 + 3*b^2), (a^4 - 2*a^2*b^2 + b^4)/(a*(a^2 + 3*b^2)))
@printf("a = %g; b = %g; r = %g; x = %g; d = %g\n", a, b, r, x, d)
plot()
ellipse(0, a, b, a, color=:red)
circle2(x, r, r, :blue)
circle(0, a - d, r, :blue)
segment(-1.4x, 0, 1.4x, 0, lw=1)
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(0, a, "楕円:b,a,(0,a)", :red, :center, delta=-delta)
point(b, a, " (b,a)", :red, :left, :vcenter)
point(0, 2a, " (0,2a)", :red, :center, :bottom, delta=delta)
point(0, a - d, "等円:r,(0,a-d)", :blue, :center, delta=-delta)
point(x, r, "等円:r,(x,r)", :blue, :center, delta=-delta)
end
end;
draw(27/2, 9/2, true)
以下のアイコンをクリックして応援してください