学習環境
- Surface Go、タイプ カバー、ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門 原書第3版 (S.ラング(著)、松坂 和夫(翻訳)、片山 孝次(翻訳)、岩波書店)の第3部(積分)、第13章(積分の応用)、補充問題、曲線の長さの練習問題17の解答を求めてみる。
いろいろと微分してみる。
よって、求める曲線の長さは、
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, Derivative, sqrt, cos, sin, pi
from sympy import Rational, log
from sympy.plotting import plot_parametric
theta = symbols('θ')
r = 2 / theta
x = r * cos(theta)
y = r * sin(theta)
I = Integral(sqrt(r ** 2 + Derivative(r, theta, 1) ** 2),
(theta, Rational(1, 2), 4))
for o in [I, I.doit()]:
pprint(o.simplify())
print()
I = 2 * Integral(sqrt(theta ** 2 + 1) / theta ** 2, (theta, Rational(1, 2), 4))
for o in [I, I.doit()]:
pprint(o.simplify())
print()
for o in [I.doit(),
2 * sqrt(5) - sqrt(17) / 2 + 2 *
log((8 + 2 * sqrt(17)) / (1 + sqrt(5)))]:
print(float(o))
p = plot_parametric((x, y, (theta, Rational(1, 3), Rational(1, 2))),
(x, y, (theta, Rational(1, 2), 4)),
(x, y, (theta, 4, 5)),
show=False)
colors = ['red', 'green', 'blue']
for i, color in enumerate(colors):
p[i].line_color = color
p.save('sample17.png')
入出力結果(cmd(コマンドプロンプト)、Terminal、Jupyter(IPython))
$ python3 sample17.py 4 ⌠ ⎮ _______________ ⎮ ╱ 2 ⎮ ╱ ⎛d ⎛2⎞⎞ 4 ⎮ ╱ ⎜──⎜─⎟⎟ + ── dθ ⎮ ╱ ⎝dθ⎝θ⎠⎠ 2 ⎮ ╲╱ θ ⌡ 1/2 4 ⌠ ⎮ ________ ⎮ ╱ 2 ⎮ ╱ θ + 1 2⋅ ⎮ ╱ ────── dθ ⎮ ╱ 4 ⎮ ╲╱ θ ⌡ 1/2 4 ⌠ ⎮ ________ ⎮ ╱ 2 ⎮ ╲╱ θ + 1 2⋅ ⎮ ─────────── dθ ⎮ 2 ⎮ θ ⌡ 1/2 √17 - ─── - 2⋅asinh(1/2) + 2⋅asinh(4) + 2⋅√5 2 5.637584586593745 5.637584586593745 $
0 コメント:
コメントを投稿