裏 RjpWiki

Julia ときどき R, Python によるコンピュータプログラム,コンピュータ・サイエンス,統計学

算額(その454)

2023年10月06日 | Julia

算額(その454)

数学史研究,通巻 186 号,2005年7月〜9月
http://www.wasan.jp/sugakusipdf/186.pdf

中村正教(1937):「伊額二十二」昭和12年
算額(その298)https://blog.goo.ne.jp/r-de-r/s/%E3%81%9D%E3%81%AE298 より

半円内に二個の等円が入っている。等円の直径を斜の長さで表わせ。

半円の半径と中心座標を r0, (0, 0)
等円の半径と中心座標を r1, (r1, r1)
斜の長さを a
とおく。

a = √2r0 である。

include("julia-source.txt")

using SymPy

@syms r0::positive, r1::positive, a::positive;

a = sqrt(Sym(2))r0
eq = 2r1^2 - (r0 - r1)^2
res = solve(eq, r1)[1]
res |> println

   r0*(-1 + sqrt(2))

r0 = a/√2 を代入する。

res(r0 => a/sqrt(Sym(2))) |> simplify |> println

   a*(2 - sqrt(2))/2

すなわち,等円の直径は (2 - √2)a である。

using Plots

function draw(more=false)
   pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
   a = 10
   r0 = a/√2
   r1 = (2 - √2)a/2
   plot([-r0, 0, r0], [0, r0, 0], color=:gray, lw=0.5)
   circle(0, 0, r0, beginangle=0, endangle=180)
   circle(r1, r1, r1, :blue)
   circle(-r1, r1, r1, :blue)
   if more
       delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /  3  # size[2] * fontsize * 2
       point(r1, r1, "等円:r1,(r1,r1)  ", :blue, :center, :top, delta=-2delta)
       point(0, r0, " r0", :red, :left, :bottom, delta=delta)
       hline!([0], color=:gray, lw=0.5)
       vline!([0], color=:gray, lw=0.5)
   else
      plot!(showaxis=false)
   end
end;


コメント    この記事についてブログを書く
  • X
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする
« 算額(その453) | トップ | Julia: モンティ・ホール問題... »
最新の画像もっと見る

コメントを投稿

Julia」カテゴリの最新記事