Let $f(x)=|x|^{p-2}\sin(\frac{1}{x})+x|\tan x|^{q-3} ,x\neq0$ is differentiable at $x=0$, given $f(0)=0$, then what can be the values of $p$ and $q$?
My attempt: As $x$ approaches $0$, the $\sin(\frac{1}{x})$ term approaches infinity and so for the limit to be zero $x$ has to be zero. But here I can't understand the inter-relation between value of $p$ and $x$. If I put the value of $p=3$ and $q=3$, the overall limit becomes $0$, but according to the solution given, $p>3$ and $q\ge3$. But I can't understand how this ranges came. Even tried writing taylor series of sin($\frac{1}{x}$), but that also didn't help. Can anyone please explain the underlying concept in this and how can we solve this question?
$f$ is differentiable at zero if and only if
$$\lim\limits_{x \to 0} \frac{f(x)}{x}$$ exists.
For $1/x = n\pi$ with $n \in \mathbb N$, we have
$$\frac{f(x)}{x}= \left(\tan \frac{1}{n\pi}\right)^{q-3}$$ which diverges for $q \lt 3$ and converges to zero for $q \gt 3$. For $q= 3$, $g(x)=x \vert\tan x \vert^{q-3} = x$ is differentiable and $g^\prime(0) = 1$.
Based on that, $\lim\limits_{x \to 0} \frac{f(x)}{x}$ exists if and only if $\lim\limits_{x \to 0} \vert x \vert^{p-3} \sin \left(\frac{1}{x}\right)$ exists. And this happens if and only if $p \gt 3$.
We have obtained the desired result.