## 2019年4月11日木曜日

### 数学 - 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}^{{x}^{2}}\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.01}\left|t\right|\\ \le 2·\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)}{\sqrt{t}}\mathrm{dt}\\ \frac{1}{2}\underset{0}{\overset{0.01}{\int }}\left|\frac{{R}_{1}\left(t\right)}{\sqrt{t}}\right|\mathrm{dt}\\ \le {\left[\frac{1}{3}t\sqrt{t}\right]}_{0}^{0.01}\\ =\frac{1}{3}·\left(1{0}^{-2}\right)1{0}^{-1}\\ <1{0}^{-3}\end{array}$

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

$\begin{array}{l}\sqrt{0.01}\\ =0.100\end{array}$

コード

Python 3

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

print('11-(d).')

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-(c).
1
⌠
⎮  ⎛ 2⎞
⎮  ⎝x ⎠
⎮ ℯ     dx
⌡
0

√π⋅erfi(1)
──────────
2

1.4626517459071815

1.4625300625300626

9/2    7/2    5/2    3/2
x      x      x      x      √x    1
──── + ──── + ──── + ──── + ── + ────
2640   432     84     20    6    2⋅√x

C:\Users\...>