I am reading Differentiable manifolds from Warner.
In order to prove that the dimension of the tangent space is the same as the dimension of the manifold, they use the following calculus lemma -
If $g$ is of class $C^k$ ($k \geq 2$) on a convex open subset $U$ about $p$ in $\mathbb{R}^d$, then for each $q \in U$, $g(q)\ =\ g(p) + \sum_{i=1}^d \frac{\partial g}{\partial r_i}|_p (r_i(q)-r_i(p))+\sum_{i,j}(r_i(q)-r_i(p))(r_j(q)-r_j(p))\int_0^1(1-t)\frac{\partial^2g}{\partial r_i\partial r_j}|_{(p+t(q-p))} dt.$
This is the Taylor expansion. It further says, if $g\in C^\infty$, then the integral as a function of $q$ is of class $C^\infty$. How is this? Do we have to use fundamental theorem of calculus or something like that?