## 2017年12月12日火曜日

### 数学 - Python - 解析学 - 距離空間の位相 - n次元実数空間における曲線(曲線の長さ、パラメーター表示に変換、積分、部分積分法、置換積分法)

1. $\gamma \left(t\right)=\left(t,\frac{{t}^{2}}{2}\right)$

とおく。

$\gamma \text{'}\left(t\right)=\left(1,t\right)$

また、

$0\le x\le 2$

の とき、

$0\le t\le 2$

よって、もとめる長さは

$\begin{array}{}L\left(t\right)\\ ={\int }_{0}^{2}\left|\gamma \text{'}\left(t\right)\right|\mathrm{dt}\\ ={\int }_{0}^{2}\sqrt{1+{t}^{2}}\mathrm{dt}\\ ={\left[t\sqrt{1+{t}^{2}}\right]}_{0}^{2}-{\int }_{0}^{2}t·\frac{1}{2}{\left(1+{t}^{2}\right)}^{-\frac{1}{2}}·2t\mathrm{dt}\\ =2\sqrt{5}-{\int }_{0}^{2}\frac{{t}^{2}}{\sqrt{1+{t}^{2}}}\mathrm{dt}\\ =2\sqrt{5}-{\int }_{0}^{2}\frac{{t}^{2}+1-1}{\sqrt{1+{t}^{2}}}\mathrm{dt}\\ =2\sqrt{5}-{\int }_{0}^{2}\sqrt{1+{t}^{2}}\mathrm{dt}+{\int }_{0}^{2}\frac{1}{\sqrt{1+{t}^{2}}}\mathrm{dt}\\ =2\sqrt{5}-L\left(t\right)+{\int }_{0}^{2}\frac{1}{\sqrt{1+{t}^{2}}}\mathrm{dt}\\ 2L\left(t\right)=2\sqrt{5}+{\int }_{0}^{2}\frac{1}{\sqrt{1+{t}^{2}}}\mathrm{dt}\end{array}$
$\begin{array}{}\sqrt{1+{t}^{2}}+t=u\\ \frac{du}{\mathrm{dt}}=\frac{2t}{2\sqrt{1+{t}^{2}}}+1\\ =\frac{t}{\sqrt{1+{t}^{2}}}+1\\ =\frac{t+\sqrt{1+{t}^{2}}}{\sqrt{1+{t}^{2}}}\\ =\frac{u}{\sqrt{1+{t}^{2}}}\\ \mathrm{dt}=\frac{\sqrt{1+{t}^{2}}}{u}du\\ 0\le t\le 2\\ 1\le u\le \sqrt{5}+2\end{array}$
$\begin{array}{}2L\left(t\right)=2\sqrt{5}+{\int }_{1}^{\sqrt{5}+2}\frac{1}{u}du\\ =2\sqrt{5}+{\left[\mathrm{log}u\right]}_{1}^{\sqrt{5}+2}\\ =2\sqrt{5}+\mathrm{log}\left(\sqrt{5}+2\right)\\ L\left(t\right)=\sqrt{5}+\frac{\mathrm{log}\left(\sqrt{5}+2\right)}{2}\end{array}$

コード(Emacs)

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, sqrt, Integral

t = symbols('t')
f = sqrt(1 + t ** 2)
I = Integral(f, (t, 0, 2))

for o in [I, I.doit()]:
pprint(o)
print()


$./sample4.py 2 ⌠ ⎮ ________ ⎮ ╱ 2 ⎮ ╲╱ t + 1 dt ⌡ 0 asinh(2) ──────── + √5 2$