## 2019年6月28日金曜日

### 数学 - Python - 解析学 - 級数 - テイラーの公式 - 累乗根(平方根)、直線、累乗(べき乗、平方)、差、商、極限

1. $\begin{array}{l}\frac{d}{\mathrm{dx}}\left({\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}x\right)\\ =\frac{1}{2}{\left(1+x\right)}^{-\frac{1}{2}}-\frac{1}{2}\\ \frac{d}{{\mathrm{dx}}^{2}}\left({\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}x\right)\\ =-\frac{1}{{2}^{2}}{\left(1+x\right)}^{-\frac{3}{2}}\\ \frac{{d}^{3}}{{\mathrm{dx}}^{3}}\left({\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}x\right)\\ =\frac{3}{{2}^{3}}{\left(1+x\right)}^{-\frac{5}{2}}\\ \frac{{d}^{4}}{{\mathrm{dx}}^{4}}\left({\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}x\right)\\ =-\frac{3·5}{{2}^{4}}{\left(1+x\right)}^{-\frac{7}{2}}\\ {\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}x\\ =-\frac{1}{2!{2}^{2}}{x}^{2}+\frac{3}{3!{2}^{3}}{x}^{3}-\frac{3·5}{4!{2}^{4}}{x}^{4}+\dots \\ \underset{x\to 0}{\mathrm{lim}}\frac{{\left(1+x\right)}^{\frac{1}{2}}-1-\frac{1}{2}y}{{x}^{2}}=-\frac{1}{8}\end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, plot, Limit, Rational

print('31.')

x = symbols('x')
f = ((1 + x) ** Rational(1, 2) - 1 - x / 2) / x ** 2

for d in ['+', '-']:
l = Limit(f, x, 0, dir=d)
for o in [l, l.doit()]:
pprint(o)
print()


C:\Users\...>py sample31.py
31.
⎛  x     _______    ⎞
⎜- ─ + ╲╱ x + 1  - 1⎟
⎜  2                ⎟
lim ⎜───────────────────⎟
x─→0⁺⎜          2        ⎟
⎝         x         ⎠

-1/8

⎛  x     _______    ⎞
⎜- ─ + ╲╱ x + 1  - 1⎟
⎜  2                ⎟
lim ⎜───────────────────⎟
x─→0⁻⎜          2        ⎟
⎝         x         ⎠

-1/8

C:\Users\...>