How do I prove that $h:(-\pi/2,\pi/2) \rightarrow [0,\infty)$,
$$h(x) = \begin{cases} e^{-(1/x)} \sec{x} & \text{for} \quad x \in (0,\pi/2) \\ 0 & \text{for} \quad x \leq 0, \end{cases} $$
is $C^{\infty}$ on $(-\pi/2,\pi/2)$? By definition, a function is $C^{\infty}$ at a point if it is $C^k$ for all $ k \geq 0$ at that point.
Now I think it is plain that if $x \leq 0$ then $h(x)$ is $C^k$ for all $ k \geq 0$. This is because the only cause for concern is that the $kth$ derivative at $0$ may fail to be continuous, but using the Leibniz rule
$$h^{(k)} (0) = \sum_{k=0}^{n}f^{(k)}(0)g^{(n-k)}(0), \qquad\text{where } f(x) = e^{-1/x}\text{ and }g(x) = \sec{x},$$
we see that $h^{(k)} (0) = 0$ as $f^{(k)} (0) = 0$ for all $k \geq 0$.
Now for $x > 0$, it is plain that I can keep differentiating the function $h(x)$. So if I can differentiate it $k$ times then I know that its $k-1$ derivatives are all continuous. However is this sufficient to conclude that $h(x)$ is $C^{\infty}$ for every real $x$?
Thanks.