Let $f: \mathbb{R}^n \to \mathbb{R}$ be a smooth map, $p$ a fixed vector. Define
$$g_i(x) = \int_0^1 \frac{\partial f}{\partial x_i} (x+t(x-p)) dt$$
Why is $g_i$ smooth, i.e. why is $g_i \in C^\infty(\mathbb{R^n},\mathbb{R})$? For reference, this is used in Tu's book "introduction to topological manifolds" on p6 in a proof of a version of Taylor's theorem.
Maybe I must check that partial derivatives commute with the integral?