二阶导数与泰勒近似Second Derivatives & Taylor Approximation
怎样用局部斜率和曲率,近似函数在附近的形状?How can local slope and curvature approximate a function nearby?
前置知识:Prerequisites: B07:导数;B10:损失与梯度下降。B07: derivatives; B10: loss and gradient descent.
复习前置:Review prerequisites: B07 · 从平均变化率到导数From Average Rate of Change to Derivatives · B10 · 损失函数与梯度下降Loss Functions & Gradient Descent
学完后你能:After this lesson you can: 解释二阶导数并比较局部二次近似与真实值。Explain second derivatives and compare local quadratic approximation with the true value.
动手观察Explore
选择二次或三次函数,改变展开点与偏移,比较真实曲线和二阶近似。Choose a quadratic or cubic function, change the expansion point and offset, and compare the true curve with its second-order approximation.
从观察到解释From observation to explanation
斜率怎样变化How slope changes
二阶导数描述一阶导数随输入的变化。例如 f(x)=x² 的导数是 2x,二阶导数为 2;在每个位置,斜率都以相同速度改变。A second derivative describes how the first derivative changes with input. For f(x)=x², the derivative is 2x and the second derivative is 2: slope changes at the same rate everywhere.
加上二次项Add a quadratic term
在 a 附近,线性估计 f(a)+f′(a)h 再加上 1/2 f″(a)h²,可以反映局部弯曲。对于二次多项式,这个二阶表达式恰好重建函数。Near a, adding 1/2 f″(a)h² to the linear estimate f(a)+f′(a)h captures local bending. For a quadratic polynomial, the second-order expression reconstructs the function exactly.
近似范围Range of approximation
对 f(x)=x³,a=1 时二阶近似为 1+3h+3h²,真实值还多 h³。h 越接近 0,遗漏项通常越小;远离展开点时误差可能明显。For f(x)=x³ at a=1, the quadratic approximation is 1+3h+3h², while the true value also contains h³. The omitted term becomes smaller near h=0; error can grow farther away.
公式与符号Formula and symbols
a 是展开点,h 是输入偏移;f′(a) 是斜率,f″(a) 是斜率变化率;≈ 表示局部近似。a is the expansion point and h the input offset; f′(a) is slope, f″(a) is the rate of change of slope, and ≈ denotes a local approximation.
留意这个区别Watch for this
二阶导数在一个点的符号只描述局部曲率信息;泰勒多项式通常不是远处的精确值。The sign of the second derivative at a point gives local curvature information; a Taylor polynomial is generally not exact far away.
继续探索Explore further
课后练习
检验你的理解