百三 群馬県高崎市八幡町 八幡宮 安政7年(1860)
群馬県和算研究会:群馬の算額,上武印刷株式会社,高崎市,1987年3月31日.
キーワード:円1個,扇
#Julia #SymPy #算額 #和算 #数学
扇型の中に円を容れる。円の直径が与えられたとき,黒積(扇型の面積から円の面積を除いた面積)が最小になる扇長(扇の要から先端までの長さ)を求めよ。

扇長を \(R\)(要は \( (0, 0)\) にあるとする)
円の半径と中心座標を \(r, (0, R - r)\)
とおくと,黒積は \(\pi R^2\text{asind}(r/(R - r))/180 - \pi r^2\) である。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms R, r
黒積 = PI*R^2*asind(r/(R - r))/180 - PI*r^2
\(\displaystyle R^{2} \operatorname{asin}{\left(\frac{r}{R - r} \right)} - \pi r^{2}\)
円の半径が与えられたとき(たとえば \(r = 1/2\)),扇長 \(R\) が 1.2 より大きいところで黒積は最小になることがわかる。
pyplot(size=(400, 300), grid=false, aspectratio=:none, label="", fontfamily="IPAMincho")
plot(黒積(r => 1/2), xlims=(1, 2.4), xlabel="扇長", ylabel="黒積")

黒積が最小になるときの扇長は,黒積を扇長で微分し,それが 0 になるときの扇長を求めればよい。
g = diff(黒積(r => 1/2), R)
\(\displaystyle - \frac{0.5 R^{2}}{\sqrt{1 - \frac{0.25}{\left(R - 0.5\right)^{2}}} \left(R - 0.5\right)^{2}} + 2 R \operatorname{asin}{\left(\frac{0.5}{R - 0.5} \right)}\)
SymPy は asin() を含む方程式を解くことができない(未実装?)ので,数値解を求める。
using Roots
ans_R = find_zero(g, 1.1, 1.8)
1.2669487851974108
円の直径が \(d = 1\) のときには,扇長が \(1.2669487851974108\cdot d\) のとき,黒積は最小値 \(0.354477073410678 \cdot d^2\) をとる。
黒積(r => 1/2, R => ans_R).evalf() |> println
0.354477073410678
描画関数プログラムのソースを見る
function draw(r, more)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
R = 2.5338975703948217*r
黒積 = π*R^2*asind(r/(R - r))/180 - π*r^2
@printf("円の直径が %g のとき,扇長が %g のとき,黒積は最小値 %g を取る。\n", 2r, R, 黒積)
θ = asind(r/(R - r))
x0 = R*sind(θ)
y0 = R*cosd(θ)
φ = 90 - θ:0.01:90 + θ
x = R.*cosd.(φ)
y = R.*sind.(φ)
x = vcat(0, x, 0)
y = vcat(0, y, 0)
plot(x, y, seriestype=:shape, color=:black, fillcolor=:gray70)
#circle(0, 0, R, beginangle=90 - θ, endangle=90 + θ)
circlef(0, R - r, r, :white)
circle(0, R - r, r, :black)
segment(0, 0, x0, y0, :black, lw=0.5)
segment(0, 0, -x0, y0, :black, 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)
dimension_line(2delta, -2delta, x0 + 2delta, y0 - 2delta, " 扇長 R", :red, :left, :vcenter, length=0.05R)
point(0, R - r, "円:r,(0,R-r)", :red, :center, delta=-delta)
end
end;
draw(1/2, true)
以下のアイコンをクリックして応援してください