# Show that $f$ is differentiable at point $x \not= (0,0)$ - $h(x) = (\sin ||x||)^p \cos \frac{1}{||x||}$

Let $p \geq 1$ and $f: \mathbb{R^2} \to \mathbb{R}$ defined as

$$f(x) = \begin{cases} (\sin \|x\|)^p \cos \frac{1}{\|x\|}, & \quad \text{if } \|x\| \not= 0 \\ 0, & \quad \text{if } \|x\| = 0 \\ \end{cases}$$

Show that $f$ is differentiable at point $x \not= (0,0)$

I don't know if there exist a shorter way to solve this problem, but here what I want to explore.

I want to find the partial derivatives of $h(x) = (\sin \|x\|)^p \cos \frac{1}{\|x\|}$ to get the gradient at the point $\bar{x}=(x_1,y_1) \not= (0,0)$. From this time, I can use the gradient at $\bar{x}$ to show that $f$ is differentiable at point $x \not= (0,0)$ in using the definition of differentiability (with the linear function $\nabla f(\bar{x}) \cdot (x-\bar{x})$).

$$\frac{\partial f}{\partial x}(x_1,y_1) = \lim_{h \to 0} \frac{f(x_1+h,y_1)-f(x_1,y_1)}{h} = \lim_{h \to 0} \frac{(\sin \|(x_1+h,y_1)\|)^p\cos \frac{1}{\|(x_1+h,y_1)\|}-\sin\|(x_1,y_1)\|)^p\cos \frac{1}{\|(x_1,y_1)\|}}{h}$$

I know the explicite formula for each partial derivative, but I have to show with the definition of a partial derivative. However, I am blocked to show $\frac{\partial f}{\partial x}(x_1,y_1)$ with the limit.

Is anyone could help me to find the explicite partial derivative of $\frac{\partial f}{\partial x}(x_1,y_1)$? Is there a easier way to show that $f$ is differentiable at point $x \not= (0,0)$?

P.S. Please, don't try to use a very specific analysis theory; I am only an undergraduate student (bachelor).

If you want to analyze differentiability away from $(0,0)$, you need not worry about the $f(0,0)$ part, just about the formula. In general, writing $x=(x_1,x_2)$ (I'm using notation different from your $(x_1,y_1)$ to make indexing easier, so I can compute all the partial derivatives at once), we have that: $$\frac{\partial}{\partial x_i}(\|x\|) = \frac{x_i}{\|x\|}, \quad \forall\,x \neq 0.$$So: \begin{align} \frac{\partial}{\partial x_i}\left((\sin \|x\|)^p\cos\left(\frac{1}{\|x\|}\right)\right)&= \frac{\partial}{\partial x_i}((\sin\|x\|)^p)\cos\left(\frac{1}{\|x\|}\right)+(\sin\|x\|)^p\frac{\partial}{\partial x_i}\left(\cos\left(\frac{1}{\|x\|}\right)\right) \\ &= p(\sin \|x\|)^{p-1}\cos\left(\frac{1}{\|x\|}\right)\frac{x_i}{\|x\|}+(\sin\|x\|)^p \sin\left(\frac{1}{\|x\|}\right)\frac{1}{\|x\|^2}\frac{x_i}{\|x\|} \\ &= p(\sin \|x\|)^{p-1}\cos\left(\frac{1}{\|x\|}\right)\frac{x_i}{\|x\|}+(\sin\|x\|)^p \sin\left(\frac{1}{\|x\|}\right)\frac{x_i}{\|x\|^3} ,\end{align}which are continuous functions of $x$ away from $(0,0)$. And if a function has continuous partial derivatives at a point, then it is differentiable at that point.
Here I assume that $\|(x_1,x_2)\| = \sqrt{x_1^2+x_2^2}$ is the euclidean norm.
• In your opinion, is a professor of analysis may be required to use the definition of the partial derivative to calculate $\frac{\partial f}{\partial x}(x_1,y_1)$? If so, is that long and painful exercise in the case that concerns me? – Taj Mohamed Bandalandabad Feb 13 '16 at 3:09
• Thank for your solution BTW! In your opinion, is there a easier way to show that $f$ is differentiable at point $x \not= (0,0)$ or this way use is the best? – Taj Mohamed Bandalandabad Feb 13 '16 at 3:14