以下の内容はhttps://sangaku0418.hatenablog.com/entry/2024/08/07/144657より取得しました。


算額(その1191)

(14) 京都府城陽市寺田 水度神社 明治18年(1885)

近畿数学史学会:近畿の算額「数学の絵馬を訪ねて」,平成4年5月16日 初版第一刷,大阪教育図書株式会社,大阪市.
キーワード:円7個,長方形
#Julia #SymPy #算額 #和算 #数学


長方形の中に,甲円 2 個,乙円 1 個,丙円 4 個を容れる。甲円の直径が 17 寸のとき,乙円,丙円の直径はいかほどか。

甲円の半径と中心座標を \(r_1,\ (r_2 + r_1,\ 0)\)
乙円の半径と中心座標を \(r_2,\ (0,\ 0)\)
丙円の半径と中心座標を \(r_3,\ (r_3,\ r_1 - r_3)\)
とおき,以下の連立方程式を解く。

include("julia-source.txt");  # julia-source.txt ソース

using SymPy
@syms r1::positive, r2::positive, r3::positive
eq1 = (r1 + r2 - r3)^2 + (r1 - r3)^2 - (r1 + r3)^2
eq2 = r3^2 + (r1 - r3)^2 - (r2 + r3)^2;
res = solve([eq1, eq2], (r2, r3))[1];

res[1] |> simplify |> println

   r1*(5 - sqrt(17))/2

乙円の半径 \(r_2\) は 甲円の半径 \(r_1\) の \( (5 - \sqrt{17})/2\) 倍である。
甲円の直径が 17 寸のとき,乙円の直径は \(17(5 - \sqrt{17})/2 = 7.453602182249885\) 寸である。

res[2] |> simplify |> println

   r1*(13 - 3*sqrt(17))/2

丙円の半径 \(r_3\) は 甲円の半径 \(r_1\) の \( (13 - 3\sqrt{17})/2\) 倍である。
甲円の直径が 17 寸のとき,乙円の直径は \(17(13 - 3\sqrt{17})/2 = 5.360806546749663\) 寸である。

「答」では,乙円,丙円の直径を 7.135797 寸,5.2469 寸としているが,「術」では丙円の直径を「13 から 153 の平方根を引き甲円の直径の半分を掛ける」,乙円の直径を「甲円の半径から丙円の半径を引き,二乗して丙円の半径の二乗を加えて平方根を求め丙円の半径を引いて二倍する(「小半」は「丙半」の誤記)」と正しい式を与えている。

なお,乙円を求める式は「\(\sqrt{2丙^2 - 2丙\cdot 甲 + 甲^2} - 丙\)」と簡約化できるが,丙に前半で求めた \( (13 - \sqrt{153})\cdot(甲/2)\) を代入して簡約化すれば,前述の「\(甲円\cdot (13 - 3\sqrt{17})/2\)」 になる。

甲 = 17
丙 = (13 - √153)*(甲/2)

   5.360806546749663

2(sqrt( (甲/2 - 丙/2)^2 + (丙/2)^2) - 丙/2)

   7.453602182249876

sqrt(2*丙^2 - 2*丙*甲 + 甲^2) - 丙

   7.453602182249876

@syms 甲::positive, 乙
丙 = (13 - √Sym(153))*(甲/2)
2(sqrt( (甲/2 - 丙/2)^2 + (丙/2)^2) - 丙/2) |> simplify |> sympy.sqrtdenest |> simplify |> println

   甲*(5 - sqrt(17))/2

描画関数プログラムのソースを見る

function draw(r1, more)
    pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
    (r2, r3) = r1 .* ( (5 - sqrt(17))/2, (13 - 3*sqrt(17))/2)
    @printf("甲円の直径が %g のとき,乙円の直径は %g,丙円の直径は %g である。\n", 2r1, 2r2, 2r3)
    @printf("r1 = %g;  r2 = %g;  r3 = %g\n", r1, r2, r3)
    plot( (r2 + 2r1) .* [1, 1, -1, -1, 1], r1 .* [-1, 1, 1, -1, -1], color=:magenta, lw=0.5)
    circle2(r2 + r1, 0, r1)
    circle(0, 0, r2, :green)
    circle4(r3, r1 - r3, r3, :blue)
    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(r2 + r1, 0, "甲円:r1,(r2+r1,0)", :red, :center, delta=-2delta)
        point(0, 0, "乙円:r2", :green, :center, delta=-2delta)
        point(r2, 0, " r2", :green, :left, :bottom, delta=delta/2)
        point(r3, r1 - r3, " 丙円:r3,(r3,r1-r3)", :blue, :left, delta=-2delta)
        point(r2 + 2r1, r1, "(r2+2r1,r1)", :magenta, :right, :bottom, delta=delta)
    end
end;

draw(17/2, true)


以下のアイコンをクリックして応援してください




以上の内容はhttps://sangaku0418.hatenablog.com/entry/2024/08/07/144657より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14