# continuous differentiability of $f(x)=(x^2_1-x^2_2)g(x)$ in $\partial\mathbb B_1$

Let $g\in C^ \infty(\mathbb R^n)$ with $g\ge0$, $g=1$ in $\mathbb B_1$ and $g=0$ in $\mathbb R^n\backslash\mathbb B_2$. How can you prove that $$f:\mathbb R^n\rightarrow\mathbb R,\space\space x\mapsto (x^2_1-x^2_2)g(x)$$ is continuously differentiable?

Obviously $f$ is continuously differentiable $\forall x\in\mathbb R^n\backslash\{\partial\mathbb B_1\cup\partial\mathbb B_2\}$ so the problem is just the boundary.

-
I do not understand the question. You already do assume $g\in C^\infty(\mathbb{R}^n)$, so the only thing you need is the product rule. – user20266 Jun 9 '12 at 18:35
Thomas is right, $f \in C^{\infty}(\mathbb{R}^{n})$. – user29999 Jun 9 '12 at 18:47
@Thomas don't you have to check the boundary points of the balls? – user Jun 9 '12 at 19:24
For what reason? All functions involved are already known to be smooth ($C^\infty$). The product rule does not care whether any of the functions involved has a piecewise definition, it just says that the product of (continuously) differentiable functions is (continuously) differentiable. – user20266 Jun 9 '12 at 19:29
(oh yes, and it also tells how to compute the derivative, but that's not the point here). – user20266 Jun 9 '12 at 19:33