## 2019年3月6日水曜日

### 数学 - Python - 解析学 - 積分 - 積分の応用 - 回転体の体積(三角関数(正弦と余弦)、平方根、分数、部分積分法、対数関数、x軸の周りに回転してできる立体の体積、極限、収束、発散、広義積分)

1. $\begin{array}{}\int \pi {y}^{2}\mathrm{dx}\\ =\pi \int {\left(\frac{\mathrm{cos}x}{\sqrt{\mathrm{sin}x}}\right)}^{2}\mathrm{dx}\text{'}\\ =\pi \int \frac{{\mathrm{cos}}^{2}x}{\mathrm{sin}x}\mathrm{dx}\end{array}$

部分積分法。

$\begin{array}{}\int \frac{{\mathrm{cos}}^{2}x}{\mathrm{sin}x}\mathrm{dx}\\ =\mathrm{sin}x·\frac{\mathrm{cos}x}{\mathrm{sin}x}-\int \mathrm{sin}x·\frac{-{\mathrm{sin}}^{2}x-{\mathrm{cos}}^{2}x}{{\mathrm{sin}}^{2}x}\mathrm{dx}\\ =\mathrm{cos}x+\int \frac{1}{\mathrm{sin}x}\mathrm{dx}\end{array}$

2つ目の積分について試行錯誤。

$\begin{array}{}\frac{d}{\mathrm{dx}}\mathrm{log}\left(\mathrm{sin}x\right)\\ =\frac{-\mathrm{cos}x}{\mathrm{sin}x}\\ \frac{d}{\mathrm{dx}}\mathrm{log}\frac{\mathrm{cos}x}{\mathrm{sin}x}\\ =\frac{\mathrm{sin}x}{\mathrm{cos}x}·\frac{{\mathrm{cos}}^{2}x+{\mathrm{sin}}^{2}x}{{\mathrm{sin}}^{2}x}\\ =\frac{1}{\mathrm{cos}x\mathrm{sin}x}\\ \frac{d}{\mathrm{dx}}\mathrm{log}\frac{1-\mathrm{cos}x}{\mathrm{sin}x}\\ =\frac{\mathrm{sin}x}{1-\mathrm{cos}x}·\frac{{\mathrm{sin}}^{2}x-\left(1-\mathrm{cos}x\right)\mathrm{cos}x}{{\mathrm{sin}}^{2}x}\\ =\frac{1}{1-\mathrm{cos}x}·\frac{{\mathrm{sin}}^{2}x+{\mathrm{cos}}^{2}x-\mathrm{cos}x}{\mathrm{sin}x}\\ =\frac{1-\mathrm{cos}x}{\left(1-\mathrm{cos}x\right)\mathrm{sin}x}\\ =\frac{1}{\mathrm{sin}x}\end{array}$

よって、

$\begin{array}{}\int \frac{{\mathrm{cos}}^{2}x}{\mathrm{sin}x}\mathrm{dx}\\ =\mathrm{cos}x+\mathrm{log}\frac{1-\mathrm{cos}x}{\mathrm{sin}x}\end{array}$

ゆえに、 求める回転体の体積は、

$\begin{array}{}\pi {\left[\mathrm{cos}x+\mathrm{log}\frac{1-\mathrm{cos}x}{\mathrm{sin}x}\right]}_{a}^{\frac{\pi }{4}}\\ =\pi \left(\left(\mathrm{cos}\frac{\pi }{4}+\mathrm{log}\frac{1-\mathrm{cos}\frac{\pi }{4}}{\mathrm{sin}\frac{\pi }{4}}\right)-\left(\mathrm{cos}a+\mathrm{log}\frac{1-\mathrm{cos}a}{\mathrm{sin}a}\right)\right)\\ =\pi \left(\frac{1}{\sqrt{2}}+\mathrm{log}\frac{1-\frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}-\mathrm{cos}a-\mathrm{log}\frac{1-\mathrm{cos}a}{\mathrm{sin}a}\right)\\ =\pi \left(\frac{1}{\sqrt{2}}+\mathrm{log}\left(\sqrt{2}-1\right)-\mathrm{cos}a-\mathrm{log}\frac{1-\mathrm{cos}a}{\mathrm{sin}a}\right)\end{array}$

a が0に近づくとき、

$\underset{a\to 0}{\mathrm{lim}}\pi \left(\frac{1}{\sqrt{2}}+\mathrm{log}\left(\sqrt{2}-1\right)-\mathrm{cos}a-\mathrm{log}\frac{1-\mathrm{cos}a}{\mathrm{sin}a}\right)=\infty$

よって発散するので極限値をもたない。

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, pi, plot, Limit, sqrt, cos, sin

x, a = symbols('x, a')
f = cos(x) / sqrt(sin(x))
x1, x2 = a, pi / 4

I = Integral(pi * f ** 2, (x, x1, x2))
V = I.doit()
l = Limit(V, a, 0)
for o in [I, V, l, l.doit()]:
pprint(o.simplify())
print()

x0 = 0
x1 = pi / 8
x3 = pi
p = plot((f, (x, x0, x1)),
(f, (x, x1, x2)),
(f, (x, x2, x3)),
ylim=(-10, 10),
legend=True, show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange', 'purple']
for s, color in zip(p, colors):
s.line_color = color

p.show()
p.save('sample17.png')


C:\Users\...> py -3 sample16.py
1
⌠
⎮ π
⎮ ── dx
⎮  2
⎮ x
⌡
a

π
-π + ─
a

⎛     π⎞
lim ⎜-π + ─⎟
a─→0⁺⎝     a⎠

∞

C:\Users\...>