Taylor's formula for optimization for numerical method [closed]
Solution 1:
$g(s)=f(x+sp)$ is a scalar function. You are trying to prove $$ g(1)=g(0)+g'(t)·(1-0) $$ for some $t\in(0,1)$, which is the mean-value theorem. Check that the derivative is compatible with your expression. Note that while the derivative/Jacobian is a row vector, the gradient is a column vector. In the usual Euclidean context it is the transpose of the Jacobian matrix.