学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第5章(各種の初等関数)、5.1(対数関数・指数関数)、問題5の解答を求めてみる。
よって帰納法により 成り立つ。
(証明終)
コード
Python 3
#!/usr/bin/env python3 from sympy import pprint, symbols, plot, log, Derivative, factorial print('5.') x = symbols('x') n = symbols('n', nonnegative=True, integer=True) f = x ** n * log(x) g = factorial(n) / x d = Derivative(f, x) for n0 in range(10): print(f'n = {n0}') fn = f.subs({n: n0}) d = Derivative(fn, x, n0 + 1) gn = g.subs({n: n0}) for o in [fn, gn, d, d.doit(), d.doit() == gn]: pprint(o) print() ns = range(5) p = plot(*[x ** n0 for n0 in ns], log(x), *[x ** n0 * log(x) for n0 in ns], (x, 0.1, 5.1), ylim=(0, 5), legend=True, show=False) colors = ['red', 'green', 'blue', 'brown', 'orange', 'purple', 'pink', 'gray', 'skyblue', 'yellow'] for o, color in zip(p, colors): o.line_color = color p.show() p.save('sample5.png')
入出力結果(Bash、cmd.exe(コマンドプロンプト)、Terminal、Jupyter(IPython))
C:\Users\...>py sample5.py 5. n = 0 log(x) 1 ─ x d ──(log(x)) dx 1 ─ x True n = 1 x⋅log(x) 1 ─ x 2 d ───(x⋅log(x)) 2 dx 1 ─ x True n = 2 2 x ⋅log(x) 2 ─ x 3 d ⎛ 2 ⎞ ───⎝x ⋅log(x)⎠ 3 dx 2 ─ x True n = 3 3 x ⋅log(x) 6 ─ x 4 d ⎛ 3 ⎞ ───⎝x ⋅log(x)⎠ 4 dx 6 ─ x True n = 4 4 x ⋅log(x) 24 ── x 5 d ⎛ 4 ⎞ ───⎝x ⋅log(x)⎠ 5 dx 24 ── x True n = 5 5 x ⋅log(x) 120 ─── x 6 d ⎛ 5 ⎞ ───⎝x ⋅log(x)⎠ 6 dx 120 ─── x True n = 6 6 x ⋅log(x) 720 ─── x 7 d ⎛ 6 ⎞ ───⎝x ⋅log(x)⎠ 7 dx 720 ─── x True n = 7 7 x ⋅log(x) 5040 ──── x 8 d ⎛ 7 ⎞ ───⎝x ⋅log(x)⎠ 8 dx 5040 ──── x True n = 8 8 x ⋅log(x) 40320 ───── x 9 d ⎛ 8 ⎞ ───⎝x ⋅log(x)⎠ 9 dx 40320 ───── x True n = 9 9 x ⋅log(x) 362880 ────── x 10 d ⎛ 9 ⎞ ────⎝x ⋅log(x)⎠ 10 dx 362880 ────── x True C:\Users\...>
0 コメント:
コメントを投稿