学習環境
- Surface Go、タイプ カバー、ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro + Apple Pencil
- MyScript Nebo(iPad アプリ(iOS))
- 参考書籍
数学読本〈1〉数・式の計算/方程式/不等式 (松坂 和夫(著)、岩波書店)の第2章(文字と記号の活躍 - 式の計算)、2.1(整式)、整式の加法・減法の問3.を取り組んでみる。
コード(Emacs)
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols
print('3.')
x, y = symbols('x, y')
ps = [(x ** 3 - 2 * x ** 2 - 7, 1 - 5 * x - x ** 2 + 8 * x ** 3),
(6 * y + 5 - 2 * y ** 3 - 5 * y ** 2, 4 * y ** 2 + 9 * y - 6 * y ** 3 - 7)]
for i, (A, B) in enumerate(ps, 1):
print(f'({i})')
for s in [A + B, A - B]:
pprint(s)
print()
print()
入出力結果(Terminal, Jupyter(IPython))
$ ./sample3.py
3.
(1)
3 2
9⋅x - 3⋅x - 5⋅x - 6
3 2
- 7⋅x - x + 5⋅x - 8
(2)
3 2
- 8⋅y - y + 15⋅y - 2
3 2
4⋅y - 9⋅y - 3⋅y + 12
$
0 コメント:
コメントを投稿