一元和二元的泰勒展开式

一元函数的泰勒展开式

由高等数学知识可知,对于一元函数 f ( x ) f(x) f(x) k k k点,即 x = x ( k ) x=x^{(k)} x=x(k)的泰勒展开式为:
f ( x ) = f ( x ( k ) ) + f ′ ( x ( k ) ) ( x − x ( k ) ) + 1 2 ! f ′ ′ ( x ( k ) ) ( x − x ( k ) ) 2 + ⋯ + 1 n ! f ( n ) ( x ( k ) ) ( x − x ( k ) ) n + R n f(x) = f(x^{(k)})+f'(x^{(k)})(x-x^{(k)}) + \frac{1}{2!}f^{''}(x^{(k)})(x-x^{(k)})^2 \\ + \dots + \frac{1}{n!}f^{(n)}(x^{(k)})(x-x^{(k)})^n + R_n f(x)=f(x(k))+f(x(k))(xx(k))+2!1f(x(k))(xx(k))2++n!1f(n)(x(k))(xx(k))n+Rn
式子中的余项 R n R_n Rn
R n = 1 ( n + 1 ) ! f ( n + 1 ) ( ξ ) ( x − x ( k ) ) ( n + 1 ) R_n = \frac{1}{(n+1)!}f^{(n+1)}(\xi)(x-x^{(k)})^{(n+1)} Rn=(n+1)!1f(n+1)(ξ)(xx(k))(n+1)
其中 ξ \xi ξ x x x x ( k ) x^{(k)} x(k)之间。

二元函数的泰勒展开式

定理

z = f ( x , y ) z = f(x,y) z=f(x,y)在点 ( x 0 , y 0 ) (x_0,y_0) (x0,y0)的某一个领域内连续且有直到 n + 1 n+1 n+1阶的连续偏导数, ( x 0 + h , y 0 + h ) (x_0+h,y_0+h) (x0+h,y0+h)为此领域内任一点,则有
f ( x 0 + h , y 0 + h ) = f ( x 0 , y 0 ) + ( h ∂ ∂ x + k ∂ ∂ y ) f ( x 0 , y 0 ) + 1 2 ! ( h ∂ ∂ x + k ∂ ∂ y ) 2 f ( x 0 , y 0 ) + ⋯ + 1 n ! ( h ∂ ∂ x + k ∂ ∂ y ) n f ( x 0 , y 0 ) + 1 ( n + 1 ) ! ( h ∂ ∂ x + k ∂ ∂ y ) ( n + 1 ) f ( x 0 + θ h , y 0 + θ k ) , ( 0 < θ < 1 ) f(x_0+h,y_0+h) = f(x_0,y_0)+(h\frac{\partial}{\partial x}+k \frac{\partial}{\partial y})f(x_0,y_0) + \frac{1}{2!}(h\frac{\partial}{\partial x}+k \frac{\partial}{\partial y})^2 f(x_0,y_0)\\+ \dots + \frac{1}{n!} (h\frac{\partial}{\partial x}+k \frac{\partial}{\partial y})^nf(x_0,y_0) +\frac{1}{(n+1)!}(h\frac{\partial}{\partial x}+k \frac{\partial}{\partial y})^{(n+1)}f(x_0+\theta h,y_0+\theta k), (0\lt \theta \lt 1) f(x0+h,y0+h)=f(x0,y0)+(hx+ky)f(x0,y0)+2!1(hx+ky)2f(x0,y0)++n!1(hx+ky)nf(x0,y0)+(n+1)!1(hx+ky)(n+1)f(x0+θh,y0+θk),(0<θ<1)

举个例子
函数 f ( X ) = f ( x 1 , x 2 ) f(X)=f(x_1,x_2) f(X)=f(x1,x2)在点 X ( k ) = ( x 1 ( k ) , x 2 ( k ) ) X^{(k)}=(x_1^{(k)},x_2^{(k)}) X(k)=(x1(k),x2(k))附近的泰勒展开,若只去到二次项可写成
f ( x ) ≈ f ( X ( k ) ) + ∂ f ∂ x 1 ∣ X = X ( k ) ( x 1 − x 1 ( k ) ) + ∂ f ∂ x 2 ∣ X = X ( k ) ( x 2 − x 2 ( k ) ) + 1 2 ! [ ∂ 2 f ∂ x 1 2 ∣ X = X ( k ) ( x 1 − x 1 ( k ) ) 2 + ∂ 2 f ∂ x 1 ∂ x 2 ∣ X = X ( k ) ( x 1 − x 1 ( k ) ) ( x 2 − x 2 ( k ) ) + ∂ 2 f ∂ x 2 2 ∣ X = X ( k ) ( x 2 − x 2 ( k ) ) 2 ] f(x) \approx f(X^{(k)}) + \frac{\partial f}{\partial x_1}|_{X=X^{(k)}}(x_1-x_1^{(k)})+\frac{\partial f}{\partial x_2}|_{X=X^{(k)}}(x_2-x_2^{(k)}) \\+ \frac{1}{2!} \left[ \frac{\partial^2 f}{\partial x_1^2}|_{X=X^{(k)}}(x_1-x_1^{(k)})^2 + \frac{\partial^2 f}{\partial x_1 \partial x_2 }|_{X=X^{(k)}}(x_1-x_1^{(k)})(x_2-x_2^{(k)}) + \frac{\partial^2 f}{\partial x_2^2}|_{X=X^{(k)}}(x_2-x_2^{(k)})^2 \right ] f(x)f(X(k))+x1fX=X(k)(x1x1(k))+x2fX=X(k)(x2x2(k))+2!1[x122fX=X(k)(x1x1(k))2+x1x22fX=X(k)(x1x1(k))(x2x2(k))+x222fX=X(k)(x2x2(k))2]
将这个式子写成矩阵形式,即
f ( X ) ≈ f ( X ( k ) ) + ( ∂ f ∂ x 1 ∂ f ∂ x 2 ) ( x 1 − x 1 ( k ) x 2 − x 2 ( k ) ) + 1 2 ( x 1 − x 1 ( k ) x 2 − x 2 ( k ) ) ( ∂ 2 f ∂ x 1 2 ∂ 2 f ∂ x 1 ∂ x 2 ∂ 2 f ∂ x 1 ∂ x 2 ∂ 2 f ∂ x 2 2 ) ( x 1 − x 1 ( k ) x 2 − x 2 ( k ) ) f(X) \approx f(X^{(k)}) + \left(\begin{matrix} \frac{\partial f}{\partial x_1} & \frac{\partial f}{\partial x_2} \end{matrix} \right) \left( \begin{matrix} x_1 - x_1^{(k)} \\ x_2 -x_2^{(k)} \end{matrix} \right) + \frac{1}{2} \left( \begin{matrix} x_1 - x_1^{(k)} & x_2 -x_2^{(k)}\end{matrix} \right) \left( \begin{matrix}\frac{\partial^2 f}{\partial x_1^2} & \frac{\partial ^2 f}{\partial x_1 \partial x_2 } \\ \frac{\partial ^2 f}{\partial x_1 \partial x_2 } & \frac{\partial^2 f}{\partial x_2^2} \end{matrix}\right)\left( \begin{matrix} x_1 - x_1^{(k)} \\ x_2 -x_2^{(k)} \end{matrix} \right) f(X)f(X(k))+(x1fx2f)(x1x1(k)x2x2(k))+21(x1x1(k)x2x2(k))(x122fx1x22fx1x22fx222f)(x1x1(k)x2x2(k))
式子中,我们令
∇ f = ( ∂ f ∂ x 1 ∂ f ∂ x 2 ) X − X ( k ) = ( x 1 − x 1 ( k ) x 2 − x 2 ( k ) ) ∇ 2 f = ( ∂ 2 f ∂ x 1 2 ∂ 2 f ∂ x 1 ∂ x 2 ∂ 2 f ∂ x 1 ∂ x 2 ∂ 2 f ∂ x 2 2 ) \nabla f = \left(\begin{matrix} \frac{\partial f}{\partial x_1} & \frac{\partial f}{\partial x_2} \end{matrix} \right) \\ X-X^{(k)} = \left( \begin{matrix} x_1 - x_1^{(k)} \\ x_2 -x_2^{(k)} \end{matrix} \right) \\ \nabla ^2 f = \left( \begin{matrix}\frac{\partial^2 f}{\partial x_1^2} & \frac{\partial ^2 f}{\partial x_1 \partial x_2 } \\ \frac{\partial ^2 f}{\partial x_1 \partial x_2 } & \frac{\partial^2 f}{\partial x_2^2} \end{matrix}\right) f=(x1fx2f)XX(k)=(x1x1(k)x2x2(k))2f=(x122fx1x22fx1x22fx222f)
其中 ∇ 2 f \nabla^2 f 2f是函数 f ( X ) f(X) f(X) X ( k ) X(k) X(k)点的二阶偏导数矩阵,称为海森矩阵,可以用 H ( X ) H(X) H(X)表示,它是一个对称矩阵。引用上述符号后,二元函数泰勒展开式可以简写为:
f ( X ) ≈ f ( X ( k ) ) + ∇ f ( X ( k ) ) ( X − X ( k ) ) + 1 2 ( X − X ( k ) ) T H ( X ( k ) ) ( X − X ( k ) ) f(X) \approx f(X^{(k)} )+\nabla f(X^{(k)})(X-X^{(k)}) +\frac{1}{2} (X-X^{(k)}) ^T H(X^{(k)})(X-X^{(k)}) f(X)f(X(k))+f(X(k))(XX(k))+21(XX(k))TH(X(k))(XX(k))

你可能感兴趣的:(SLAM)