Prove that a function f is continuous (1) $f:\mathbb{R} \rightarrow \mathbb{R}$ such that

$$f(x) =
\begin{cases}
x \sin(\ln(|x|))& \text{if $x\neq0$} \\
0 & \text{if $x=0$}  \\
\end{cases}$$
Is $f$ continuous on  $\mathbb{R}$?

I want to use the fact that 2 continuous functions:

$$f:I \rightarrow J ( \subset \mathbb{R})$$
$$g:J \rightarrow \mathbb{R}$$
$$g \circ f:I \rightarrow \mathbb{R}, x \mapsto g(fx) $$
1)For $f=\ln(|x|)$:

"By the inverse of the Fundamental Theorem of Calculus, $\ln x$ is defined as an
integral, it is differentiable and its derivative is the integrand $1=\frac{1}{x}$.
As every differentiable
function is continuous, therefore $\ln x$ is continuous."
 so $f=\ln(|x|) ,I \in ]0, \infty)$ 
$f$ is continuous.


2)For $g= \sin(x)$:

if $\epsilon > 0, \exists \delta>0:$
 $$x \in J \wedge |x - x_0| < \delta  , x_0  \in \mathbb{R} $$

$$\Rightarrow |f(x) - f(x_0)| \epsilon \Leftrightarrow |\sin(x)-\sin(x_0)|< \epsilon$$
$$|\sin(x)| \leq |x|$$
$$\Leftrightarrow |\sin(x)-\sin(x_0)|<|x - x_0| < \delta = \epsilon$$
So $g$ is continuous on  $\mathbb{R}$

3)Because x is also continous on $\mathbb{R}$

$ \Rightarrow x \sin(\ln(|x|))$  is continuous.


Is my proof correct?

Are there shorter ways to get this result?
 A: Hint:
If $\,x_0\in\Bbb R\,$ and $\,f,g\,$ are two functions s.t.
$$(1)\;\;\;\;\lim_{x\to x_0}f(x)=0\\(2)\;\;\;\;\exists\,M,\epsilon\in\Bbb R\;,\;\;\epsilon , M>0\,\,s.t. \;\;|g(x)|\le M\;\;\forall\,x\in(x_0-\epsilon\,,\,x_0+\epsilon)$$
then
$$\lim_{x\to x_O}f(x)g(x)=0$$
A: For all $x\in (-\infty;0)\cup(0;+\infty)$ is function continuous since it is composition of continuous functions (I think it is necessary to show it in this task, as mentioned in comments, the real problem is $x=0$).
By definition, function is continuous at $x_0$, if $$\lim_{x\rightarrow x_0}f(x)=f(x_0)$$
In this case:
$$\lim_{x\rightarrow 0}x\sin(\ln(x))=0$$
because $\lim_{x\rightarrow0}=0$ and $|\sin(\ln(x))|\leq1$ (sine is bounded).
A: At any $x\ne 0$ the function $f$ is a composite of continuous functions ($\ln$, $\sin$, and $|-|$ are continuous functions). Since the composite of continuous functions is continuous, it follows that $f$ is continuous for all $x\ne 0$. Now, at $x=0$ you need to use something else. In this case, use the fact that if $g(x)$ is a bounded function and $h(x)$ has $\lim _{x\to 0}h(x)=0$, then $\lim_{x\to 0}g(x)\cdot h(x)=0$. Thus, write $f$ as a product $g(x)\cdot h(x)$ for suitable functions that satisfy the conditions. With that you will have proven that $\lim_{x\to 0} f(x)=0=f(0)$ and thus that $f$ is also continuous at $x=0$.
A: Just as  gt6989b comment, we only need to prove $f$ is continuos at $0$. 
$\lim_{x\to 0}f(x)=\lim_{x\to 0}x ln(|x|)=\lim_{x\to 0}\frac{ln(|x|)}{\frac1x}=\lim_{x\to 0}x=0$. So $f$ is continuous at 0.
