一七 埼玉県大里郡岡部村岡 稲荷社 文化13年(1816)
埼玉県立図書館:埼玉県史料集 第二集『埼玉の算額』,昭和44年,誠美堂印刷所,埼玉県与野市.
キーワード:円3個,長方形,斜線
#Julia #SymPy #算額 #和算 #数学
長方形の中に斜線,大円,小円を容れる。長方形の長辺,短辺が 6 寸,2 寸のとき,小円の直径はいかほどか。

長方形の長辺,短辺を \(2a,\ 2b\)
斜線と長辺の交点座標を \( (c,\ b),\ (c,\ -b)\)
大円の半径と中心座標を \(r_1,\ (0,\ 0);\ r_1 = b\)
小円の半径と中心座標を \(r_2,\ (a - r_2,\ 0)\)
とおき,以下の連立方程式を解く。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms a::positive, b::positive, c::positive,
r1::positive, r2::positive
r1 = b
eq1 = dist2(a, -b, c, b, a - r2, 0, r2)
eq2 = dist2(a, -b, c, b, 0, 0, r1);
res = solve([eq1, eq2], (r2, c))[2]
( (a*b - b^2)/(a + b), b^2/a)
小円の直径は \(\displaystyle \frac{2b(a - b)}{a + b}\) である。
長辺 a = 6/2 寸,b = 2/2 寸のとき,小円の直径は 1 寸である。
a = 6/2
b = 2/2
2b*(a - b)/(a + b)
1.0
描画関数プログラムのソースを見る
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
(a, b) = (6, 2) ./ 2
(r2, c) = ( (a*b - b^2)/(a + b), b^2/a)
r1 = b
plot([a, a, -a, -a, a], [-b, b, b, -b, -b], color=:blue, lw=0.5)
circle(0, 0, r1)
circle2(a - r2, 0, r2, :magenta)
segment(a, -b, c, b, :green)
segment(a, b, c, -b, :green)
segment(-a, -b, -c, b, :green)
segment(-a, b, -c, -b, :green)
if more
delta = (fontheight = (ylims()[2]- ylims()[1]) / 500 * 10 * 2) /3 # size[2] * fontsize * 2
hline!([0], color=:black, lw=0.5)
vline!([0], color=:gray80, lw=0.5)
point(c, b, "(c,b)", :green, :center, :bottom, delta=2delta)
point(a, b, "(a,b)", :green, :center, :bottom, delta=2delta)
point(0, 0, "大円:r1,(0,0)", :red, :center, delta=-2delta)
point(a - r2, 0, "小円:r2\n(a-r2,0)", :magenta, :center, :bottom, delta=delta)
end
end;
以下のアイコンをクリックして応援してください