長野県東御市祢津 長命寺大日如来堂 嘉永6年(1853)
中村信弥「改訂増補 長野県の算額」県内の算額(P.184)
http://www.wasan.jp/zoho/zoho.html
キーワード:外円,長方形
#Julia #SymPy #算額 #和算 #数学
外円内に長方形を 5 個入れる。それぞれの長方形の長辺の 2 頂点は外円の円周上にあり,残りの 2 頂点は隣の長方形と共有している。
5 個の面積の和が最大になるのは,長辺がいかほどのときか。

外円の半径を \(R\),内側の 5 角形が内接する円の半径を \(r\) として,長方形の頂点座標 \( (x,\ y)\, (x,\ \sqrt{R^2 - x^2})\) を求める。
長方形の面積の和は \(5(2x(\sqrt{R^2 - x^2} - y))\) である。
include("julia-source.txt"); # julia-source.txt ソース
using SymPy
@syms R, r
R = 55//2
(x, y) = r .* (cosd(Sym(54)), sind(Sym(54)))
eq = 5(2x * (sqrt(R^2 - x^2) - y))
eq |> println
10*r*sqrt(5/8 - sqrt(5)/8)*(-r*(1/4 + sqrt(5)/4) + sqrt(-r^2*(5/8 - sqrt(5)/8) + 3025/4))
この式の値は \(r\) により変化するが,\(r = 14\) 近辺で最大値を取ることがわかる。
using Plots
pyplot(size=(400, 250), grid=false, aspectratio=:none, label="")
plot(eq, xlims=(0,55/2))
vline!([sqrt(-1/(-28 + 12*sqrt(5)))*sqrt(15125 - 6655*sqrt(5))])
hline!([1228.6026013806772])

eq が最大値となるのは,eq の導関数が 0 になるときである。
g = diff(eq);
plot(g, xlims=(0,55/2))
vline!([sqrt(-1/(-28 + 12*sqrt(5)))*sqrt(15125 - 6655*sqrt(5))])
hline!([0])

導関数が 0 になるのは \(r = 14.4576055832762\) のときである。
res = solve(g)[2]
res |> println
sqrt(-1/(-28 + 12*sqrt(5)))*sqrt(15125 - 6655*sqrt(5))
res.evalf() |> println
14.4576055832762
最大値は 1228.60260138068 である。
eq(r => 14.4576055832762).evalf() |> println
1228.60260138068
\(r = 14.4576055832762\) のとき,長方形の長辺が 16.995934690622075,短辺が 14.457605583276203 である。
r = 14.4576055832762
2r*cosd(54) |> println
sqrt(R^2 - (r*cosd(54))^2) - r*sind(54) |> println
16.99593469062214
14.457605583276148
描画関数プログラムのソースを見る
function draw(more=false)
pyplot(size=(500, 500), grid=false, aspectratio=1, label="", fontfamily="IPAMincho")
R = 55/2
r = sqrt(-1/(-28 + 12*sqrt(5)))*sqrt(15125 - 6655*sqrt(5))
plot()
circle(0, 0, R, :blue)
circle(0, 0, r, :blue)
(x0, y0) = R .* (cosd(54), sind(54))
segment(0, 0, x0, y0)
segment(0, 0, -x0, y0)
(x, y) = r .* (cosd(54), sind(54))
rect(-x, y, x, sqrt(R^2 - x^2), :red)
long = 2x
short = sqrt(R^2 - x^2) - y
@printf("長方形: 長辺 = %.15g; 短辺 = %.15g; 5個の面積 = %.15g\n", long, short, 5long*short)
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=:black, lw=0.5)
point(x, y, " (x,y)", :red, :left, :vcenter)
point(x, sqrt(R^2 - x^2), " (x,sqrt(R^2-x^2))", :red, :left, :vcenter)
point(R, 0, "R ", :blue, :right, :bottom, delta=delta/2)
point(r, 0, "r ", :blue, :right, :bottom, delta=delta/2)
circle(0, 0, 2, :green, beginangle=0, endangle=54)
circle(0, 0, 2.2, :green, beginangle=0, endangle=54)
point(2.4, 2, "θ=54°", mark=false)
end
end;
以下のアイコンをクリックして応援してください