Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to show that the following function $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)$. Now 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$?


share|cite|improve this question
Hint: $\sec(x)$ is $C^{\infty}$ on the interval, so since the product of two $C^{\infty}$ functions is $C^{\infty}$, it suffices to prove the result where $\sec(x)$ is removed (i.e. replaced by 1). This can be done inductively, and the major issue is showing it at $x = 0$ where you have to actually look at difference quotients. – Zarrax Jun 27 '11 at 14:00
@Zarrax I think i've shown that already as I stated above that $f^{(k)}(0)=0$ for all $k \geq 0$. So you mean that as both $f,g$ are $C^{\infty}$ then their product is as well? – user38268 Jun 28 '11 at 1:35
@D Lim Yes that is true, the product of two $C^{\infty}$ functions is always $C^{\infty}$. This is easily provable by repeatedly differentiating the product of the two functions and then using the product and sum rules for derivatives. – Zarrax Jun 29 '11 at 20:03
up vote 3 down vote accepted

There is a consequence of Lagrange's theorem which states something like this:

If $a<c<b \in \Bbb{R}$ and $f: (a,b) \to \Bbb{R}$ by $$ f(x)=\begin{cases}g(x), & x \in (a,c] \\ h(x), & x \in (c,b)\end{cases},$$

continuous, with $g,h$ derivable functions on $(a,c)$ and $(c,b)$, respectively, then for $f$ to be derivable on $(a,b)$ it is enough to prove that $$ \lim_{x \to c, x<c} g'(x)=\lim_{x \to c,x>c} h'(x).$$

Now, I think this is enough to prove that your function is differentiable, since from what you've shown, the value of the derivative in $0$ on one side is equal to the derivative in $0$ in the other side, for all orders of derivation.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.