# Approximation of the characteristic function of a compact set

## Homework Statement

Okay, so this is a three-part question, and I need some help with it.

1. I need to show that the function $$f(x) = e^{-1/x^{2}}, x > 0$$ and 0 otherwise is infinitely differentiable at x = 0.

2. I need to find a function from R to [0,1] that's 0 for $x \leq 0$ and 1 for $x \geq \epsilon$.

3. For K compact, U open in $R^n$ and $K \subset U$, I need to find a function from U to [0,1] that's 1 on K and and 0 outside of some closed set C containing K and contained in U.

## The Attempt at a Solution

1. I can do the first part up to the second derivative pretty easily, I think. And I think that any derivative of $$e^{-1/x^2}$$ is going to be a polynomial times $$e^{-1/x^2}/x^n$$ for some n, so showing that the derivative of the function above is continuous at 0 just amounts to showing that $$\frac{e^{-1/x^2}}{x^n}$$ goes to 0 as x goes to 0. I just wanted to see if I have the right idea and if there might be an easier way.

2. For this one I think you just take $$f(x) = e^{-{(\frac{\epsilon - x}{x})}^{2}}$$ on the interval $(0,\epsilon)$, then 0 and 1 where appropriate. Just checking to see if I'm way off or not here.

3. Now on this one I have very little idea what to do. I was thinking I could take 2 closed balls with $K \subset C_{1} \subset C_{2} \subset U$, then use $$e^{-1/x^2}$$ to define a function that's goes smoothly from 1 to 0 on $C_{2} - C_{1}$, but I'm not sure that's the best way to go about it.

Also, sorry for the TeX looking so nasty. The epsilons in the functions weren't very legible with the itex tag.