深度学习基础 - 从泰勒级数到直线
flyfish
该图使用LibreOffice Draw 画
f
(
x
)
≈
f
(
x
0
)
+
f
′
(
x
0
)
x
−
x
0
1
!
+
f
′
′
(
x
0
)
(
x
−
x
0
)
2
2
!
+
⋯
+
f
(
n
)
(
x
0
)
(
x
−
x
0
)
n
n
!
\mathrm{f}(\mathrm{x}) \approx \mathrm{f}\left(x_{0}\right)+\mathrm{f}^{\prime}\left(x_{0}\right) \frac{x-x_{0}}{1 !}+f^{\prime \prime}\left(x_{0}\right) \frac{\left(x-x_{0}\right)^{2}}{2 !}+\cdots+f^{(n)}\left(x_{0}\right) \frac{\left(x-x_{0}\right)^{n}}{n !}
f(x)≈f(x0)+f′(x0)1!x−x0+f′′(x0)2!(x−x0)2+⋯+f(n)(x0)n!(x−x0)n
n如果是正无穷,可换成等号
(
x
−
x
0
)
1
→
0
(
x
−
x
0
)
2
→
0
(
x
−
x
0
)
n
→
0
\quad\left(x-x_{0}\right)^{1} \rightarrow 0 \quad\left(x-x_{0}\right)^{2} \rightarrow 0 \quad\left(x-x_{0}\right)^{n} \rightarrow 0
(x−x0)1→0(x−x0)2→0(x−x0)n→0
一阶展开
f
(
x
)
=
f
(
x
0
)
+
f
′
(
x
0
)
(
x
−
x
0
)
f(x)=f\left(x_{0}\right)+f^{\prime}\left(x_{0}\right)\left(x-x_{0}\right)
f(x)=f(x0)+f′(x0)(x−x0)
一阶展开的由来
Δ
y
=
f
(
x
)
−
f
(
x
0
)
,
Δ
x
=
x
−
x
0
f
(
x
)
−
f
(
x
0
)
=
f
′
(
x
0
)
∗
(
x
−
x
0
)
f
(
x
)
=
f
(
x
0
)
+
f
′
(
x
0
)
(
x
−
x
0
)
\begin{array}{l}{\Delta y=f(x)-f\left(x_{0}\right), \Delta x=x-x_{0}} \\\\ {f(x)-f\left(x_{0}\right)=f^{\prime}\left(x_{0}\right) *\left(x-x_{0}\right)} \\ \\{f(x)=f\left(x_{0}\right)+f^{\prime}\left(x_{0}\right)\left(x-x_{0}\right)}\end{array}
Δy=f(x)−f(x0),Δx=x−x0f(x)−f(x0)=f′(x0)∗(x−x0)f(x)=f(x0)+f′(x0)(x−x0)
怎么变成直线的
k
1
+
k
2
x
−
k
2
x
0
=
k
2
x
+
b
{k_{1}}+k_{2} x-k_{2} x_{0}= k_{2} x+b
k1+k2x−k2x0=k2x+b
因为
f
(
x
0
)
=
k
1
f\left(x_{0}\right)=k_1
f(x0)=k1,
f
′
(
x
0
)
=
k
2
f^{\prime}\left(x_{0}\right)=k_2
f′(x0)=k2,
k
2
x
+
b
k_{2} x+b
k2x+b就是直线
线性近似
根据直线的点斜式方程得
y
=
f
(
a
)
+
f
′
(
a
)
(
x
−
a
)
.
y=f(a)+f'(a)(x−a).
y=f(a)+f′(a)(x−a).
L ( x ) = f ( a ) + f ′ ( a ) ( x − a ) . L(x)=f(a)+f'(a)(x−a). L(x)=f(a)+f′(a)(x−a).
x \sqrt{x} x的线性近似
找到 f ( x ) = x f(x)=\sqrt{x} f(x)=x在 x = 9 x=9 x=9的线性近似,并估算 9.1 \sqrt{9.1} 9.1
L ( x ) = f ( 9 ) + f ′ ( 9 ) ( x − 9 ) . L(x)=f(9)+f'(9)(x−9). L(x)=f(9)+f′(9)(x−9).
f ( x ) = x ⇒ f ( 9 ) = 9 = 3 f(x)=\sqrt{x}⇒f(9)=\sqrt{9}=3 f(x)=x⇒f(9)=9=3
f ′ ( x ) = 1 2 x ⇒ f ′ ( 9 ) = 1 2 9 = 1 6 f'(x)=\frac{1}{2\sqrt{x}}⇒f'(9)=\frac{1}{2\sqrt{9}}=\frac{1}{6} f′(x)=2x1⇒f′(9)=291=61
L ( x ) = 3 + 1 6 ( x − 9 ) L(x)=3+\frac{1}{6}(x−9) L(x)=3+61(x−9)
9.1
=
f
(
9.1
)
≈
L
(
9.1
)
=
3
+
1
6
(
9.1
−
9
)
≈
3.0167
\sqrt{9.1}=f(9.1)≈L(9.1)=3+\frac{1}{6}(9.1−9)≈3.0167
9.1=f(9.1)≈L(9.1)=3+61(9.1−9)≈3.0167