## 2019年9月28日土曜日

### 数学 - Python - 解析学 - 各種の初等関数 - 三角関数(続き)、逆三角関数 - 逆正接関数、等式の証明、ライプニッツの公式、漸化式、偶奇、階乗

1. $\begin{array}{l}\frac{d}{\mathrm{dx}}y=\frac{1}{1+{x}^{2}}\\ \left(1+{x}^{2}\right)\frac{\mathrm{dy}}{\mathrm{dx}}=1\end{array}$

ライプニッツの公式により、 左辺について、

$\begin{array}{l}\frac{{d}^{n+1}}{{\mathrm{dx}}^{n+1}}\left(\left(1+{x}^{2}\right)\frac{\mathrm{dy}}{\mathrm{dx}}\right)\\ =\left(1+{x}^{2}\right)\frac{{d}^{n+2}}{d{x}^{n+2}}y+\left(n+1\right)2x\frac{{d}^{n+1}}{{\mathrm{dx}}^{n+1}}y+\frac{n\left(n+1\right)}{2}·2\frac{{d}^{n}}{d{x}^{n}}y\\ =\left(1+{x}^{2}\right)\frac{{d}^{n+2}}{d{x}^{n+2}}y+2\left(n+1\right)x\frac{{d}^{n+1}}{d{x}^{n+1}}y+\left(n+1\right)n\frac{{d}^{n}}{d{x}^{n}}y\end{array}$

右辺は0。

よって、

$\left(1+{x}^{2}\right)\frac{{d}^{n+2}}{d{x}^{n+2}}y+2\left(n+1\right)x\frac{{d}^{n+1}}{{\mathrm{dx}}^{n+1}}y+\left(n+1\right)n\frac{{d}^{n}}{d{x}^{n}}y=0$

（証明終）

等式の x に0を代入すると、

$\begin{array}{l}\frac{{d}^{n+2}}{{\mathrm{dx}}^{n+2}}y\left(0\right)+\left(n+1\right)n\frac{{d}^{n}}{d{x}^{n}}y\left(0\right)=0\\ \frac{{d}^{n+2}}{{\mathrm{dx}}^{n+2}}y\left(0\right)=-\left(n+1\right)n\frac{{d}^{n}}{d{x}^{n}}y\left(0\right)\end{array}$

また、

$\begin{array}{l}y\left(0\right)=\mathrm{arctan}0=0\\ \frac{d}{\mathrm{dx}}y\left(0\right)=\frac{1}{1+{0}^{2}}=1\end{array}$

が成り立つ。

よって、

$\begin{array}{l}\frac{{d}^{2n}}{d{x}^{2n}}y\left(0\right)=0\\ \frac{{d}^{2n+1}}{d{x}^{2n+1}}y\left(0\right)={\left(-1\right)}^{n}\left(2n\right)!\end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, atan, Derivative, solve, plot

print('13.')

x = symbols('x')
y = atan(x)
n = symbols('n', nonnegative=True, integer=True)

for n in range(10):
print(f'n = {n}')
eq = (1 + x ** 2) * Derivative(y, x, n + 2) + 2 * (n + 1) * x * \
Derivative(y, x, n + 1) + (n + 1) * n * Derivative(y, x, n)
yn0 = Derivative(y, x, n)
for o in [eq, eq.doit(), yn0.doit().subs({x: 0})]:
pprint(o.simplify())
print()


$./sample13.py 13. n = 0 2 d ⎛ 2 ⎞ d 2⋅x⋅──(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) dx 2 dx 0 0 n = 1 2 3 d ⎛ 2 ⎞ d d 4⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 2⋅──(atan(x)) 2 3 dx dx dx 0 1 n = 2 3 4 2 d ⎛ 2 ⎞ d d 6⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 6⋅───(atan(x)) 3 4 2 dx dx dx 0 0 n = 3 4 5 3 d ⎛ 2 ⎞ d d 8⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 12⋅───(atan(x)) 4 5 3 dx dx dx 0 -2 n = 4 5 6 4 d ⎛ 2 ⎞ d d 10⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 20⋅───(atan(x)) 5 6 4 dx dx dx 0 0 n = 5 6 7 5 d ⎛ 2 ⎞ d d 12⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 30⋅───(atan(x)) 6 7 5 dx dx dx 0 24 n = 6 7 8 6 d ⎛ 2 ⎞ d d 14⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 42⋅───(atan(x)) 7 8 6 dx dx dx 0 0 n = 7 8 9 7 d ⎛ 2 ⎞ d d 16⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅───(atan(x)) + 56⋅───(atan(x)) 8 9 7 dx dx dx 0 -720 n = 8 9 10 8 d ⎛ 2 ⎞ d d 18⋅x⋅───(atan(x)) + ⎝x + 1⎠⋅────(atan(x)) + 72⋅───(atan(x)) 9 10 8 dx dx dx 0 0 n = 9 10 11 9 d ⎛ 2 ⎞ d d 20⋅x⋅────(atan(x)) + ⎝x + 1⎠⋅────(atan(x)) + 90⋅───(atan(x)) 10 11 9 dx dx dx 0 40320$