# Conclusions about derivability of a function $f(x)=x\left|{\log{x}}\right|$

I want to study the derivability of this function

$$f(x)=x\left|{\log{x}}\right|$$

My textbook says the function is defined for $x>0$ (easy to understand for me, the argument of the logarithm must be positive) and it says: "it can certainly be derived for $x\neq 1$". I wonder how my textbook reached this conclusion without deriving the function first. I'm aware derivatives are defined like this:

$$\lim_{h\rightarrow0}{\frac{f(x_0+h)-f(x_0)}{h}}$$

Although I can't understand how we can reach conclusions about derivability just by looking at the function. Any hints?

• The fact that behaviour of $|x|$ changes at 0 so you would expect whether $|\log(x)|$ also has a different behaviour when it attains it 0 that is at the point $x=1$. – Tutankhamun Aug 30 '18 at 8:28

For $x<1$ you have $f(x)=-x\log x$ and $f(x)=x \log (x)$ for $x>1$. Now use the product rule.

For $x=1$ the derivative of function does not exist, because $\lim_{x\rightarrow 1^{-}}f'(x)=-1$ and $\lim_{x\rightarrow 1^{+}}f'(x)=1.$

• What happens to the derivative when $x=1$? I see we all are excluding $x=1$ for some reason but $x\log{(x)}$ when $x=1$ is equal to $0$. What's wrong with that? – Cesare Aug 30 '18 at 7:45
• @Cesare: See edit. – gammatester Aug 30 '18 at 7:51

For $x>1$ and $0<x<1$ we have that $x\log x$ and $-x\log x$ are differentiable indeed

$$(x\log x)’=\log x+1$$

otherwise for $x= 1$ we need to check differentiability directly by the definition.

For $x>1$ we have $f(x)=x \log x$. Hence $f$ is a product of differentiable functions on $(1, \infty)$.

For $0<x<1$ we have $f(x)=-x \log x$. Hence $f$ is a product of differentiable functions on $(0,1)$.

• Really? Have you looked at a plot? – gammatester Aug 30 '18 at 7:51
• OOps ! Yes you are right. $f$ is not differentiable at $1$. – Fred Aug 30 '18 at 7:54

One can vizualize:

The graph of $\log x$ cuts $x$-axis at 1. Multiplying by $x$ doesn't influence this fact. Absolute value puts the negative part above the $x$-axis, and the graph becomes broken. Therefore, the function is not smooth at 1 (not derivable).