学習環境
- Surface、Surface ペン(端末)
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad Pro 10.5 + Apple Pencil
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第5章(各種の初等関数)、5.4(三角関数(続き)、逆三角関数)、問題5の解答を求めてみる。
よって、
よって帰納法により成り立つ。
(証明終)
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, sin, cos, log, Derivative, plot
print('5.')
print('(a)')
x, a, b = symbols('x, a, b')
f = a * cos(log(x)) + b * sin(log(x))
d1 = Derivative(f, x, 1).doit()
d2 = Derivative(f, x, 2).doit()
eq = x ** 2 * d2 + x * d1 + f
for o in [eq, eq.expand()]:
pprint(o)
print()
print('(b)')
n = symbols('n', integer=True, nonnegative=True)
for n in range(5):
g = x ** n * Derivative(f, x, n)
for o in [g, g.doit()]:
pprint(o)
print()
p = plot(*[Derivative(f.subs({a: 2, b: 3}), x, n).doit() for n in range(5)],
(x, 0.1, 10.1),
ylim=(-5, 5),
show=False,
legend=True)
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('sample5.png')
入出力結果(Bash、cmd.exe(コマンドプロンプト)、Terminal、Jupyter(IPython))
C:\Users\...>py sample5.py
5.
(a)
⎛ a⋅sin(log(x)) b⋅cos(log(x))⎞
a⋅sin(log(x)) - b⋅cos(log(x)) + x⋅⎜- ───────────── + ─────────────⎟
⎝ x x ⎠
0
(b)
a⋅cos(log(x)) + b⋅sin(log(x))
a⋅cos(log(x)) + b⋅sin(log(x))
∂
x⋅──(a⋅cos(log(x)) + b⋅sin(log(x)))
∂x
⎛ a⋅sin(log(x)) b⋅cos(log(x))⎞
x⋅⎜- ───────────── + ─────────────⎟
⎝ x x ⎠
2
2 ∂
x ⋅───(a⋅cos(log(x)) + b⋅sin(log(x)))
2
∂x
a⋅sin(log(x)) - a⋅cos(log(x)) - b⋅sin(log(x)) - b⋅cos(log(x))
3
3 ∂
x ⋅───(a⋅cos(log(x)) + b⋅sin(log(x)))
3
∂x
-a⋅sin(log(x)) + 3⋅a⋅cos(log(x)) + 3⋅b⋅sin(log(x)) + b⋅cos(log(x))
4
4 ∂
x ⋅───(a⋅cos(log(x)) + b⋅sin(log(x)))
4
∂x
-10⋅a⋅cos(log(x)) - 10⋅b⋅sin(log(x))
C:\Users\...>
0 コメント:
コメントを投稿