以下の内容はhttps://sangaku0418.hatenablog.com/entry/2024/06/15/161854より取得しました。


算額(その1066)

九十六 岩手県大船渡市立根町 気仙安養寺稲荷堂 文政5年(1822)

山村善夫:現存 岩手の算額,昭和52年1月30日,熊谷印刷,盛岡市. http://www.wasan.jp/yamamura/yamamura.html
キーワード:円6個,外円,正三角形,正方形
#Julia #SymPy #算額 #和算 #数学


大円内に正三角形 4 個,中円 1 個と小円 4 個を容れる。小円の直径がわかっているとき中円の直径を求めるすべを求めよ。

算額(その841)」の中央の正方形内に円を内接させただけのものである。条件式は同じなので,何を未知数にして解くかの違いにすぎない。

大円の半径と中心座標を \(R,\ (0,\ 0)\)
正三角形の一辺の長さを \(2a\)
とおき,以下の方程式を解く。

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

using SymPy

@syms R::positive, a::positive, r::positive;
R = (1 + sqrt(Sym(3)))a
eq1 = dist(R, 0, a, a, (R - r)/sqrt(Sym(2)), (R - r)/sqrt(Sym(2))) - r^2
res = solve(eq1, a)[2];

@syms d
res = res/r |> simplify |> (x -> apart(x, d)) |> factor |> (x -> x*r);
res |> println

   -r*(-10 - 3*sqrt(6) + 3*sqrt(2) + 4*sqrt(3))/4

小円の直径が 1 のとき,中円の直径は 1.54440632773869 である。

res(r => 1).evalf() |> println

   1.54440632773869

小円の直径が 1 のとき,大円の直径は 4.219396554912972 である。

R = (1 + √3) * 1.54440632773869
R |> println

   4.219396554912972

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

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   r = 1/2
   a = r*(10 + 3√6 - 3√2 - 4√3)/4
   R = (1 + √3)a
   @printf("小円の直径 = %g;  大円の直径 = %g;  中円の直径 = %g\n", 2r, 2R, 2a)
   plot([a, a, -a, -a, a], [ -a, a, a, -a, -a], color=:blue, lw=0.5)
   circle(0, 0, R, :green)
   # R2 = (4√6 - 1)/4
   # circle(0, 0, R2, :black)
   circle4( (R - r)/√2, (R - r)/√2, r)
   circle(0, 0, a, :orange)
   for i in 0:3
       deg = 90i
       plot!([√2a*cosd(deg + 45), R*cosd(deg), √2a*cosd(deg - 45)],
             [√2a*sind(deg + 45), R*sind(deg), √2a*sind(deg - 45)], color=:magenta, lw=0.5)
   end
   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(a, a, "(a,a) ", :blue, :right, delta=-delta/2)
       point(0, (1 + √3)a, " R=(1+√3)a", :green, :center, :bottom, delta=delta/2)
       point( (R - r)/√2, (R - r)/√2, "( (R-r)/√2,\n(R-r)/√2)", :red, :center, :bottom, delta=delta/2)
   end
end;


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




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

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