Continuity of a function depending on parametres - how to tackle such problems? We have $f: \Bbb{R} \rightarrow \Bbb{R}$ defined as follows:
$$f(x) = \begin{cases} a, & \mbox{if } x=0 \\ \sin\frac{b}{|x|}, & \mbox{if } x\neq 0 \end{cases}$$
The problem asks us to tell for which $a,b \in \Bbb{R}$, $f$ is continuous.
Intuitively I should find $\lim_{x\rightarrow 0} \sin \frac{b}{|x|}$ and that would be somehow dependent on $b$. Then we can set $a$ equal to that limit, and the function should be continuous. But how to find $\lim_{x\rightarrow 0} \sin \frac{b}{|x|}$ , I don't have a clue - here we have parametrized $\sin$ fuction with an arguement that seems to be approaching $+\infty$ or $-\infty$ depending on $b$. But it doesn't appear that $\sin \frac{b}{|x|}$ would have any limit at all because as $y\rightarrow \infty$, $\sin y$ will always "alternate" between $1$ and $-1$. So maybe the answer is that such $a,b$ don't exist then? So - what should I do with this problem?
 A: Note that as $x\to 0$, $\frac{b}{|x|}\to\infty$ for any $b>0$, and $\frac{b}{|x|}\to-\infty$ for any $b<0$. Also, $\displaystyle\lim_{y\to\infty}\sin(y)$ and 
$\displaystyle\lim_{y\to-\infty}\sin(y)$ are not defined, as you observe. Therefore, for any $b\ne0$, $\displaystyle\lim_{x\to0}\sin\frac{b}{|x|}$ is not defined, which in turn means that $f$ is not continuous at $0$.
So, let us consider the situation where $b=0$. Then $\sin\frac{b}{|x|}=0$ for any $x\ne0$, which means that $\displaystyle\lim_{x\to0}\sin\frac{b}{|x|}=0$. So in order for $f$ to be continuous at $0$, we need $f(0)=0$.
Therefore, $f$ is continuous when $a=b=0$.
A: Well, you want to make sure that the y-value is the same for the first and the second function. 
So, the best possible answer would be when b = 0 and a = 0. In this scenario, the sin function will always equal zero when x doesn't equal zero. This is because sin(0/|x|), for whatever x value not including zero, will always equal sin(0) or 0.  When x does equal zero, then a will equal zero.
