学習環境
- Surface 3 (4G LTE)、Surface 3 タイプ カバー、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ)
- 参考書籍
解析入門〈3〉(松坂 和夫(著)、岩波書店)の第16章(行列式)、16.2(行列式の他の性質)、問題1-(a).を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3 from sympy import pprint, symbols, Matrix x = symbols('x') def f(i, j, n): if i == n: return symbols(f'a{j}') if i == j: return x if i + 1 == j: return -1 return 0 for n in range(10): m = Matrix([[f(i, j, n) for j in range(n + 1)] for i in range(n + 1)]) for t in [m, m.det()]: pprint(t) print() print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample1.py [a₀] a₀ ⎡x -1⎤ ⎢ ⎥ ⎣a₀ a₁⎦ a₀ + a₁⋅x ⎡x -1 0 ⎤ ⎢ ⎥ ⎢0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂⎦ 2 a₀ + a₁⋅x + a₂⋅x ⎡x -1 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃⎦ 2 3 a₀ + a₁⋅x + a₂⋅x + a₃⋅x ⎡x -1 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄⎦ 2 3 4 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x ⎡x -1 0 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄ a₅⎦ 2 3 4 5 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x + a₅⋅x ⎡x -1 0 0 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄ a₅ a₆⎦ 2 3 4 5 6 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x + a₅⋅x + a₆⋅x ⎡x -1 0 0 0 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄ a₅ a₆ a₇⎦ 2 3 4 5 6 7 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x + a₅⋅x + a₆⋅x + a₇⋅x ⎡x -1 0 0 0 0 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 x -1 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈⎦ 2 3 4 5 6 7 8 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x + a₅⋅x + a₆⋅x + a₇⋅x + a₈⋅x ⎡x -1 0 0 0 0 0 0 0 0 ⎤ ⎢ ⎥ ⎢0 x -1 0 0 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 x -1 0 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 x -1 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 x -1 0 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 x -1 0 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 x -1 0 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 0 x -1 0 ⎥ ⎢ ⎥ ⎢0 0 0 0 0 0 0 0 x -1⎥ ⎢ ⎥ ⎣a₀ a₁ a₂ a₃ a₄ a₅ a₆ a₇ a₈ a₉⎦ 2 3 4 5 6 7 8 9 a₀ + a₁⋅x + a₂⋅x + a₃⋅x + a₄⋅x + a₅⋅x + a₆⋅x + a₇⋅x + a₈⋅x + a₉⋅x $
0 コメント:
コメントを投稿