I'm trying to start learning about manifold through Loring Tu's book. However, the first result has me somewhat confused. I was for the most part able to follow Lemma 1.4 which proves Taylor's theorem with remainder. However, I am confused as to how Tu was able to easily conclude $g_i(x)$ is in $C^\infty(U)$. Looking at its definition (see picture), it isn't clear to me why this is immediate true. The outer integral "blocking" the smooth function $f$ is what concerns me.
I am convinced from equation 1.1 $$ f(x) = f(p) + \sum (x^i - p^i) g_i(x) $$ that the mixed partials of $g_i(x)$ must exist otherwise $f$ would not be in $C^\infty$. But, why must these mixed partials be continuous over $U$? After all, aren't there examples of partials existing at a point while not being continuous?

I convinced myself that $g_i(x)$ is in fact in $C^\infty$ over $U$. The basic strategy I used involved first thinking about $\frac{\partial g_i}{\partial x^j}(x)$ which by Leibniz integral rule is $\int_0^1 \frac{\partial f}{\partial x^j \partial x^i}(p + t(x-p))dt$. Because $f$ is in $C^\infty$ over $U$, the integrand is also in $C^\infty$ over $U$. By repeatedly taking partial derivatives of $g_i$ and using Leibniz rule, we get a function of the form $G(x) = \int_0^1 F(p + t(x-p))dt$ where $F$ is in $C^\infty$ over $U$. By showing that $G(x)$ is continuous over $U$, it would effectively be proven that $g_i$ and all its mixed partials exist and are continuous over $U$.
Consider forming a closed box $B = [a_1, a_1'] \times \ldots \times [a_n, a_n']$ around $x \in U$, which exists as $U$ is open. Then form a "cone" $K = \{p + \lambda(b - p) \vert b \in B, \lambda \in [0,1]\}$ which lies entirely in $U$ as $U$ is star-shaped. The set $K$ is closed and bounded and thus compact. Because $F$ is continuous over $U$, $F$ is continuous over the compact set $K \subseteq U$ and is thus uniformly continuous over $K$.
Uniform continuity over $K$ implies that $$ \begin{align*} | G(x + \Delta x) - G(x) | &= \left \vert \int_0^1 F(p + t(x + \Delta x - p)) - F(p + t(x - p)) dt \right \vert \\ &\leq \int_0^1 | F(p + t(x + \Delta x - p)) - F(p + t(x - p))| dt \end{align*} $$ can be made arbitrarily small so long as $\Delta x$ has sufficiently small length proving continuity at $x$.