$f(x) = \int_0^1 \frac{d}{dt}f(tx_1,...,tx_n)dt = \int_0^1 \sum_{j=1}^n x_j\frac{\partial}{\partial x_j}f(tx_1,...,tx_n)dt$? In the definition of the tangent space there is always the following lemma

Let $U \subset \mathbb{R}^n$ be a convex neighborhood of
   $\boldsymbol{0}$ and $f:U \to \mathbb{R}$ a smooth function,
   $f(\boldsymbol{0}) = \boldsymbol{0}$. Then $$ f(x) = \sum_{i=1}^n
 a_i(x)x_i $$ for smooth functions $a_1(x),...,a_n(x)$ satisfying
   $a_i(\boldsymbol{0}) = \frac{\partial f}{\partial
 x_i(\boldsymbol{0})}$

The proof is always given by the following equation:
$$f(x) = \int_0^1 \frac{d}{dt}f(tx_1,...,tx_n)dt = \int_0^1 \sum_{j=1}^n x_j\frac{\partial}{\partial x_j}f(tx_1,...,tx_n)dt$$ 
However, i dont see how the right hand side holds.
In fact, i tried using $$f: \mathbb{R}^2 \to \mathbb{R}, (x_1,x_2) \to 2x_1^3+x_2^2$$ such that $$(tx_1,tx_2) = 2t^3x_1^3+t^2x_2^2$$
We have $$\frac{\partial}{\partial x_1}\left(2t^3x_1^3+t^2x_2^2\right) = 6t^3x_1^2$$ and $$\frac{\partial}{\partial x_2}\left(2t^3x_1^3+t^2x_2^2\right) = 2t^2x_2$$
Thus 
$$\int_0^1 x_1\cdot 6t^3x_1^2 + x_2\cdot 2t^2x_2 dt = \int_0^1 6t^3x_1^3 + 2t^2x_2^2 dt = \left. \frac{6}{4}t^4x_1^3+\frac{2}{3}t^3x_2^2 \right|^{t=1}_{t=0} = \frac{6}{4}x_1^3+\frac{2}{3}x_2^2$$
However, $$\frac{6}{4}x_1^3+\frac{2}{3}x_2^2 \not= 2x_1^3+x_2^2$$
Where am i wrong? I'm obviously miscalculating somewhere but i don't see where i am mistaken.
 A: It follows from the formula $(f\circ\gamma)'(t)=df_{\gamma(t)}(\gamma'(t))$ for all $\gamma:\mathbb{R}\rightarrow\mathbb{R}^n$ (which is a corollary of $d(g\circ f)_a=dg_{f(a)}\circ df_a$). If $\gamma(t)=(tx_1,\ldots,tx_n)$, we have $\gamma'(t)=(x_1,\ldots,x_n)$ thus
$$ \frac{d}{dt}f(tx_1,\ldots,tx_n)=df_{(tx_1,\ldots,tx_n)}(x_1,\ldots,x_n)=\sum_{j=1}^n x_j\frac{\partial f}{\partial x_j}(tx_1,\ldots,tx_n) $$
Because $df_a(x_1,\ldots,x_n)=\sum_{j=1}^n x_j\frac{\partial f}{\partial x_j}(a)$. Your mistake is that you wrote $$\frac{\partial}{\partial x_1}\left(2t^3x_1^3+t^2x_2^2\right) = \frac{\partial f}{\partial x_1}(tx_1,tx_2)$$
with $f(x_1,x_2)=2x_1^3+x_2^2$, you have $\frac{\partial f}{\partial x_1}(x_1,x_2)=6x_1^2+2x_2$ so $\frac{\partial f}{\partial x_1}(tx_1,tx_2)=6t^2x_1^2+2tx_2$ but $\frac{\partial}{\partial x_1}\left(2t^3x_1^3+t^2x_2^2\right)=6t^3x_1^2+2t^2x_1$.
A: Let's prove the right hand side of your equality. One has to show that 
$$\frac{d}{dt}f(tx_1,\dots,tx_n)=\sum_{i=1}^nx_i\frac{\partial f}{\partial x_i}(tx_1,\dots,tx_n).$$
Write the map $g:t\in (0,1)\mapsto f(tx_1,\dots,tx_n)$ as the composite of $h:t\in (0,1)\mapsto(tx_1,\dots,tx_n)$ and $f$. Then, the chain rule formula gives you the derivative of the composite:
$$\frac{d}{dt}g(t)=D_{(tx_1,\dots,tx_n)}f\left[\frac{d}{dt}g(t)\right]=D_{(tx_1,\dots,tx_n)}f\left[(x_1,\dots,x_n)\right]$$
and using the fact that $D_af(x)=\displaystyle\sum_{i=1}^n x_i\frac{\partial f}{\partial x_i}(a)$, you get your result.
