学習環境
- Surface
- Windows 10 Pro (OS)
- Nebo(Windows アプリ)
- iPad
- MyScript Nebo - MyScript(iPad アプリ(iOS))
- 参考書籍
解析入門(上) (松坂和夫 数学入門シリーズ 4) (松坂 和夫(著)、岩波書店)の第8章(積分の計算)、8.1(不定積分の計算)、問題4の解答を求めてみる。
よって、
が成り立つ。
(証明終)
(証明終)
コード
#!/usr/bin/env python3
from sympy import pprint, symbols, Integral, sin, cos, plot
print('4.')
x = symbols('x')
m, n = symbols('m, n', integer=True)
f = sin(x) ** m * cos(x) ** n
fs = [f.subs({m: m0, n: n0})
for m0 in range(-1, 2)
for n0 in range(-1, 3)]
for g in fs:
I = Integral(g, x)
for o in [I, I.doit()]:
pprint(o)
print()
p = plot(*fs,
(x, -5, 5),
ylim=(-5, 5),
legend=False,
show=False)
colors = ['red', 'green', 'blue', 'brown', 'orange',
'purple', 'pink', 'gray', 'skyblue', 'yellow']
for o, color in zip(p, colors):
o.line_color = color
for o in zip(fs, colors):
pprint(o)
p.show()
p.save('sample4.png')
入出力結果(Zsh、PowerShell、Terminal、Jupyter(IPython))
% ./sample4.py
4.
⌠
⎮ 1
⎮ ───────────── dx
⎮ sin(x)⋅cos(x)
⌡
⎛ 2 ⎞
log⎝sin (x) - 1⎠
- ──────────────── + log(sin(x))
2
⌠
⎮ 1
⎮ ────── dx
⎮ sin(x)
⌡
log(cos(x) - 1) log(cos(x) + 1)
─────────────── - ───────────────
2 2
⌠
⎮ cos(x)
⎮ ────── dx
⎮ sin(x)
⌡
log(sin(x))
⌠
⎮ 2
⎮ cos (x)
⎮ ─────── dx
⎮ sin(x)
⌡
log(cos(x) - 1) log(cos(x) + 1)
─────────────── - ─────────────── + cos(x)
2 2
⌠
⎮ 1
⎮ ────── dx
⎮ cos(x)
⌡
log(sin(x) - 1) log(sin(x) + 1)
- ─────────────── + ───────────────
2 2
⌠
⎮ 1 dx
⌡
x
⌠
⎮ cos(x) dx
⌡
sin(x)
⌠
⎮ 2
⎮ cos (x) dx
⌡
x sin(x)⋅cos(x)
─ + ─────────────
2 2
⌠
⎮ sin(x)
⎮ ────── dx
⎮ cos(x)
⌡
-log(cos(x))
⌠
⎮ sin(x) dx
⌡
-cos(x)
⌠
⎮ sin(x)⋅cos(x) dx
⌡
2
sin (x)
───────
2
⌠
⎮ 2
⎮ sin(x)⋅cos (x) dx
⌡
3
-cos (x)
─────────
3
⎛ 1 ⎞
⎜─────────────, red⎟
⎝sin(x)⋅cos(x) ⎠
⎛ 1 ⎞
⎜──────, green⎟
⎝sin(x) ⎠
⎛cos(x) ⎞
⎜──────, blue⎟
⎝sin(x) ⎠
⎛ 2 ⎞
⎜cos (x) ⎟
⎜───────, brown⎟
⎝ sin(x) ⎠
⎛ 1 ⎞
⎜──────, orange⎟
⎝cos(x) ⎠
(1, purple)
(cos(x), pink)
⎛ 2 ⎞
⎝cos (x), gray⎠
⎛sin(x) ⎞
⎜──────, skyblue⎟
⎝cos(x) ⎠
(sin(x), yellow)
%
0 コメント:
コメントを投稿