# Why don't logarithms work here?

I have this problem:

For what values of $$x$$ is $$x^6 \ge x^8$$?

I solved this by the following.

\begin{align} x^6 & \ge x^8 \\ \Longrightarrow \quad 1 & \ge x^2 \\ \end{align} Therefore $$-1 \le x \le 1$$

When using the power identity for logarithms however, and dividing by $$\ln x$$, the answer is $$6 \ge 8$$. Why?

$$x^6 \ge x^8$$ $$6\ln x \ge 8\ln x$$ $$6 \ge 8$$

• Write out the steps using the log. Don't forget that $\text{ln}(x)<0$ if $0<x<1$. Be careful with reasonings such that "canceling out". – anderstood Aug 11 '16 at 21:17
• $x\le 1~\color{Red}{or}~x\ge-1$ should be and. – arctic tern Aug 11 '16 at 21:55
• When working with inequalities you must be careful about dividing through / multiplying through, as the direction of the inequality flips with negative numbers. – Doug M Aug 11 '16 at 21:59
• xkcd.com/451 – Elliot Gorokhovsky Aug 12 '16 at 1:42
• Your first solution isn't rigorous. You are dividing by $x$ so that you should exclude $x=0$ (and treat it separately), which you didn't. – Yves Daoust Aug 12 '16 at 6:44

Let's take a closer look at your calculations:

$$x^6\geq x^8 \Leftrightarrow \ln(x^6)\geq \ln(x^8)$$

Here we must have $x\neq 0$, because $\ln(0)$ is not well-defined. So you have to check if the inequality holds for $x=0$ separately. (It does hold).

Now you want to use $$\ln(x^6)=6\cdot\ln(x)\geq 8\cdot\ln(x)=\ln(x^8).$$ This only holds for $x>0$, as $\ln(x)$ is only well-defined for $x>0$. Be sure to always check the requirements when using such rules. So for now we can only continue with the assumption $x>0$.

Your next step would be to divide both sides by $\ln(x)$. We can only do this, if $\ln(x)\neq 0$ which is equivalent to $x\neq 1$. So you also have to check if the inequality holds for $x=1$ separately (it does hold).

Assuming that we have $x>0$ and $x\neq 1$ we can now divide by $\ln(x)$. But because we are dealing with an inequality, we have to be careful and take a look at the sign of $\ln(x)$: $$\ln(x)>0 \Leftrightarrow x>1,\quad \ln(x)<0 \Leftrightarrow 0<x<1.$$ So we have to distinguish two cases:

If $x>1$ we have: $$x^6\geq x^8 \Leftrightarrow \ln(x^6)\geq \ln(x^8) \Leftrightarrow 6\ln(x)\geq 8\ln(x) \Leftrightarrow 6\geq 8.$$ This is not true, thus the inequality doesn't hold for $x>1$.

For $0<x<1$ we get: $$x^6\geq x^8 \Leftrightarrow \ln(x^6)\geq \ln(x^8) \Leftrightarrow 6\ln(x)\geq 8\ln(x) \Leftrightarrow 6\leq 8.$$ This is true, thus the inequality holds for $0<x<1$.

We now have to do the same steps again for $x<0$, using that in this case we have $$\ln(x^6)=6\cdot\ln(-x),\ln(x^8)=8\cdot\ln(-x).$$ (I don't feel like writing the same steps again...)

The problem that arose with your calculations is, that you just applied some rule you heard of without carefully checking if you are allowed to apply this rule. Also to "just cancel out" often leads to problems, when one doesn't check that there is no $0$ involved that might get canceled.

Another (personal) remark: why would one use logarithms to solve this inequality? Just because it is possible to solve this question, doesn't mean that one should do it (you can see that a correct use of logarithms leads to a very long solution with lots of cases one has to think about).

• This one well answers "Why?" concerning the ln(x) part in a nice step-by-step way. – chux - Reinstate Monica Aug 12 '16 at 0:52
• It might be worth reiterating towards the end that the three cases $x \in \{ -1, 0, 1\}$ still need to be done. – user14972 Aug 12 '16 at 9:53
• To add to the last paragraph: logarithms are indeed really overkill here. All you have to do is think that when you multiply something by a factor greater than 1, the thing increases, and when you multiply by a factor between 0 and 1, it decreases, so that $x^6\leq x^8$ is indeed equivalent to $0\leq x \leq 1$ (for positive $x$). – Jack M Aug 12 '16 at 11:44
• I assume that the OP was looking for insight into why the two methods gave divergent answers - perhaps logarithms are new, or perhaps they represent the OP's most intuitive tactic. In any event, asking 'why would you do it that way?' in math seems short-sighted not only because every legal way should give correct results, but because most of us are still learning math and it's wise to check our work. – user121330 Aug 12 '16 at 22:10

$\ln x$ is negative when $0<x<1$, so when you cancel that you may need to invert the inequality depending on what $x$ is.

(And, of course, taking logarithms does not work well for negative $x$ at all).

• Why wouldn't log(-x) work? It's just a complex number. – Navin Aug 12 '16 at 6:58
• @Navin: Because (a) $\log(x^y)=y\log x$ does not work in general unless $x$ and $y$ are both positive reals, and (b) inequalities do not work at all for complex numbers. – hmakholm left over Monica Aug 12 '16 at 8:17

I would recommend to you never to “cancel”. Rather, you want to do the same thing to both sides of an equation; or, under suitable circumstances, to both sides of an inequality; or to multiply top and bottom of a fraction by the same thing.

So you took the inequality $x^6\ge x^8$. It’s not at all clear what you meant by the “logarithm identity”, but probably you took the log of both sides, to get $6\ln x\ge8\ln x$. Now what? If $\ln x$ is positive, you divide both sides by it and get the false inequality $6\ge8$. but if $\ln x$ is zero, you get a true equality $0=0$, and this is fine. Also, if $\ln x$ is negative, when you divide both sides of $6\ln x\ge8\ln x$ by $\ln x$, the inequality reverses, giving you the valid inequality $6\le 8$.

Conclusion? We get $\ln x\le0$, in other words $0<x\le1$.

• I should delete this answer, because that of @Battani is so much better. But I want the sermon to stay. – Lubin Aug 11 '16 at 21:40
• You should correct that little bit where you say $x^6 = 6 \ln x$. (Think negative) – AlexR Aug 12 '16 at 16:02
• I don’t think I could possibly have said just that, @AlexR . But I should have said $3\ln(x^2)\ge4\ln(x^2)$, and have cast the rest of the argument in those terms. – Lubin Aug 12 '16 at 19:23
• Yet, your answer still contains this minor mistake... – AlexR Aug 12 '16 at 19:32

You can't divide both side to $x^8$ hence $0$ holds inequation.Furthermore,the solution of inequation is $${ x }^{ 6 }\left( x-1 \right) \left( x+1 \right) \le 0$$

$$x\in [-1 ,1]$$

Next step is clear from the answer above

• You made a little error in sign, since clearly $(-2)^6$ is not greater than $(-2)^8$. The situation is symmetric, so the right interval is $[-1,1]$. But your method is far superior, since it does not follow OP’s false lead to use logarithms. – Lubin Aug 11 '16 at 21:47
• @Lubin,thanks it was a silly mistake – haqnatural Aug 11 '16 at 21:51
• You cannot write "the answer above" an expect it to be understood what you're talking about. The order that the site presents answers in changes dynamically depending on vote counts (or whichever other sorting criteria the user has chosen), so you cannot predict whether the answer you're thinking of will be shown above or below yours. – hmakholm left over Monica Aug 12 '16 at 9:32

Canceling the logs is not a valid step because it's possible that $\ln x = 0$. This happens when $x=1$, which is a valid solution value for the original inequality. So canceling like that can cause solutions to be lost.

Also, $\ln x$ can be negative. In this case you'll need to reverse the inequality sign. This happens when $0 < x < 1$.

If you're very careful, you can get part of the right answer by taking logs. But this method should still be avoided because it loses solutions. And the biggest reason of all, when you take logs and then use the log power rule as you did, you completely remove $x \le 0$ from the domain, and in general this can lead (and does in this case) to more lost solutions.

Note that dividing both sides by $x^8$ is also not valid because this is not allowed if $x=0$. It still leads to the right answer but that's a happy accident. If you do that method on an assignment, test, etc., you're likely to lose points.

The proper way to do this problem is as follows:

\begin{align} x^6 &\ge x^8\\ x^6 - x^8 &\ge 0\\ x^6(1-x^2) &\ge 0 \end{align}

Equality is obtained when $x=0$ or $x=\pm 1$. For the strict inequality $x^6(1-x^2) > 0$, this is true if $x^6$ and $1-x^2$ are both positive or if they're both negative. Note that $x^6$ is never negative. So the strict inequality is only satisfied when both factors are positive. $x^6 > 0$ when $x \ne 0$ and $1-x^2 >0$ when $-1 < x < 1$.

Putting everything together tells us the solution is $-1\le x \le 1$, i.e., $[-1,1]$.

• Rolling back the mostly stylistic edits. Please don't make stylistic edits on my posts. I'm open to changing "The proper way" to "A proper way" if there is indeed another proper way apart from factoring. – user307169 Aug 9 '18 at 13:14

You can avoid division issues in the inequality by following this subtraction track. If $x=0$, the inequality is true. If $x\neq 0$, you can take the $\log$ because quantities $x^6$ and $x^8$ are strictly positive.

$x^6 \ge x^8 \implies 6 \log |x| \ge 8 \log |x| \implies (6-8)\log |x| \ge 0$

which implies that $\log |x| \le 0$, or $x\in [-1\; 0[\cup]0\;1]$. Do not forget the absolute value when putting an even power out of a logarithm. Now your set of solutions is included in $\{0\}\cup[-1\; 0[\cup]0\;1] = [-1\;1]$.

If $x\in [-1\;1]$, $x^2\le 1$, hence $x^6 x^2 \le x^6$, so the set of solutions is the whole segment $[-1\;1]$.

From $$x^6\ge x^8,$$ taking the logarithms

$$\log x^6\ge\log x^8$$

follows, provided that both arguments are positive. So we need to handle $x=0$ separately, and this is trivial.

Next, as the exponents are even, we can rewrite (with a mandatory absolute value)

$$6\log|x|\ge8\log|x|,$$ which is just

$$\log|x|\le 0,$$ or

$$0<|x|\le1.$$

If you insist on using a division, you need to discuss the sign before simplifying

• $\log|x|>0\implies6\ge8$ which is impossible,

• $\log|x|=0\implies0\ge0$, so that $|x|=1$ are solutions,

• $\log|x|<0\implies6\le8$ so that $0<|x|\le1$ are solutions.

A contrived argument:

By inspection, $x=0$ is a solution.

Then without loss of generality, $x>0$, because if $x$ is a solution, so is $-x$. This allows us to write

$$6\log x\ge8\log x.$$

By inspection, $\log x=0$ is a solution.

Then without loss of generality, $\log x> 0$ because if $\log x$ is a solution, $-\log x$ is a non-solution, and conversely. This allows us to write

$$6\ge8$$ and there are no solutions for $\log x$, so that all $-\log x>0$, i.e. $x<1$, are solutions.

Hence

$$x=0\lor(x>0\land x<1\land-x<1).$$