## 2019年10月4日金曜日

### 数学 - Python - 微分積分学 - 微分法の公式 - 導関数の求め方 - 累乗根、累乗、積、対数微分法

1. $\begin{array}{l}\frac{d}{\mathrm{dx}}{\left({a}^{2}+{x}^{2}\right)}^{\frac{4}{5}}{\left({b}^{2}+{x}^{2}\right)}^{\frac{2}{3}}\\ =\frac{d}{\mathrm{dx}}\frac{{\left({a}^{2}+{x}^{2}\right)}^{\frac{4}{5}}}{{\left({b}^{2}+{x}^{2}\right)}^{-\frac{2}{3}}}\\ =\frac{{\left({a}^{2}+{x}^{2}\right)}^{\frac{4}{5}}}{{\left({b}^{2}+{x}^{2}\right)}^{-\frac{2}{3}}}\left(\frac{4}{5}\frac{2x}{{a}^{2}+{x}^{2}}+\frac{2}{3}\frac{2x}{{b}^{2}+{x}^{2}}\right)\\ =\frac{{\left({a}^{2}+{x}^{2}\right)}^{\frac{4}{5}}}{{\left({b}^{2}+{x}^{2}\right)}^{-\frac{2}{3}}}·4x\left(\frac{2}{5}·\frac{1}{{a}^{2}+{x}^{2}}+\frac{1}{3}·\frac{1}{{b}^{2}+{x}^{2}}\right)\\ ={\left({a}^{2}+{x}^{2}\right)}^{\frac{4}{5}}{\left({b}^{2}+{x}^{2}\right)}^{\frac{2}{3}}4x\left(\frac{2}{5\left({a}^{2}+{x}^{2}\right)}+\frac{1}{3\left({b}^{2}+{x}^{2}\right)}\right)\end{array}$

コード

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Derivative, plot, Rational, root
from unittest import TestCase, main

print('18.')

x, a, b = symbols('x, a, b')
f = root((a ** 2 + x ** 2) ** 4, 5) * root((b ** 2 + x ** 2) ** 2, 3)
d = Derivative(f, x, 1)

for o in [d, d.doit()]:
pprint(o.simplify())
print()

p = plot(f.subs({a: 1, b: 2}),
legend=True,
show=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('sample18.png')


$./sample18.py 18. ⎛ ____________ ____________⎞ ⎜ ╱ 4 ╱ 2 ⎟ ∂ ⎜5 ╱ ⎛ 2 2⎞ 3 ╱ ⎛ 2 2⎞ ⎟ ──⎝╲╱ ⎝a + x ⎠ ⋅╲╱ ⎝b + x ⎠ ⎠ ∂x ____________ ____________ ╱ 4 ╱ 2 ⎛ 2 2 2⎞ 5 ╱ ⎛ 2 2⎞ 3 ╱ ⎛ 2 2⎞ 4⋅x⋅⎝5⋅a + 6⋅b + 11⋅x ⎠⋅╲╱ ⎝a + x ⎠ ⋅╲╱ ⎝b + x ⎠ ─────────────────────────────────────────────────────────── ⎛ 2 2⎞ ⎛ 2 2⎞ 15⋅⎝a + x ⎠⋅⎝b + x ⎠$