スキップしてメイン コンテンツに移動

テイラー展開

Introduction

今日はテイラー展開について紹介します。
ここでは、一変数関数だけでなく、多変数関数のテイラー展開も紹介します。

一変数関数のテイラー展開

f(X) は区間(a,b)で連続であり、また、n回微分可能とします。
すると、f(x) は以下のように表せます。
\[\exists c ~~s.t~~ f(b) = \sum_{k=0}^{n-1} f^{(k)}(a)\frac{(b-a)^k}{k!} + f^{(n)}(c) \frac{(b-a)^n}{n!}, c \in (a,b)\]
このf(x)を多項式で表したものをテイラー展開といいます。
最後の項は、剰余項と呼ばれます。

多変数関数のテイラー展開

多変数関数のテイラー展開はかなり複雑な形をしています。
fは多変数関数とします。
さらに、m回微分可能な連続関数とします。
この時、 \(f(x_1+h_1,x_2+h_2,.....,x_n+h_n)\) は次のように表せます。
\[\exists \theta ~~s.t~~\]
\[f(x_1+h_1,x_2+h_2,...,x_n+h_n)=f(x_1,x_2,...,x_n) + \]
\[\sum_{m=0}^{n-1} \frac{1}{m-1} \sum_{k_1=1}^{n} \sum{k_2=1}^{n} ... \sum{k_{m-1}=1}^{n} \frac{\partial^{m-1} f}{\partial x_{k_1} \partial x_{k_2} .... \partial x_{k_{m-1}} }(x_1,x_2,..,x_n)h_{k_1}h_{k_2} ..... h_{k_m-1} \]
\[+ \frac{1}{m} \sum_{k_1=1}^{n} \sum_{k_2=1}^{n} ... \sum_{k_m=1}^{n} \frac{\partial^{m} f}{\partial x_{k_1} \partial x_{k_2} ... \partial x_{k_m} }(x_1 + \theta h_1, x_2 + \theta h_2,...., x_n + \theta h_n) h_k{k_1}h_{k_2}....h_{k_n}\]
最後の項は一変数の時と同様に剰余項と呼ばれます。

Proof

ここでは、一変数のテイラー展開の証明をします・
この証明にはロルの定理を用いています。ロルの定理については以下の投稿を参考にしてください。

ロルの定理の投稿はこちら

f(x)を区間(a,b)で連続で、n回微分可能な関数とします。
この定理の証明は次を示すことで達成されます。
\[f(b) = \sum_{k=}^{n-1} f^{(k)} (a) \frac{(b-a)^k}{k!} + A \frac{(b-a)^n}{n!}\]
新しく、次のような関数を定義します。
\[g(x) = f(b) - \sum_{k=0}^{n-1} f^{(k)}(x) \frac{(b-a)^k}{k!} - A \frac{(b-x)^n}{n!}\]
g(x)は次のことを満たすことがすぐにわかります。
  • g(a) = 0
  • g(b) = 0
よって、ロルの定理より、
\[\exists c \in (a,b) ~~s.t~~ g'(c) = 0\]
\[\begin{eqnarray*} g'(x) &=& - \sum_{k=0} ^{n-1} f^{(k+1)} (x) \frac{(b-x)^k}{k!} + \sum_{k=1}^{n-1} f^{(k)} (x) \frac{(b-x)^{k-1}}{(k-1)!} + A \frac{(b-x)^{n-1}}{(n-1)!} \\ &=& -\sum_{k=1}^{n} f^{(k)} (x) \frac{(b-x)^{n-1}}{(k-1)!} + \sum_{k=1}^{n-1} f^{(k)} (x) \frac{(b-x)^{k-1}}{(k-1)!} + A \frac{(b-x)^{n-1}}{(n-1)!}\\ &=& -f^n (x) \frac{(b-x)^{n-1}}{(n-1)!} + A \frac{(b-x)^{n-1}}{(n-1)!} \end{eqnarray*}\]
cをxに代入することで
\[g'(c) = \frac{(b-x)^{n-1}}{(n-1)!} (A - f^{(n)}(x))\]
\[A = f^{(n)}(x)\]
Q.E.D

Reference
https://mathtrain.jp/taylortheorem
http://www.ne.jp/asahi/search-center/internationalrelation/mathWeb/Differentiation/TheoremsDffrntlNvarFnctn/TaylorTheorem.htm

コメント

このブログの人気の投稿

Theorem of K-means

Introduction 日本語 ver Today, I will write about the theorem of K-means algorithm. K-means algorithm is a method to do clustering about K of class. The post of implement K-means is Implement kernel K-means This post is written about kernel K-means. The kernel K-means is the method which covers the weak point of K-means. I will explain kernel K-means another post. Overview 1 of K coding scheme prototype vector Distortion measure Computing 1 of K coding scheme K-means algorithm is clustering K of class. Now, K-means algorithm expresses that $x_n$ be belong to k like as follows. Let vector $r_n:1 \times K$ is $$r_n := (0,0,..,1,..,0)$$ this vector have 1 in element of k'th and have 0 in else. This expression is called 1 of K coding scheme. Prototype vector K-means algorithm chooses vector which called a prototype. this vector has represented by the cluster. K-means algorithm is regard mean vector as representative of the cluster. I...

Thorem of SVM part 2

Introduction 日本語 ver This post is written about theorem of SVM. This post is part 2. Part 1 is written about deriving the objective function. I will write about dual problem. The objective function which deriving in Part 1 is called the main problem. Typically, We optimize not the main problem, but the dual problem. I will write about deriving the dual problem from the main problem. If you until look up part 1, please look up Theorem of SVM part 1 . I implement SVM. It post is Implement linear SVM Implement kernel SVM Overview Main problem Dual problem  Lagurange function maximize L about dual variable, minimize L about primal variable minimize L about primal variable, maximize L about dual variable. Main problem I will review the main problem in Part 1. $$\min_{w,b} \frac{1}{2}||W||^2 + C\sum_{i \in N} \epsilon_i$$ $$~~s.t~~ \forall i \in N, y_i (w^T \phi(x_i) + b) \geq 1 - \epsilon_i ,~~~, \forall i \in N~\epsilon \geq 0$$ This problem is called s...

SVMの理論 part 2

Introduction English ver 今日はSVMの定理について書いていきます。 この記事はpart 2になります。Part 1 では目的関数の導出までを書きました。Part 2では双対問題とゆわれるものを導出します。Part 1で導いた目的関数は主問題と呼ばれます。一般的に、SVMでは主問題ではなく、双対問題を解くことで最適解を得ます。 もし、まだPart 1を見ておられない場合は、 Theorem of SVM part 1 を見てくださるとよいのではないかと思います。 SVMの実装編は Implement linear SVM Implement kernel SVM を御覧ください。 概要 主問題 双対問題  ラグランジュ関数 主変数について、最小化、双対変数について最大化 双対変数について最大化、主変数について最小化 主問題 Part 1で導いた主問題の復習をしておきます。 $$\min_{w,b} \frac{1}{2}||W||^2 + C\sum_{i \in N} \epsilon_i$$ $$~~s.t~~ \forall i \in N, y_i (w^T \phi(x_i) + b) \geq 1 - \epsilon_i ,~~~, \forall i \in N~\epsilon \geq 0$$ これはソフトマージンの時の目的関数ですが、以後ソフトマージンの場合のみを扱っていきます。 さて、双対問題と呼ばれるものですが、これは主問題から自然に導かれます。 双対問題 SVMの最適化問題は凸二次最適化問題と呼ばれる種類の問題です。凸二次最低化問題は、必ず大域最適解に近づくことが知れれており、数値上の安全性が高いとされています。 双対問題を導出します。まず、主問題を以下のように書き換えます。 $$\min_{w,b} \frac{1}{2}||W||^2 + C\sum_{i \in N} \epsilon_i$$ $$~~s.t~~ \forall i \in N, -\{y_i (w^T \phi(x_i) + b) -1 + \epsilon_i \}\leq 0,~~~, \forall i \in N~ -\epsilon \...