以下の内容はhttps://sangaku0418.hatenablog.com/entry/2025/04/22/より取得しました。


算額(その1694)

56 岩手県花泉町金沢字大門沢 大門神社 慶應2年(1866)

安富有恒:和算—岩手の現存算額のすべて,青磁社,東京都,1987.
http://www.wasan.jp/iwatenosangaku_yasutomi.pdf
キーワード:円5個,半楕円,長方形
#Julia, #SymPy, #算額, #和算


長方形の中に 4 個の等半楕円と 5 個の等円を容れる。半楕円と 2 個の等円は 1 点で接している。楕円の短径が 1 寸のとき,長径はいかほどか。

右下の楕円の長半径,短半径,中心座標を \(a,\ b,\ (a,\ 0)\)
等円の半径と中心座標を \(r,\ (x, 0),\ (0,\ b)\)
共通接点の座標を \( (x_0,\ y_0)\)
とおき,以下の連立方程式を解く。
eq1 は算法助術の公式84,eq2 は算法助術の公式99 である。

include("julia-source.txt");  # julia-source.txt ソース
using SymPy
@syms r::positive, a::positive, b::positive,
      x::positive
eq1 = (a - x)^2 - (a^2 - b^2)*(b^2 - r^2)/b^2
eq2 = b^2 - 4r^2*(a^2*r^2 - b^4)/(a^2 - b^2)/r^2
eq3 = x^2 + b^2 - 4r^2
res = solve([eq1, eq2, eq3], (a, r, x))[1]  # 1 of 2

    (b*sqrt(-3 + 2*sqrt(3))*(sqrt(3) + 2), b*sqrt(-2 + 2*sqrt(3))/2, b*sqrt(-3 + 2*sqrt(3)))

# a: 楕円の長半径
ans_a = res[1] |> sympy.sqrtdenest |> simplify
@show(ans_a)

    ans_a = sqrt(2)*3^(1/4)*b*(1 + sqrt(3))/2

    \(\displaystyle \frac{\sqrt{2} \sqrt[4]{3} b \left(1 + \sqrt{3}\right)}{2}\)

ans_a(b => 1/2).evalf()

    \(1.27122987841871\)

短半径が 1/2 のとき,長半径は 1.2712298784187062(短径が 1 のとき,長径は 2.5424597568374123)である。

術は「短径の sqrt(√12 +3) 倍が長径である」ということで,等価の式である。

sqrt(Sym(2))*3^(Sym(1)//4)*(1 + sqrt(Sym(3)))/2 - sqrt(√Sym(12) + 3) |> simplify

    \(0\)

# r: 等円の半径
ans_r = res[2]
@show(ans_r)

    ans_r = b*sqrt(-2 + 2*sqrt(3))/2

    \(\displaystyle \frac{b \sqrt{-2 + 2 \sqrt{3}}}{2}\)

ans_r(b => 1/2).evalf() |> println

    0.302500166853028

# x: 等円の中心座標
ans_x = res[3]
@show(ans_x)

    ans_x = b*sqrt(-3 + 2*sqrt(3))

    \(b \sqrt{-3 + 2 \sqrt{3}}\)

ans_x(b => 1/2).evalf() |> println

    0.340625019316607

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

function ellipse2(ox, oy, a, b, color=:red; beginangle=0, endangle=360)
    θ = range(beginangle, endangle, length=500)
    x = ox .+ a*cosd.(θ)
    y = oy .+ b*sind.(θ)
    plot!(x, y, color=color, lw=0.5)
end;

function draw(b, more)
    pyplot(size=(500, 500), grid=false, aspectratio=1, showaxis=false, label="", fontfamily="IPAMincho")
    a = sqrt(2)*3^(1/4)*b*(1 + sqrt(3))/2
    r = b*sqrt(-2 + 2*sqrt(3))/2
    x = b*sqrt(-3 + 2*sqrt(3))
    @printf("楕円の短径が %g のとき,長径は %g である。\n", 2b, 2a)
    plot([-a, a, a, -a, -a], [-b, -b, 3b, 3b, -b], color=:green, lw=0.5)
    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)
    end
    ellipse2(a, 0, a, b, beginangle=90, endangle=270)
    ellipse2(a, 2b, a, b, beginangle=90, endangle=270)
    ellipse2(-a, 0, a, b, beginangle=-90, endangle=90)
    ellipse2(-a, 2b, a, b, beginangle=-90, endangle=90)
    circle(0, b, r, :blue)
    circle(x, 0, r, :blue)
    circle(x, 2b, r, :blue)
    circle(-x, 0, r, :blue)
    circle(-x, 2b, r, :blue)
    if more
        point(x, 0, "等円:r,(x,0)", :blue, :center, delta=-delta)
        point(0, b, "等円:r,(0,b)", :blue, :center, delta=-delta)
        point(a, 0, "(a,0)", :red, :right, :bottom, delta=delta)
        point(a, b, "(a,b)", :red, :right, :bottom, delta=delta)
    end
end;
draw(1/2, true)

    楕円の短径が 1 のとき,長径は 2.54246 である。

 

「算額あれこれ」の全ページの索引


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




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

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