Is there a way to show this function is continuous at $x = 0$ by evaluating left hand and right hand limit?

Whenever you encounter a question about limits, you should first check which kind of indeterminate form that function is forming. Many questions look confusing can be solved by considering this.

Consider the function given in your question. If you put the limits in to check which indeterminate form it is, you will see that it is not in any indeterminate form. So you have to show the continuity using some arguments.

You will get $f(0^+)= 0 \times |\cos(2π/0)|$. What is $\cos(2π/0)$? It tends to $\cos(∞)$, which oscillates between $0$ and $1$. So $f(0^+)$ is $0$ times a number between 0 and 1, which is actually zero.

You can use similar argument to show for Left hand limit, i.e. $f(0^-)$.

So LHL$=$RHL$=f(0)=0$, hence, the function given is continuous.


$$f(x)= x|\cos(2\pi/x)|$$

Right hand limit:

$$\lim_{x\rightarrow 0^+} f(x)= 0^+\times|\cos(2\pi/0^+)|=0^+\times|\cos(+\infty)|$$

Since $\cos(x)$ is bounded: $$0 \leq |\cos(+\infty)| \leq 1$$

We can see that because $0^+$ multiplies a bounded value is $0$, the limit is $0$.
Or, multiply the inequality with $0^+$:

$$0^+ \times 0 \leq 0^+ \times|\cos(+\infty)| \leq 0^+ \times 1$$ $$0 \leq 0^+ \times|\cos(+\infty)| \leq 0$$

Therefore, $$\lim_{x\rightarrow 0^+} f(x)=0^+\times|\cos(+\infty)|=0$$

Left hand limit:

$$\lim_{x\rightarrow 0^-} f(x)= 0^-\times|\cos(2\pi/0^-)|=0^+\times|\cos(-\infty)|$$

$$0 \leq |\cos(-\infty)| \leq 1$$

Similarly, $0^- \times|\cos(-\infty)|$ is also $0$. Multiply the inequality with $0^-$:

$$0^- \times 0 \geq 0^- \times|\cos(-\infty)| \geq 0^- \times 1$$ $$0 \geq 0^- \times|\cos(-\infty)| \geq 0$$

Therefore,

$$\lim_{x\rightarrow 0^-} f(x)=0^-\times|\cos(-\infty)|=0.$$

Finally,

$$\lim_{x\rightarrow 0^-} f(x)= \lim_{x\rightarrow 0^+} f(x)= f(0)=0.$$ The function is continuous.


Theorem. Let $f(x)$ a $\tau-$period function, different from constant one. Then, it has no limit when $x\to+\infty$ or $x\to -\infty$.

Using only this theorem, one can think he is not able to solve the $\lim_{x\to 0}x\cdot\left|\cos\left(\frac{2\pi}{x}\right)\right|$. But, here it comes another theorem.

Theorem. Let $f(x)$ a bounded function in $I(x_0)$ and $g(x)$ such that $\lim_{x\to x_0}g(x)=0$, than: $$\lim_{x\to x_0}f(x)\cdot g(x)=0$$ Here, let $f(x)=\left|\cos\left(\frac{2\pi}{x}\right)\right|$ that is bounded in $[-1,1]$. Let $g(x)=x$. By the previous theorem, we can say that: $$\lim_{x\to 0}x\cdot\left|\cos\left(\frac{2\pi}{x}\right)\right|=0$$ You can extend the function with continuity, letting: $$\tilde h(x)=\left\{\begin{matrix} x\cdot\left|\cos\left(\frac{2\pi}{x}\right)\right| \;\;x\neq 0\\ 0\;\;\;\;\,\;\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, x = 0 & \end{matrix}\right.$$