学習環境
- 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
- 参考書籍
オイラーの贈物―人類の至宝eiπ=-1を学ぶ (吉田 武(著)、東海大学出版会)の第III部(オイラーの公式とその応用(Euler's Formula & Its Applications))、第8章(オイラーの公式(Euler's Formula))、8.2(オイラーの公式の応用)、8.2.2(代数方程式への応用: 1のn乗根)、問題2.を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import symbols, pprint, summation, exp, pi, I
print('問題2.')
k, n = symbols('k n', integer=True)
term = exp(I * 2 * k * pi / n)
s = summation(term, (k, 0, n - 1))
for t in [term, s]:
pprint(t)
print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample2.py
問題2.
2⋅ⅈ⋅π⋅k
───────
n
ℯ
⎧ 2⋅ⅈ⋅π
⎪ ─────
⎪ n
⎨n for ℯ = 1
⎪
⎪0 otherwise
⎩
$
0 コメント:
コメントを投稿