## 2019年8月27日火曜日

### 数学 - Python - 解析学 - 級数 - 積分による判定法 - 対数関数の累乗(べき乗、立方)、累乗(べき乗、平方)、逆数、収束

1. $\begin{array}{l}\int \frac{{\left(\mathrm{log}x\right)}^{3}}{{x}^{2}}\mathrm{dx}\\ =-{x}^{-1}{\left(\mathrm{log}x\right)}^{3}+\int {x}^{-1}3{\left(\mathrm{log}x\right)}^{2}·{x}^{-1}\mathrm{dx}\\ =-{x}^{-1}{\left(\mathrm{log}x\right)}^{3}+3\int {x}^{-2}{\left(\mathrm{log}x\right)}^{2}\mathrm{dx}\\ \int {x}^{-2}{\left(\mathrm{log}x\right)}^{2}dx\\ =-{x}^{-1}{\left(\mathrm{log}x\right)}^{2}+\int {x}^{-1}2\left(\mathrm{log}x\right){x}^{-1}\mathrm{dx}\\ =-{x}^{-1}{\left(\mathrm{log}x\right)}^{3}+2\int {x}^{-2}\mathrm{log}xdx\\ \int {x}^{-2}\mathrm{log}xdx\\ =-{x}^{-1}\mathrm{log}x+\int {x}^{-1}·{x}^{-1}\mathrm{dx}\\ =-{x}^{-1}\mathrm{log}x+\int {x}^{-2}dx\\ =-{x}^{-1}\mathrm{log}x-{x}^{-1}\\ =-{x}^{-1}\left(\mathrm{log}x+1\right)\\ -{x}^{-1}{\left(\mathrm{log}x\right)}^{3}-2{x}^{-1}\left(\mathrm{log}x+1\right)\\ =-{x}^{-1}\left({\left(\mathrm{log}x\right)}^{3}+2\mathrm{log}x+2\right)\\ -{x}^{-1}{\left(\mathrm{log}x\right)}^{3}-3{x}^{-1}\left({\left(\mathrm{log}x\right)}^{3}+2\mathrm{log}x+2\right)\\ =-{x}^{-1}\left({\left(\mathrm{log}x\right)}^{3}+3{\left(\mathrm{log}x\right)}^{3}+6\mathrm{log}x+6\right)\\ =-{x}^{-1}\left(4{\left(\mathrm{log}x\right)}^{3}+6\mathrm{log}x+6\right)\end{array}$

よって、

$\begin{array}{l}\underset{b\to \infty }{\mathrm{lim}}{\int }_{1}^{b}\frac{{\left(\mathrm{log}x\right)}^{3}}{{x}^{2}}\mathrm{dx}\\ =\underset{b\to \infty }{\mathrm{lim}}{\left[-{x}^{-1}\left(4{\left(\mathrm{log}x\right)}^{3}+6\mathrm{log}x+6\right)\right]}_{1}^{b}\\ =\underset{b\to \infty }{\mathrm{lim}}\left(-{b}^{-1}\left(4{\left(\mathrm{log}b\right)}^{3}+6\mathrm{log}b+6\right)+6\right)\\ =6\end{array}$

ゆえに、問題の無限級数は収束する。

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, summation, oo, Integral, plot, log
from sympy import Rational
import matplotlib.pyplot as plt

print('12-(e).')

n = symbols('n')
epsilon = symbols('ε', positive=True)
f = log(n) ** 3 / n ** 2
s = summation(f, (n, 1, oo))
I = Integral(f, (n, 1, oo))

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

d = {epsilon: 0.00001}
p = plot(f.subs(d),
(n, 1, 11),
legend=True,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']

for s, color in zip(p, colors):
s.line_color = color

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

def g(m):
return sum([f.subs({n: k}).subs(d) for k in range(1, m)])

ms = range(1, 11)
plt.plot(ms, [g(m) for m in ms])
plt.legend(['Σ (log n)^3 / n^2'])
plt.savefig('sample12.png')

C:\Users\...>py sample12.py
12-(e).
∞
_____
╲
╲       3
╲   log (n)
╲  ───────
╱      2
╱      n
╱
╱
‾‾‾‾‾
n = 1

∞
⌠
⎮    3
⎮ log (n)
⎮ ─────── dn
⎮     2
⎮    n
⌡
1

6

c:\Users\...>