Let $ g: \mathbb{R}^n\setminus\{0\} \to \mathbb{R}$ be a function of class $ C^{1}$ and suppose that there is $ M > 0$ such that $ $ \left|\frac{\partial}{\partial x_{i}}g(x)\right| \leq M.$ $ Prove that if $ n \geq 2$ then $ g$ can be extended to a continuous function defined in $ \mathbb{R}^n$ . Show that if $ n = 1$ the statement is false.

**My attempt.**

I want define the extension $ \bar{g}: \mathbb{R}^n \to \mathbb{R}$ by $ \bar{g}(x) = g(x)$ if $ x \in \mathbb{R}^{n}\setminus\{0$ } and $ \displaystyle \bar{g}(0) = \lim_{x \to 0}g(x)$ . Thus $ $ \lim_{x \to 0} \bar{g}(x) = \lim_{x \to 0}g(x) = \bar{g}(0)$ $ and so, $ \bar{g}$ is continuous. So the question is reduced to prove that $ \displaystyle \lim_{x \to 0}g(x)$ exists. Thus, I must show that $ $ \forall \epsilon > 0, \exists \delta > 0\text{ s.t. } \Vert X \Vert < \delta \Longrightarrow |g(x)|<\epsilon.$ $

The hypothesis $ $ \left|\frac{\partial}{\partial x_{i}}g(x)\right| \leq M$ $ seems necessary for get $ $ |g(x)-g(y)| \leq M|x-y|$ $ using the Means Value Inequality. This almost solves the problem, because if $ g(0) = 0$ we can write $ $ |g(x)| \leq M|x|.$ $ But $ g(0) = 0$ doesnt make sense. I’m stuck here.

Also, I cannot see the whe is necessary $ n \geq 2$ , where I use this in the demonstration and why it fails when $ n=1$ .