学習環境
微分積分学 (ちくま学芸文庫) (吉田 洋一(著)、筑摩書房)のⅡ.(微分法の公式)、1.(微分法の公式)、問3の解答を求めてみる。
ddx√2x-1x2=12√2x-1x2·(2+2xx4)=1√2x-1x2(1+1x3)=x3+1x2√2x3-1
ddx√x+√1+x2=12√x+√1+x2·(1+12√1+x2·2x)=12√x+√1+x2·√1+x2+x√1+x2=√x+√1+x22√1+x2
ddx√(a+x)(b+x)(a-x)(b-x)=12√(a-x)(b-x)(a+x)(b+x)·(b+x+a+x)(a-x)(b-x)-(a+x)(b+x)(-(b-x)-(a-x))(a-x)2(b-x)2=12√(a-x)(b-x)(a+x)(b+x)·(a+b+2x)(a-x)(b-x)-(a+x)(b+x)(-a-b+2x)(a-x)2(b-x)2=12(a-x)(b-x)√(a2-x2)(b2-x2)·((a+b)((a-x)(b-x)+(a+x)(b+x))(a-x)2(b-x)2+2x((a-x)(b-x)-(a+x)(b+x))(a-x)2(b-x)2)=12·1√(a2-x2)(b2-x2)·1(a-x)(b-x)((a+b)(2ab+2x2)+2x(-2ax-2bx))=(a+b)(ab+x2-2x2)√(a2-x2)(b2-x2)(a-x)(b-x)=(a+b)(ab-x2)√(a2-x2)(b2-x2)(a-x)(b-x)
コード
Python 3
#!/usr/bin/env python3
from sympy import pprint, symbols, sqrt, Derivative
print('3.')
x, a, b = symbols('x, a, b')
fs = [sqrt(2 * x - 1 / x ** 2),
sqrt(x + sqrt(1 + x ** 2)),
sqrt((a + x) * (b + x) / ((a - x) * (b - x)))]
dfs1 = [Derivative(f, x, 1).doit() for f in fs]
dfs2 = [(x ** 3 + 1) / (x ** 2 * sqrt(2 * x ** 3 - 1)),
sqrt(x + sqrt(1 + x ** 2)) / (2 * sqrt(1 + x ** 2)),
(a + b) * (a * b - x ** 2) /
(sqrt((a ** 2 - x ** 2) * (b ** 2 - x ** 2)) *
(a - x) * (b - x))]
for i, o in enumerate(zip(dfs1, dfs2), 1):
print(f'({i})')
for t in o:
pprint(t.factor())
print()
入出力結果(Bash、cmd.exe(コマンドプロンプト)、Terminal、Jupyter(IPython))
$ ./sample3.py
3.
(1)
⎛ 2 ⎞
(x + 1)⋅⎝x - x + 1⎠
────────────────────
__________
3 ╱ 1
x ⋅ ╱ 2⋅x - ──
╱ 2
╲╱ x
⎛ 2 ⎞
(x + 1)⋅⎝x - x + 1⎠
────────────────────
__________
2 ╱ 3
x ⋅╲╱ 2⋅x - 1
(2)
_________________
╱ ________
╱ ╱ 2
╲╱ x + ╲╱ x + 1
─────────────────────
________
╱ 2
2⋅╲╱ x + 1
_________________
╱ ________
╱ ╱ 2
╲╱ x + ╲╱ x + 1
─────────────────────
________
╱ 2
2⋅╲╱ x + 1
(3)
______________________
╱ (a + x)⋅(b + x) ⎛ 2⎞
- ╱ ──────────────────── ⋅(a + b)⋅⎝-a⋅b + x ⎠
╱ 2
╲╱ a⋅b - a⋅x - b⋅x + x
─────────────────────────────────────────────────
(-a + x)⋅(a + x)⋅(-b + x)⋅(b + x)
⎛ 2⎞
-(a + b)⋅⎝-a⋅b + x ⎠
───────────────────────────────────────────────────────
___________________________________
╲╱ (-a + x)⋅(a + x)⋅(-b + x)⋅(b + x) ⋅(-a + x)⋅(-b + x)
$
0 コメント:
コメントを投稿