## 2019年1月18日金曜日

### 数学 - Python - 解析学 - 積分 - 積分の応用 - 曲線の長さ(パラメータ表示、累乗(べき乗、平方)、平方根)

1. $\begin{array}{}\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\sqrt{{\left(\frac{d}{\mathrm{dt}}9{t}^{2}\right)}^{2}+{\left(\frac{d}{\mathrm{dt}}\left(9{t}^{3}-3t\right)\right)}^{2}}\mathrm{dt}\\ =\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\sqrt{{\left({3}^{2}·2t\right)}^{2}+{\left({3}^{2}·3{t}^{2}-3\right)}^{2}}\mathrm{dt}\\ =\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\sqrt{{3}^{6}{t}^{4}+{2}^{2}·{3}^{4}{t}^{2}-2·{3}^{4}{t}^{2}+{3}^{2}}\mathrm{dt}\\ \frac{1}{\sqrt{3}}\\ =3\int \sqrt{{3}^{4}{t}^{4}+{2}^{2}·{3}^{2}{t}^{2}-2·{3}^{2}{t}^{2}+1}\mathrm{dt}\\ =3\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\sqrt{{3}^{4}{t}^{4}+2·{3}^{2}{t}^{2}+1}\mathrm{dt}\\ =3\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\sqrt{{\left({3}^{2}{t}^{2}+1\right)}^{2}}\mathrm{dt}\\ =3\underset{0}{\overset{\frac{1}{\sqrt{3}}}{\int }}\left({3}^{2}{t}^{2}+1\right)\mathrm{dt}\\ =3\left[3{t}^{3}+t\right]\frac{1}{\sqrt[0]{3}}\\ =3\left(3·\frac{1}{3\sqrt{3}}+\frac{1}{\sqrt{3}}\right)\\ =\frac{6}{\sqrt{3}}\\ =2\sqrt{3}\end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, Derivative, plot, sqrt
from sympy.plotting import plot_parametric

t = symbols('t', real=True)

x = 9 * t ** 2
y = 9 * t ** 3 - 3 * t
I = Integral(sqrt(Derivative(x, t, 1) ** 2 +
Derivative(y, t, 1) ** 2), (t, 0, 1 / sqrt(3)))

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

p = plot_parametric((x, y, (t, -1, 0)),
(x, y, (t, 0, 1 / sqrt(3))),
(x, y, (t, 1 / sqrt(3), 1)),
legend=True,
show=False)
colors = ['red', 'green', 'blue']
for i, color in enumerate(colors):
p[i].line_color = color
p.save('sample7.png')


$python3 sample7.py √3 ── 3 ⌠ ⎮ _________________________________ ⎮ ╱ 2 2 ⎮ ╱ ⎛d ⎛ 2⎞⎞ ⎛d ⎛ 3 ⎞⎞ ⎮ ╱ ⎜──⎝9⋅t ⎠⎟ + ⎜──⎝9⋅t - 3⋅t⎠⎟ dt ⎮ ╲╱ ⎝dt ⎠ ⎝dt ⎠ ⌡ 0 √3 √3 ── ── 3 3 ⌠ ⌠ ⎮ 2 3⋅⎮ 1 dt + 3⋅⎮ 9⋅t dt ⌡ ⌡ 0 0 2⋅√3$