## 2018年2月8日木曜日

### 数学 - Python - 解析学 - 多変数の関数 - 高次偏導関数、テイラーの定理(二階微分、関数、関係、グラディエント(gradient)、内積(ドット積、スカラー積))

1. $\begin{array}{}\frac{\partial z}{\partial x}=f\text{'}\left(x+ay\right)+g\text{'}\left(x-ay\right)\\ \frac{{\partial }^{2}z}{\partial {x}^{2}}=f\text{'}\text{'}\left(x+ay\right)+g\text{'}\text{'}\left(x-ay\right)\\ \frac{\partial z}{\partial y}=af\text{'}\left(x+ay\right)-ag\text{'}\left(x-ay\right)\\ \frac{{\partial }^{2}z}{\partial {y}^{2}}={a}^{2}f\text{'}\text{'}\left(x+ay\right)+{a}^{2}g\text{'}\text{'}\left(x-ay\right)\end{array}$

よって、

${a}^{2}\frac{{\partial }^{2}z}{\partial {x}^{2}}=\frac{{\partial }^{2}z}{\partial {y}^{2}}$

逆に、この関係を満たす関数 f について。

$z=f\left(x,y\right)$
$\begin{array}{}u=x+ay\\ v=x-ay\end{array}$

とおく。

$\begin{array}{}2x=u+v\\ x=\frac{u+v}{2}\\ y=\frac{u-v}{2a}\end{array}$

よって、

$\begin{array}{}\frac{\partial z}{\partial v}=\left(\frac{\partial z}{\partial x},\frac{\partial z}{\partial y}\right)·\left(\frac{1}{2},-\frac{1}{2a}\right)=\frac{1}{2}\left(\frac{\partial z}{\partial x}-\frac{1}{a}\frac{\partial z}{\partial y}\right)\\ \frac{\partial z}{\partial u\partial v}=\frac{1}{2}\left(\frac{{\partial }^{2}z}{\partial {x}^{2}}-\frac{1}{a}\frac{{\partial }^{2}z}{\partial x\partial y},\frac{{\partial }^{2}z}{\partial x\partial y}-\frac{1}{a}\frac{{\partial }^{2}z}{\partial {y}^{2}}\right)·\left(\frac{1}{2},\frac{1}{2a}\right)\\ =\frac{1}{4}\left(\frac{{\partial }^{2}z}{\partial {x}^{2}}-\frac{1}{a}\frac{{\partial }^{2}z}{\partial x\partial y}+\frac{1}{a}\frac{{\partial }^{2}z}{\partial x\partial y}-\frac{1}{{a}^{2}}\frac{{\partial }^{2}z}{\partial {y}^{2}}\right)\\ =\frac{1}{4}\left(\frac{{\partial }^{2}z}{\partial {x}^{2}}-\frac{1}{{a}^{2}}\frac{{\partial }^{2}z}{\partial {y}^{2}}\right)\\ =\frac{1}{4}·0\\ =0\end{array}$

ゆえに、

$z=f\left(u\right)+g\left(v\right)=f\left(x+ay\right)+g\left(x-ay\right)\left(a\ne 0\right)$

コード(Emacs)

Python 3

#!/usr/bin/env python3
from sympy import pprint, symbols, Derivative, Function

a, x, y = symbols('a, x, y')
z = Function('f')(x + a * y) + Function('g')(x - a * y)
l = a ** 2 * Derivative(z, x, 2)
r = Derivative(z, y, 2)
for t in [z, l, l.doit(), r, r.doit(), l.doit() == r.doit()]:
pprint(t)
print()


$./sample7.py f(a⋅y + x) + g(-a⋅y + x) 2 2 ∂ a ⋅───(f(a⋅y + x) + g(-a⋅y + x)) 2 ∂x ⎛⎛ 2 ⎞│ ⎛ 2 ⎞│ ⎞ 2 ⎜⎜ d ⎟│ ⎜ d ⎟│ ⎟ a ⋅⎜⎜────(f(ξ₁))⎟│ + ⎜────(g(ξ₁))⎟│ ⎟ ⎜⎜ 2 ⎟│ ⎜ 2 ⎟│ ⎟ ⎝⎝dξ₁ ⎠│ξ₁=a⋅y + x ⎝dξ₁ ⎠│ξ₁=-a⋅y + x⎠ 2 ∂ ───(f(a⋅y + x) + g(-a⋅y + x)) 2 ∂y ⎛⎛ 2 ⎞│ ⎛ 2 ⎞│ ⎞ 2 ⎜⎜ d ⎟│ ⎜ d ⎟│ ⎟ a ⋅⎜⎜────(f(ξ₁))⎟│ + ⎜────(g(ξ₁))⎟│ ⎟ ⎜⎜ 2 ⎟│ ⎜ 2 ⎟│ ⎟ ⎝⎝dξ₁ ⎠│ξ₁=a⋅y + x ⎝dξ₁ ⎠│ξ₁=-a⋅y + x⎠ True$