TITLE: Taylor Expansions with sum of vectors
QUESTION [5 upvotes]: I have a function $f:\mathbb{R}^n\to\mathbb{R}$ with gradient $\nabla_x f$ and Hessian $H_f$. Suppose $x, y, z, w\in\mathbb{R}^n$ and $\delta, \epsilon\in\mathbb{R}$.
If I have $x = y + \delta z$ then I could Taylor Expand $f$ around $y$ as
$$
f(x) = f(y) + \delta \nabla_xf(x)\bigg|_y z + \frac{\delta^2}{2}z^\top H_f\bigg|_y z + \mathcal{O}(\delta^3)
$$
Now I have multiple vectors summed up to $y$. For instance $x = y + \delta z + \epsilon w$. How can I Taylor Expand $f$ around $y$ now?

REPLY [2 votes]: In the single variable situation, we could set $g(\delta):=f(y+\delta z)$, then you just expend in the direction of $z$, which means $$g(\delta)=g(0)+\delta dg_z(0)+……$$And it could transform to what you've written.
In the 2-viriable situation, set $g(\delta ,\varepsilon ):=f(y+\delta z+\varepsilon w)$. Then
\begin{align*}
g(\delta ,\varepsilon )&=g(0,0)+\nabla g(0,0)^T\begin{pmatrix}\delta \\\varepsilon \end{pmatrix}+ \begin{pmatrix}\delta &\varepsilon \end{pmatrix}\mathcal H_g(0,0)\begin{pmatrix}\delta \\\varepsilon \end{pmatrix}+\mathcal O(\|(\delta ,\varepsilon )^T\|_2^3)\\
&=f(y)+\nabla f(y)^T\begin{pmatrix}\delta \\\varepsilon \end{pmatrix}+...
\end{align*}