長野県中野市田上 田上観音堂 文化6年(1809)
中村信弥「改訂増補 長野県の算額」県内の算額(P.86)
http://www.wasan.jp/zoho/zoho.html
キーワード:円2個,台形,対角線
#Julia #SymPy #算額 #和算 #数学
第3問 台形内を対角線で区切り,大円,小円を容れる。大円の径が 36 寸,小円の径が 20 寸,長が 84 寸のとき,大頭はいかほどか。

注:類似図形において解析解を求める例を「算額(その2022)」に示す。
「長」を \(x\),「大頭」を \(y\)
大円の半径と中心座標を \(r_1,\ (x_1,\ y_1)\)
小円の半径と中心座標を \(r_2,\ (x_2,\ y_2)\)
台形の右上の頂点座標を \( (x_0,\ y_0)\)
とする。
\(x_1 = r_1 = 36/2,\ r_2 = 20/2,\ x = x_0 = 84,\ x_2 = x - r_2\) のように記号を定め方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms x1::positive, y1::positive, r1::positive,
x2::positive, y2::positive, r2::positive,
x::positive, y::positive, x0::positive, y0::positive;
x1 = r1 = 36//2
r2 = 20//2
x0 = x = 84
x2 = x - r2
eq1 = dist2(0, y, x, 0, x1, y1, r1)
eq2 = dist2(0, 0, x0, y0, x1, y1, r1)
eq3 = dist2(0, y, x, 0, x2, y2, r2)
eq4 = dist2(0, 0, x0, y0, x2, y2, r2)
res = solve([eq1, eq2, eq3, eq4], (y, y0, y1, y2))[1]
(63, 35, 27, 20)
大頭の長さは 63 寸である。
描画関数プログラムのソースを見る
function draw(more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(y, y0, y1, y2) = res[1]
x1 = r1 = 36//2
r2 = 20//2
x0 = x = 84
x2 = x - r2
@printf("y = %6.3f; y0 = %6.3f; y1 = %6.3f; y2 = %6.3f\n", y, y0, y1, y2)
plot([0, x, x, 0, 0], [0, 0, y0, y, 0], color=:black, lw=0.5)
circle(x1, y1, r1, :red)
circle(x2, y2, r2, :blue)
segment(0, 0, x0, y0, :black, linewidth=0.25)
segment(0, y, x, 0, :black, linewidth=0.25)
if more
point(x1, y1, "大円:(x1,y1,r1)", :green, :bottom)
point(x2, y2, "小円:(x2,y2,r2)", :green, :bottom)
point(x0, y0, " (x0,y0)", :green, :left, :bottom)
point(0, y, " y", :green, :left, :bottom)
point(x, 0, " x", :green, :left, :bottom)
hline!([0], color=:black, lw=0.5)
vline!([0], color=:black, lw=0.5)
end
end;
以下のアイコンをクリックして応援してください