## 2019年4月12日金曜日

### 数学 - Python - 解析学 - 級数 - テイラーの公式 - 指数関数(逆数、累乗根、置換積分法、積分、近似、剰余項の評価)

1. 置換積分法。

$\begin{array}{l}t={x}^{2}\\ \frac{\mathrm{dt}}{\mathrm{dx}}=2x\\ x=0,t=1\\ x=0.1,t=0.01\\ \underset{0}{\overset{0.1}{\int }}{e}^{\left(-{x}^{2}\right)}\mathrm{dx}\\ =\frac{1}{2}\underset{0}{\overset{0.01}{\int }}\frac{{e}^{-t}}{\sqrt{t}}\mathrm{dt}\\ {e}^{-t}=1+{R}_{1}\left(t\right)\\ \left|{R}_{1}\left(t\right)\right|\\ \le {e}^{-0}\left|t\right|\\ =\left|t\right|\end{array}$

よって、

$\begin{array}{l}\frac{{e}^{-t}}{\sqrt{t}}=\frac{1}{\sqrt{t}}+\frac{{R}_{1}\left(t\right)}{\sqrt{t}}\\ \left|\frac{{R}_{1}\left(t\right)}{\sqrt{t}}\right|\le \sqrt{t}\end{array}$

ゆえに、

$\begin{array}{l}\frac{1}{2}\underset{0}{\overset{0.01}{\int }}\frac{{e}^{-t}}{\sqrt{t}}\mathrm{dt}\\ ={\left[\sqrt{t}\right]}_{0}^{0.01}+\frac{1}{2}\underset{0}{\overset{0.01}{\int }}\frac{{R}_{1}\left(t\right)\mathrm{dt}}{\sqrt{t}}\\ \underset{0}{\overset{0.01}{\int }}\frac{{R}_{1}\left(t\right)}{\sqrt{t}}\mathrm{dt}\\ \le \frac{1}{2}\underset{0}{\overset{0.01}{\int }}\sqrt{t}\mathrm{dt}\\ =\frac{1}{3}{\left[t\sqrt{t}\right]}_{0}^{0.01}\\ =\frac{1}{3}·1{0}^{-2}·1{0}^{-1}\\ <1{0}^{-3}\end{array}$

よって、 求める積分の小数第3位までの値は、

$\begin{array}{l}{\left[\sqrt{t}\right]}_{0}^{0.01}\\ =\sqrt{1{0}^{-2}}\\ =0.1\end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, exp, plot, factorial, Integral, Rational

print('11-(e).')

x = symbols('x')
f = exp(-x ** 2)
If = Integral(f, (x, 0, 0.1))
y = Rational(1, 10)

for o in [If, If.doit(), float(If.doit()), float(y)]:
pprint(o)
print()

f = exp(-x) / (2 * x ** Rational(1, 2))
g = 1 / (2 * x ** Rational(1, 2))
p = plot(f, g,
(x, 0, 0.015),
ylim=(0, 20),
show=False, legend=False)
colors = ['red', 'green', 'blue', 'brown']

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

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


C:\Users\...>py sample11.py
11-(e).
0.1
⌠
⎮     2
⎮   -x
⎮  ℯ    dx
⌡
0

0.0562314580091424⋅√π

0.09966766429033636

0.1

C:\Users\...>