Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
2
Help us understand the problem. What is going on with this article?
@msekino

テイラー展開の再帰的導出法

More than 1 year has passed since last update.

はじめに

機械学習では二次近似あたりまではよく出てきます。ニュートン法は一次近似=ゼロを解いて更新則が導出されますし、ベイズ事後分布の正規分布近似(ラプラス近似)は対数事後分布の二次近似ですね。(最大化や最小化にニュートン法を用いる場合は、勾配(一階微分)の一次近似=ゼロを解くので二階微分が出てきて二次解法(Quadratic Solver)と呼ばれますね。)

そんなテイラー展開の公式を忘れたとき、思い出すのに使える導出法です。パズルみたいでおもしろいです。

テイラー展開の再帰的導出法

無限回連続微分可能な関数$f(x)$に対して

\begin{align*}
f(x)
 &= f(x_0) + \int_{x_0}^x f^{(1)}(z_1) dz_1 \\
f^{(1)}(z_1)
 &= f^{(1)}(x_0) + \int_{x_0}^{z_1} f^{(2)}(z_2) dz_2 \\
f^{(2)}(z_2)
 &= f^{(2)}(x_0) + \int_{x_0}^{z_2} f^{(3)}(z_3) dz_3 \\
 &\hspace{2mm} \vdots
\end{align*}

で再帰的に代入すると

\begin{align*}
&f(x) \\
&= f(x_0) + \int_{x_0}^x f^{(1)}(z_1) dz_1 \\
&= f(x_0) + \int_{x_0}^x \left( f^{(1)}(x_0) + \int_{x_0}^{z_1} f^{(2)}(z_2) dz_2 \right) dz_1 \\
&= f(x_0) + \int_{x_0}^x \left( f^{(1)}(x_0)
 + \int_{x_0}^{z_1} \left( f^{(2)}(x_0) + \int_{x_0}^{z_2} f^{(3)}(z_3) dz_3 \right) dz_2 \right) dz_1 \\
&\hspace{2.6mm} \vdots \\
&= f(x_0) \\
&\hspace{4mm} + f^{(1)}(x_0) \cdot \int_{x_0}^x 1 \; dz_1 \\
&\hspace{4mm} + f^{(2)}(x_0) \cdot \int_{x_0}^x \int_{x_0}^{z_1} 1 \; dz_2 dz_1 \\
&\hspace{4mm} + f^{(3)}(x_0) \cdot \int_{x_0}^x \int_{x_0}^{z_1} \int_{x_0}^{z_2} 1 \; dz_3 dz_2 dz_1 \\
&\hspace{6.2mm} \vdots \\
&\hspace{4mm} + f^{(k)}(x_0) \cdot \int_{x_0}^x \cdots \int_{x_0}^{z_{k-1}} 1 \; dz_k \cdots dz_1 \\
&\hspace{6.2mm} \vdots
\end{align*}

となります。$f^{k}(x_0)$はk階微分の$x_0$での値(定数)で、その係数は1のk重積分です。
1のk重積分をk=1から順に求めていくと

\begin{align*}
\int_{x_0}^x 1 \; dz_1
 &= (x - x_0) \\
\int_{x_0}^x \left( \int_{x_0}^{z_1} 1 \; dz_2 \right) dz_1
 &= \int_{x_0}^x (z_1 - x_0) dz_1 
  = \frac{1}{2} (x - x_0)^2 \\
\int_{x_0}^x \left( \int_{x_0}^{z_1} \int_{x_0}^{z_2} 1 \; dz_3 dz_2 \right) dz_1 
 &= \int_{x_0}^x \frac{1}{2} (z_1 - x_0)^2 dz_1 
  = \frac{1}{2 \cdot 3} (x - x_0)^3 \\
 &\hspace{2.5mm} \vdots
\end{align*}

と、一つ前の解をもう一度積分していく形になります。これよりk重積分は

\begin{align*}
\int_{x_0}^x \cdots \int_{x_0}^{z_{k-1}} 1 \; dz_k \cdots dz_1
 &= \frac{1}{k!} (x-x_0)^k
\end{align*}

となることがわかります。$k=0$のとき$0! = 1$、$(x-x_0)^0=1$なので、$f(x_0)$も

\begin{align*}
f(x_0) = f^{(0)}(x_0) \frac{1}{0!} (x-x_0)^0
\end{align*}

と書けます。以上より、テイラー展開(テイラー級数):

\begin{align*}
f(x)
&= f(x_0) \cdot \frac{1}{0!} (x-x_0)^0 + f^{(1)}(x_0) \cdot \frac{1}{1!} (x-x_0)^1 + f^{(2)}(x_0) \cdot \frac{1}{2!} (x-x_0)^2 \cdots\\
&= \sum_{k=0}^\infty \frac{1}{k!} f^{(k)}(x_0)(x - x_0)^k
\end{align*}

を得ます。

2
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
2
Help us understand the problem. What is going on with this article?