# Studying this function: $y = \frac{x^2}{1+\log|x|}$

I'm still studying this function: $$y = \frac{x^2}{1+\log|x|}$$ And now I'm dealing with the study of the monotony. So I got the first derivative, this: $$y\,' = \frac{x(1+\log{x^2})}{(1+\log|x|)^2}$$ Then I put the first derivative $> 0$: $$\frac{x(1+\log{x^2})}{(1+\log|x|)^2} > 0$$ And to solve it I set those conditions:
$x > 0$
$1+\log{x^2} > 0$
$(1+\log|x|)^2 > 0$

That give me back these results:
$x > 0$
$x < -\frac{1}{\sqrt{e}}\vee x > \frac{1}{\sqrt{e}}$
$x < -\frac{1}{e} \vee x > \frac{1}{e}$

The problem in these results don't match with Wolfram Alpha's results, so I tried to solve the last condition in another way: not doing te square root of both members, but splitting it in two factors, in this way:
$$(1+\log|x|)(1+\log|x|) > 0$$ In this way it gives me two times the same result, but since these results have to be put on different lines of the positivity graphic, it matches with Wolfram Alpha..

My question now is: why the first way I adopted is wrong? For which mathematical principle?

-
What are you doing when you solve $(1+\log |x|)^2>0.$ It is a square: It is greater than zero everywhere it is defined and not $0$, so the solution is $x\in \mathbb{R} \setminus \{ \pm 1/e, 0 \}.$ –  Ragib Zaman Jul 3 '12 at 15:35
@RagibZaman It could be 0 if $\log|x|$ give back -1, an this makes the inequality not verified.. –  Overflowh Jul 3 '12 at 15:58
In the case that $\log |x|=-1$ your original function is not even defined, so investigating its properties there are useless. –  Ragib Zaman Jul 3 '12 at 16:00
@RagibZaman Oh, you are right.. The denominator condition is verified $\forall x \in$ DOMAIN :) –  Overflowh Jul 3 '12 at 16:19

You have:

$$\frac{x(1+\log{x^2})}{(1+\log|x|)^2} > 0$$

The denominator is greater than zero because it's a square. So you need $x(1+\log{x^2})$ to be greater than zero as well to have a positive fraction. Therefore:

• $x>0$
• $1+\log{x^2}>0$

Since $\log x$ is defined for all positive real numbers, you only need to worry about $1+\log{x^2}$.

-

Note first that the derivative is not defined when $x=0$, and also when $\log|x|=-1$, that is, at $x=\pm e^{-1}$. There seems to be no good reason to "simplify" $2\log|x|$ to $\log x^2$. So the derivative we will work with is
$$\frac{x(1+2\log|x|)}{(1+\log|x|)^2}.$$

We deal separately with positive $x$ and negative $x$. It can be quite dangerous to try to handle them together. Some of the problems in your first calculation seem to be linked to that.

Deal first with $x \gt 0$. The denominator, when defined, is positive. So we want $1+2\log|x| \gt 0$. That says $x \gt e^{-1/2}$, which is true in the interval $(e^{-1/2},\infty)$. (The problematic point $x=e^{-1}$ is not in this interval.) In fact the original function is increasing in the region $[e^{-1/2}, \infty)$.

Deal next with negative $x$. Our original function is symmetric about the $y$-axis. So to get the region of increase, roughly speaking we reflect the positive $x$ region of decrease across the $y$-axis. That sort of gives the interval $(-e^{-1/2},0)$. But there is a complication, since the original function is not defined at $x=e^{-1}$. So the proper region of increase for negative $x$ is $(-e^{-1/2},e^{-1}) \cup (e^{-1},0)$. We could replace $(-e^{-1/2},e^{-1})$ with $[e^{-1/2},e^{-1})$.

Or else note that since $x\lt 0$, we want $1+2\log|x| \lt 0$, meaning that $|x|\lt e^{-1/2}$. But $|x|=-x$, so we get $-x \lt e^{-1/2}$, meaning that $x\gt -e^{-1/2}$. (But we mustn't forget about the problem at $-e^{-1}$.)

Another way: Note that the derivative is undefined at $x=0$, $x=\pm e^{-1}$, and is $0$ at $x=\pm e^{-1/2}$. It is continuous everywhere else.

So the above list of $5$ points contains all the places where the derivative might change sign. These points divide the real line into $6$ intervals. We need only compute the sign of the derivative at one test point in each interval to determine its sign in the whole interval. This is not as bad as it looks. the derivative at $-x$ is the negative of the derivative at $x$, so we need only look at $3$ test points. The rest is easy, particularly since the denominator, when defined, is positive, so for sign calculations we can forget about it.

-