Second derivatives under a two-variable coordinate change (source code)

= Second derivatives under a two-variable coordinate change
{title2=$f_{ss}=f_{uu}u_s^2+2f_{uv}u_sv_s+f_{vv}v_s^2+f_u\,u_{ss}+f_v\,v_{ss}$}

For twice continuously differentiable coordinate functions $u,v$ and an outer scalar function $f$, apply the <multivariable chain rule> twice along an original coordinate $s$. The first three terms differentiate the outer function, while the last two differentiate the coordinate coefficients. They cannot be omitted for a nonlinear coordinate map. In matrix notation this is the <Hessian matrix> formula $H_{f\circ g}=J_g^TH_fJ_g+f_uH_u+f_vH_v$ for $g=(u,v)$. The extra terms vanish for an <affine map>.