学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
ラング線形代数学(下) (ちくま学現文庫)(S.ラング (著)、芹沢 正三 (翻訳)、筑摩書房)の12章(多項式と素因子分解)、1(ユークリッド算法)、練習問題3の解答を求めてみる。
実数上の奇数次の任意の多項式は、奇関数なので、
よって、
または
よって、 中間値の定理より、
を満たす c が存在するので、 実数根をもつ。
(証明終)
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, solve, plot
import random
print('3.')
x = symbols('x', real=True)
fs = [sum([random.choice([-1, 1]) * random.randrange(1, 5) * x ** i
for i in range(k + 1)])
for k in range(1, 10, 2)]
for f in fs:
for o in [f, solve(f, x)]:
pprint(o)
print()
p = plot(*fs,
ylim=(-10, 10),
show=False,
legend=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('sample3.png')
入出力結果(Bash、cmd.exe(コマンドプロンプト)、Terminal、Jupyter(IPython))
C:\Users\...>py sample3.py
3.
4⋅x + 3
[-3/4]
3 2
x - 3⋅x + x + 3
⎡ ⎛ 1 √3⋅ⅈ⎞ 3 ____________ ⎛ 1 √3⋅
⎢ ⎜- ─ - ────⎟⋅╲╱ 3⋅√57 + 27 ⎜- ─ + ───
⎢ 2 ⎝ 2 2 ⎠ ⎝ 2 2
⎢1 - ─────────────────────────── - ───────────────────────────, 1 - ──────────
⎢ ⎛ 1 √3⋅ⅈ⎞ 3 ____________ 3
⎢ ⎜- ─ - ────⎟⋅╲╱ 3⋅√57 + 27
⎣ ⎝ 2 2 ⎠
ⅈ⎞ 3 ____________
─⎟⋅╲╱ 3⋅√57 + 27 3 ____________
⎠ 2 ╲╱ 3⋅√57 + 27 2
───────────────── - ───────────────────────────, - ────────────── - ──────────
3 ⎛ 1 √3⋅ⅈ⎞ 3 ____________ 3 3 ________
⎜- ─ + ────⎟⋅╲╱ 3⋅√57 + 27 ╲╱ 3⋅√57 +
⎝ 2 2 ⎠
⎤
⎥
⎥
──── + 1⎥
____ ⎥
27 ⎥
⎦
5 4 3 2
- 2⋅x + 4⋅x - x + 4⋅x - x + 1
⎡ ⎛ 5 4 3 2 ⎞⎤
⎣CRootOf⎝2⋅x - 4⋅x + x - 4⋅x + x - 1, 0⎠⎦
7 6 5 4 3 2
3⋅x - 4⋅x - 4⋅x + x + 4⋅x - x + x - 3
⎡ ⎛ 7 6 5 4 3 2 ⎞⎤
⎣CRootOf⎝3⋅x - 4⋅x - 4⋅x + x + 4⋅x - x + x - 3, 0⎠⎦
9 8 7 6 5 4 3 2
- 3⋅x - 4⋅x - 3⋅x + 4⋅x - 2⋅x - 3⋅x + x - 4⋅x - 3⋅x + 2
⎡ ⎛ 9 8 7 6 5 4 3 2 ⎞⎤
⎣CRootOf⎝3⋅x + 4⋅x + 3⋅x - 4⋅x + 2⋅x + 3⋅x - x + 4⋅x + 3⋅x - 2, 0⎠⎦
C:\Users\...>
0 コメント:
コメントを投稿