学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
解析入門〈3〉(松坂 和夫(著)、岩波書店)の第12章(距離空間の位相)、12.4(n次元実数空間における曲線)、問題3.を取り組んでみる。
長さ。
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, Matrix, sin, cos, Derivative, Integral, pi
a, b, t = symbols('a, b, t', real=True)
f = Matrix([a * cos(t), a * sin(t), b * t])
D = Matrix([Derivative(x, t, 1) for x in f])
f1 = D.doit()
for g in [f, D, f1]:
pprint(g)
print()
I = Integral(f1.norm(), (t, 0, 2 * pi))
for s in [I, I.doit()]:
pprint(s)
print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample3.py
⎡a⋅cos(t)⎤
⎢ ⎥
⎢a⋅sin(t)⎥
⎢ ⎥
⎣ b⋅t ⎦
⎡∂ ⎤
⎢──(a⋅cos(t))⎥
⎢∂t ⎥
⎢ ⎥
⎢∂ ⎥
⎢──(a⋅sin(t))⎥
⎢∂t ⎥
⎢ ⎥
⎢ ∂ ⎥
⎢ ──(b⋅t) ⎥
⎣ ∂t ⎦
⎡-a⋅sin(t)⎤
⎢ ⎥
⎢a⋅cos(t) ⎥
⎢ ⎥
⎣ b ⎦
2⋅π
⌠
⎮ ______________________________
⎮ ╱ 2 2 2 2 2
⎮ ╲╱ a ⋅sin (t) + a ⋅cos (t) + b dt
⌡
0
_________
╱ 2 2
2⋅π⋅╲╱ a + b
$
0 コメント:
コメントを投稿