長野県下高井郡木島平村往郷 水穂神社 寛政12年(1800)
長野県中野市田上 田上観音堂 文化6年(1809)
中村信弥「改訂増補 長野県の算額」県内の算額(P.64, 87)
http://www.wasan.jp/zoho/zoho.html
長野県長野市若穂 清水寺観音堂 寛政6年(1794)
中村信弥「幻の算額」(P.203)
http://www.wasan.jp/maborosi/maborosi.html
キーワード:直角三角形,正方形
#Julia #SymPy #算額 #和算 #数学
第6問 鈎股の中に,全,甲,乙,丙,丁の正方形を容れる。丙,丁の一辺が 192 寸, 108 寸 のとき,全の一辺はいかほどか。

全,甲,乙,丙,丁 の正方形の一辺を \(a,\ b,\ c,\ d,\ e\) とする。\(c = 192,\ e = 108\) で,構成される複数の直角三角形の鈎股の比を \(t = AC / AB = (a + d + e - c)/(a + b + c - e)\) として,連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms a::positive, b::positive, c::positive, d::positive, e::positive;
t = (a + d + e - c)/(a + b + c - e)
eq1 = t - (b - c)/c
eq2 = t - e/(d - e)
eq3 = t - (a - c)/(b + c)
res = solve([eq1, eq2, eq3], (a, b, d))[2] # 2 of 2
( (sqrt(c)*sqrt(e) + e)^2/e, sqrt(c)*sqrt(e) + c, sqrt(c)*sqrt(e) + e)
# a
res[1](c => 192, e => 108) |> println
res[1] |> display
588
\(\displaystyle \frac{\left(\sqrt{c} \sqrt{e} + e\right)^{2}}{e}\)
# b
res[2](c => 192, e => 108) |> println
res[2] |> display
336
\(\displaystyle \sqrt{c} \sqrt{e} + c\)
# d
res[3](c => 192, e => 108) |> println
res[3] |> display
252
\(\displaystyle \sqrt{c} \sqrt{e} + e\)
全,甲,乙の一辺の長さはそれぞれ 588 寸,336 寸,252 寸である。
描画関数プログラムのソースを見る
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(a, b, d) = res[1]
(c, e) = (192, 108)
t = (a + d + e - c)/(a + b + c - e)
println("t = ", t)
plot()
rect(0, 0, a, a)
rect(a, 0, a + b, b)
rect(a + b, 0, a + b + c, c)
rect(0, a, d, a + d)
rect(0, a + d, e, a + d + e)
plot!([0, a + b + c + c/t, 0, 0], [0, 0, a + d + e + e*t, 0], color=:black, lw=0.5)
if more
point(a, 0, " a", :black, :left, :top)
point(a + b, 0, " a+b", :black, :left, :top)
point(a + b + c, 0, " a+b+c", :black, :left, :top)
point(0, a, "a ", :black, :right, :bottom)
point(0, a + d, "a+d ", :black, :right, :bottom)
point(0, a + d + e, "a+d+e ", :black, :right, :bottom)
plot!([e, a + b + c, e, e], [c, c, a + d + e, c], color=:red, lw=1)
point(e, c, " A", :black, :left, :bottom)
point(a + b + c, c, " B", :black, :left, :bottom)
point(e, a + d + e, " C", :black, :left, :bottom)
hline!([0], color=:black, lw=0.5, xlims=(-175, 1400))
vline!([0], color=:black, lw=0.5, ylims=(-70, 1050))
end
end;
以下のアイコンをクリックして応援してください