学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- 数式入力ソフト(TeX, MathML): MathType
- MathML対応ブラウザ: Firefox、Safari
- MathML非対応ブラウザ(Internet Explorer, Microsoft Edge, Google Chrome...)用JavaScript Library: MathJax
- 参考書籍
数学読本〈5〉微分法の応用/積分法/積分法の応用/行列と行列式(松坂 和夫(著)、岩波書店)の第19章(細分による加法 - 積分法)、19.3(定積分の性質と計算)、リーマン和の極限としての定積分、問37.を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sympy import pprint, symbols, summation, Limit, oo, sin, pi, sqrt
print('37.')
k, n = symbols('k n', integer=True)
α, β = symbols('α β', positive=True)
f = summation(k ** α, (k, 1, n)) ** (β + 1) / \
summation(k ** β, (k, 1, n)) ** (α + 1)
l = Limit(f, n, oo)
pprint(l)
try:
pprint(l.doit())
except Exception as err:
print(type(err), err)
入出力結果(Terminal, IPython)
$ ./sample37.py
37.
⎛ β + 1 -α - 1⎞
⎜⎛ n ⎞ ⎛ n ⎞ ⎟
⎜⎜ ___ ⎟ ⎜ ___ ⎟ ⎟
⎜⎜ ╲ ⎟ ⎜ ╲ ⎟ ⎟
⎜⎜ ╲ α⎟ ⎜ ╲ β⎟ ⎟
lim ⎜⎜ ╱ k ⎟ ⋅⎜ ╱ k ⎟ ⎟
n─→∞⎜⎜ ╱ ⎟ ⎜ ╱ ⎟ ⎟
⎜⎜ ‾‾‾ ⎟ ⎜ ‾‾‾ ⎟ ⎟
⎝⎝k = 1 ⎠ ⎝k = 1 ⎠ ⎠
<class 'RecursionError'> maximum recursion depth exceeded while calling a Python object
$
SymPy では計算結果を求めることができなかった。。
0 コメント:
コメントを投稿