微分の公式とその導出まとめ 〜積・商・合成関数・逆関数の導関数、三角関数 etc〜

数理統計学などを取り扱うにあたって基本演算に用いられる微分だが、関連する公式が多く把握が大変かつ導出によく出てくるので慣れていないと取り扱いが難しい。そこで当記事では抑えておきたい微分の公式やその導出について取りまとめを行った。
積の導関数・商の導関数・合成関数の微分・逆関数の微分などの基本的な公式や、指数関数・対数関数・三角関数などの基本的な関数の微分について取り扱った。

基本公式とその導出

積の導関数

関数$f(x),g(x)$に関して、積の導関数の公式は下記で表される。
$$
\large
\begin{align}
(f(x)g(x))’ = f'(x)g(x) + f(x)g'(x)
\end{align}
$$

以下、上記の式の導出を行う。
$$
\large
\begin{align}
(f & (x)g(x))’ = \lim_{h \to 0} \frac{f(x+h)g(x+h)-f(x)g(x)}{h} \\
&= \lim_{h \to 0} \frac{f(x+h)g(x+h)-f(x)g(x+h)+f(x)g(x+h)-f(x)g(x)}{h} \\
&= \lim_{h \to 0} \frac{f(x+h)-f(x))g(x+h)+f(x)(g(x+h)-g(x)}{h} \\
&= \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}g(x+h) + \lim_{h \to 0} f(x) \frac{g(x+h)-g(x)}{h} \\
&= f'(x)g(x) + f(x)g'(x)
\end{align}
$$

商の導関数

関数$f(x),g(x)$に関して、商の導関数の公式は下記で表される。
$$
\large
\begin{align}
\left( \frac{f(x)}{g(x)} \right)’ = \frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^2}
\end{align}
$$

以下、上記の式の導出を行う。
$$
\large
\begin{align}
& \left( \frac{f(x)}{g(x)} \right)’ = \lim_{h \to 0} \frac{f(x+h)/g(x+h)-f(x)/g(x)}{h} \\
&= \lim_{h \to 0} \frac{f(x+h)g(x)-f(x)g(x+h)}{hg(x+h)g(x)} \\
&= \lim_{h \to 0} \frac{f(x+h)g(x)-f(x)g(x)+f(x)g(x)-f(x)g(x+h)}{hg(x+h)g(x)} \\
&= \lim_{h \to 0} \frac{(f(x+h)-f(x))g(x)-f(x)(g(x+h)-g(x))}{hg(x+h)g(x)} \\
&= \lim_{h \to 0} \frac{f(x+h)-f(x)}{hg(x+h)g(x)}g(x) – \lim_{h \to 0} \frac{f(x)(g(x+h)-g(x))}{hg(x+h)g(x)} \\
&= \frac{f'(x)}{(g(x))^2}g(x) – f(x)\frac{g'(x)}{(g(x))^2} \\
&= \frac{f'(x)g(x) – f(x)g'(x)}{(g(x))^2}
\end{align}
$$

合成関数の微分

合成関数$y = f(u), u=g(x)$に関して、合成関数の導関数の公式は下記で表される。
$$
\large
\begin{align}
\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
\end{align}
$$
以下、上記の式の導出を行う。
$$
\large
\begin{align}
\frac{dy}{dx} &= \lim_{h \to 0} \frac{f(g(x+h))-f(g(x))}{h} \\
&= \lim_{h \to 0} \frac{f(g(x+h))-f(g(x))}{g(x+h)-g(x)} \cdot \frac{g(x+h)-g(x)}{h}
\end{align}
$$

上記に対して$k = g(x+h)-g(x)$を考えると、$u = g(x)$より、$g(x+h) = u + k$と変形できる。また、$h \to 0$のとき、$k = g(x+h) – g(x) \to 0$である。これらを元に下記のように(1)式の変形を行うことができる。
$$
\large
\begin{align}
\frac{dy}{dx} &= \lim_{h \to 0} \frac{f(g(x+h))-f(g(x))}{g(x+h)-g(x)} \cdot \frac{g(x+h)-g(x)}{h} \\
&= \lim_{\substack{h \to 0 \\ k \to 0}} \frac{f(u+k)-f(u)}{k} \cdot \frac{g(x+h)-g(x)}{h} \\
&= \frac{dy}{du} \cdot \frac{du}{dx}
\end{align}
$$

逆関数の微分

$y = f(x)$に対して、逆関数の導関数の公式は下記で表される。
$$
\large
\begin{align}
\frac{dx}{dy} = \frac{1}{\frac{dy}{dx}}
\end{align}
$$
以下、上記の式の導出を行う。
$$
\large
\begin{align}
\frac{dx}{dy} &= \lim_{h \to 0} \frac{h}{f(x+h)-f(x)} \\
&= \lim_{h \to 0} \frac{1}{\frac{f(x+h)-f(x)}{h}} \\
&= \frac{1}{\frac{dy}{dx}}
\end{align}
$$

三角関数の微分

加法定理と$\sin{x}, \cos{x}$の微分

$$
\large
\begin{align}
\sin{(a+b)} &= \sin{a}\cos{b} + \cos{a}\sin{b} \\
\cos{(a+b)} &= \cos{a}\cos{b} – \sin{a}\sin{b} \\
\lim_{h \to 0} \frac{\sin{h}}{h} &= 1
\end{align}
$$
三角関数に関する微分の公式の導出にあたって、上記を既知であると考え、以下確認を行う。

・$(\sin{x})’ = \cos{x}$の導出
$f(x) = \sin{x}$とおき、微分の定義に基づいて$f'(x)$を求める。
$$
\large
\begin{align}
f'(x) &= \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \\
&= \lim_{h \to 0} \frac{\sin{(x+h)}-\sin{x}}{h} \\
&= \lim_{h \to 0} \frac{\sin{x}\cos{h} + \cos{x}\sin{h} – \sin{x}}{h} \\
&= \lim_{h \to 0} \frac{\cos{x}\sin{h} – \sin{x}(1 – \cos{h})}{h} \\
&= \cos{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} – \sin{x} \cdot \lim_{h \to 0} \frac{1 – \cos{h}}{h} \\
&= \cos{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} – \sin{x} \cdot \lim_{h \to 0} \frac{(1 – \cos{h})(1 + \cos{h})}{h(1 + \cos{h})} \\
&= \cos{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} – \sin{x} \cdot \lim_{h \to 0} \frac{1 – \cos^2{h}}{h(1 + \cos{h})} \\
&= \cos{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} – \sin{x} \cdot \lim_{h \to 0} \frac{\sin^2{h}}{h(1 + \cos{h})} \\
&= \cos{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} – \sin{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{1 + \cos{h}} \cdot \frac{\sin{h}}{h} \\
&= \cos{x} \cdot 1 – \sin{x} \cdot \frac{0}{2} \cdot 1 \\
&= \cos{x}
\end{align}
$$

・$(\cos{x})’ = -\sin{x}$の導出
$f(x) = \cos{x}$とおき、微分の定義に基づいて$f'(x)$を求める。
$$
\large
\begin{align}
f'(x) &= \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \\
&= \lim_{h \to 0} \frac{\cos{(x+h)}-\cos{x}}{h} \\
&= \lim_{h \to 0} \frac{\cos{x}\cos{h} – \sin{x}\sin{h}-\cos{x}}{h} \\
&= \lim_{h \to 0} \frac{-\sin{x}\sin{h} – \cos{x}(1-\cos{h})}{h} \\
&= -\sin{x} \cdot \lim_{h \to 0} \frac{\sin{h}}{h} \\
&= -\sin{x} \cdot 1 \\
&= -\sin{x}
\end{align}
$$
途中で出てきた$\displaystyle \lim_{h \to 0} \frac{\cos{x}(1-\cos{h})}{h}=0$に関しては、$(\sin{x})’ = \cos{x}$で同様の計算を取り扱ったため、ここでは省略を行った。

$\displaystyle (\tan{x})’ = 1+\tan^2{x} = \frac{1}{\cos^2{x}}$の導出

$\displaystyle \tan{x} = \frac{\sin{x}}{\cos{x}}$とおけるので、商の導関数の式に対して$f(x)=\sin{x}, g(x)=\cos{x}$を代入する。
$$
\large
\begin{align}
\left( \frac{f(x)}{g(x)} \right)’ &= \frac{f'(x)g(x) – f(x)g'(x)}{(g(x))^2} \\
&= \frac{\cos{x} \cdot \cos{x} – \sin{x} \cdot (\sin{x})}{\cos^2{x}} \\
&= \frac{\cos^2{x} + \sin^2{x}}{\cos^2{x}} \quad (1) \\
&= 1 + \frac{\sin^2{x}}{\cos^2{x}} \\
&= 1 + \tan^2{x}
\end{align}
$$

また、$(1)$式に対し、$\cos^2{x} + \sin^2{x} = 1$を適用することで、$\displaystyle (\tan{x})’ = \frac{1}{\cos^2{x}}$が成立することも示すことができる。

$\tan^{-1}{(x)}$の微分

$y = \tan^{-1}{(x)}$とおくと、$x = \tan{y}$が成立する。これに対して、逆関数の微分の公式を用いて計算する。
$$
\large
\begin{align}
(\tan^{-1}{(x)})’ &= \frac{dy}{dx} \\
&= \frac{1}{\frac{dx}{dy}} \\
&= \frac{1}{1 + \tan^2{y}} \\
&= \frac{1}{1 + x^2}
\end{align}
$$
よって、$\displaystyle \tan^{-1}{(x)}=\frac{1}{1 + x^2}$が成立する。

指数関数・対数関数の微分

下記で詳しい取り扱いを行った。
https://www.hello-statisticians.com/explain-terms-cat/def_napier1.html#i-6

「微分の公式とその導出まとめ 〜積・商・合成関数・逆関数の導関数、三角関数 etc〜」への3件のフィードバック

  1. […] $displaystyle frac{du}{dx}$を導出するにあたって、$u$を$x$の式で表す。$$largebegin{align}x &= tan{left( pi left( u – frac{1}{2} right) right)} \tan^{-1}{(x)} &= pi left( u – frac{1}{2} right) \u – frac{1}{2} &= frac{1}{pi} tan^{-1}{(x)} \u &= frac{1}{pi} tan^{-1}{(x)} + frac{1}{2}end{align}$$$displaystyle (tan^{-1}{(x)})’ = frac{1}{1+x^2}$より、$displaystyle frac{du}{dx}$は下記のように求めることができる。$$largebegin{align}frac{du}{dx} &= frac{1}{pi} times frac{1}{1+x^2} \&= frac{1}{pi(1+x^2)}end{align}$$$displaystyle (tan^{-1}{(x)})’ = frac{1}{1+x^2}$に関しては導出が少々複雑なのでここでは省略し、下記で詳しく取り扱った。https://www.hello-statisticians.com/explain-terms-cat/diff_formula1.html […]

コメントは受け付けていません。