$p,w\in \mathbb{R}^n$ are vectors. Hence we can write $$w=w_1e_1+...+w_ne_n$$ with $e_i$ being the basis.
My question is how to work out the RHS from the LHS in the following equation:
$$\frac{d}{dt}\bigg|_{t=0}f(p+tw)=w_1\frac{\partial f}{\partial x_1}(p)+\dots+w_n\frac{\partial f}{\partial x_n}(p)$$
I am also confused by the notation. What is $x_i$ in this context?
Here is what I tried:
\begin{align} \frac{d}{dt}\bigg|_{t=0}f(p+tw) &= \frac{df}{dt}\bigg|_{t=0}(p+tw)w\\ &= \frac{df}{dx}\frac{dx}{dt}\bigg|_{t=0}(p+tw)[w_1e_1+...+w_ne_n]\\ \end{align}
I cannot really make sense of it.
EDIT: Forgot to say: $f:\mathbb{R}^n\to \mathbb{R}$
You have $g : \mathbb{R} \rightarrow \mathbb{R}^n $ defined as $g : t \mapsto p+tw$ and the function $f : \mathbb{R}^n \rightarrow \mathbb{R}$, with $f: (x_1,\cdots,x_n) \mapsto f(x_1,\cdots,x_n)$. So $h = f \circ g : \mathbb{R} \rightarrow \mathbb{R}$.
Let $t_0=0$ and $g(t_0) = p + w \cdot 0 = p$. We have $g(t) =(g_1(t), \cdots , g_n(t))= (p_1 + w_1 t, \cdots , p_n+w_n t)$ and $g'(t_0) = \big(\frac{dg_1}{dt}(t_0) , \cdots , \frac{dg_n}{dt}(t_0)\big) = (w_1,\cdots,w_n)$.
The differential of function $g : \mathbb{R} \rightarrow \mathbb{R}^n$ is $g'(t)$ which is $n \times 1$ matrix, and for $f : \mathbb{R}^n \rightarrow \mathbb{R}$ is $f'(x) = Df(x) = \big[\frac{\partial f}{\partial x_1}(x) \cdots \frac{\partial f}{\partial x_n}(x)\big]$ is a $1\times n$ matrix so the differential of the composition $h = f \circ g$ is just a number $h'(t) = Df(g(t)) \cdot g'(t)$.
By chain rule, \begin{align} h'(t_0) &=\frac{d}{dt}\Bigg|_{t_0=0} f(p+wt) =(f \circ g)'(t_0) = Df(g(t_0)) \cdot g'(t_0) \\ &= \Big[ \frac{\partial f}{\partial x_1}(p) \cdots \frac{\partial f}{\partial x_n}(p) \Big] \begin{bmatrix} \frac{dg_1}{dt}(t_0)\\ \frac{dg_2}{dt}(t_0)\\ \frac{dg_3}{dt} (t_0)\\ \end{bmatrix} = \sum_{i=1}^{n} w_i \frac{\partial f}{\partial x_i}(p) \end{align}