# LOGARITHMIC INEQUALITY - TWO HOURS

Source: Brilliant

Solve the inequality $$\ x \log_{\log_{|x^2 - 3 | - 2 } (x^2 - 3|x| + 2) } \left( \dfrac{x^3 - |3x+2|}{x^3 - |3x-2|}\right) \geq 0$$

I have tried this many times, but I keep ending up with the wrong result. At first I thought the answer key was wrong, but I typed the equation on my TI-84 Plus calculator was agreeing with the answer key as well. I think my whole approach to solving the problem is incorrect.

Terminology:

# $$\log_{Base}(Argument)= Result$$

I want to know the general solution to this in order to solve my problem:

# $$Case 1:$$

Given the first function: $$f(x)\geq0$$ As the product of two postive functions is positive, it must also be that : $$\log_{\log_{g(x) } (h(x)) } \left( \dfrac{a(x)}{b(x)}\right)\geq 0$$ For the whole expression to be positive.

In order for the logarithmic function (with a variable base) to be positive, we must consider two subcases. The reason for the these two subcases is due to the change in behavior of the logarithmic function in two different regions of the base.

Case 1.1:$$\log_{g(x) } (h(x)) \in {(0,1)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {(0,1]}$$

To solve Case 1.1 this we must to consider 4 inequalities:

# 1. $$\log_{g(x) } (h(x)) > 0$$

Case 1.11:$$g(x) \in {(0,1)} \cap h(x) \in {(0,1)}$$ Case 1.12:$$g(x) \in {(1,\infty)} \cap h(x) \in {(1,\infty)}$$

# 2. $$\log_{g(x) } (h(x)) < 1$$

There are two ways to solve this.

i) Either we use a property of logarithms:

$$\log_{a } (a) = 1$$

ii) Or we consider the behaviour of the logarithmic graph (with a variable base) that is less that one.

We will use option (i) here to obtain:

$$\log_{g(x) } (h(x)) < \log_{g(x) } (g(x))$$

Sending the RHS to LHS and using the subtraction of logs with same base property: $$\log_{g(x) } (h(x)) - \log_{g(x) } (g(x))<0$$ $$\log_{g(x) } \left( \dfrac{h(x)}{g(x)}\right) <0$$

# 3. $$\left( \dfrac{a(x)}{b(x)}\right)>0$$

$$(a(x)>0 \cap b(x) >0) \cup(a(x)<0 \cap b(x)<0)$$

# 4. $$\left( \dfrac{a(x)}{b(x)}\right)\leq1$$

Let $$a(x) - b(x) = c(x)$$ Then $$\left( \dfrac{c(x)}{b(x)}\right)\leq0$$ $$(c(x)\geq0 \cap b(x) <0) \cup(c(x)leq0 \cap b(x)>0)$$

Case 1.2:$$\log_{g(x) } (h(x)) \in {(1,\infty)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {[1,\infty)}$$

To solve Case 1.2 this we must to consider 2 inequalities:

# 2. $$\left( \dfrac{a(x)}{b(x)}\right)\geq1$$

Let $$a(x) - b(x) = c(x)$$ Then $$\left( \dfrac{c(x)}{b(x)}\right)\geq0$$ $$(c(x)\geq0 \cap b(x) >0) \cup(c(x)leq0 \cap b(x)<0)$$

Solution Set:

$$\implies x \in {(CASE 1.1) \cup (CASE1.2)\cap (CASE 1)}$$

# $$Case 2:$$

Given the first function $$f(x)\leq0$$ As the product of two negative functions is positive it must also be that: $$\log_{\log_{g(x) } (h(x)) } \left( \dfrac{a(x)}{b(x)}\right)\leq0$$ For the whole expression to be positive.

In order for the logarithmic function (with a variable base) to be negative, we must consider two subcases. The reason for the these two subcases is due to the change in behaviour of the logarithmic function in two different regions of the base.

Case 2.1:$$\log_{g(x) } (h(x)) \in {(0,1)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {[1,\infty)}$$

To solve this we must to consider: $$\log_{g(x) } (h(x)) > 0$$ $\g(x) \in {(0,1)} \cap h(x) \in {(0,1)}$ $\g(x) \in {(1,\infty)} \cap h(x) \in {(1,\infty}$ $$\log_{g(x) } (h(x)) < 1$$ $$\left( \dfrac{a(x)}{b(x)}\right)\geq1$$

Case 2.2:$$\log_{g(x) } (h(x)) \in {(1,\infty)} \cap \left( \dfrac{a(x)}{b(x)}\right) \in {(0,1]}$$

To solve this we must to consider: $$\log_{g(x) } (h(x)) > 1$$ $$\left( \dfrac{a(x)}{b(x)}\right)>0$$ $$\left( \dfrac{a(x)}{b(x)}\right)\leq1$$

Solution Set:

$$\implies x \in {(CASE 2.1) \cup (CASE 2.2)}\cap (CASE2)$$

One of my hurdles in this problem is the depressed cubic and the 4 modulus functions:

In two cases of the modulus function in the argument of the logarithm, the cubic has 3 trivial real roots. To obtain the real roots case I used trigonometric substitution. In the other two cases The roots were complex and non trivial and for the complex roots I used Vieta's Substitution. (Cardanos method)

What I'm have trouble with is the conditions and relationships that must hold to make the logarithm be non-negative.

Also how to tell if a cubic has imaginary or real roots.

Any help would be greatly appreciated thank you!!

Extra

[How to solve this logarithm inequality with absolute value as its base? In this link, if you scroll down, you will see I have solved it.

• Comments are not for extended discussion; this conversation has been moved to chat. Apr 2, 2017 at 16:57

We want to solve $$\ x \log_{\log_{f(x)} (g(x)) } \left( h(x)\right) \geq 0$$

where $$f(x)=|x^2 - 3 | - 2,\quad g(x)=x^2 - 3|x| + 2,\quad h(x)= \dfrac{x^3 - |3x+2|}{x^3 - |3x-2|}$$

First of all, $x=0$ is not a solution since $f(0)=1$.

Comparing $x$ with $0$, $f(x)$ with $1$, $g(x)$ with $f(x)$, $h(x)$ with $1$, we have eight cases to consider :

Case 1 : $x\lt 0$ and $0\lt f(x)\lt 1$ and $f(x)\lt g(x)\lt 1$ and $h(x)\ge 1$

Case 2 : $x\lt 0$ and $f(x)\gt 1$ and $1\lt g(x)\lt f(x)$ and $h(x)\ge 1$

Case 3 : $x\lt 0$ and $0\lt f(x)\lt 1$ and $0\lt g(x)\lt f(x)$ and $0\lt h(x)\le 1$

Case 4 : $x\lt 0$ and $f(x)\gt 1$ and $g(x)\gt f(x)$ and $0\lt h(x)\le 1$

Case 5 : $x\gt 0$ and $0\lt f(x)\lt 1$ and $f(x)\lt g(x)\lt 1$ and $0\lt h(x)\le 1$

Case 6 : $x\gt 0$ and $f(x)\gt 1$ and $1\lt g(x)\lt f(x)$ and $0\lt h(x)\le 1$

Case 7 : $x\gt 0$ and $0\lt f(x)\lt 1$ and $0\lt g(x)\lt f(x)$ and $h(x)\ge 1$

Case 8 : $x\gt 0$ and $f(x)\gt 1$ and $g(x)\gt f(x)$ and $h(x)\ge 1$

Using the following lemmas :

Lemma 1 : If $x\lt 0$, then $h(x)\lt 1$.

Lemma 2 : There are no $x$ such that $f(x)\gt 1$ and $g(x)\gt f(x)$.

(The proofs for the lemmas are written at the end of the answer.)

we see that Case 1, Case 2, Case 4, Case 8 don't happen.

Now, we have four cases to consider :

Case 3 : $x\lt 0$ and $0\lt g(x)\lt f(x)\lt 1$ and $0\lt h(x)\le 1$

Case 5 : $x\gt 0$ and $0\lt f(x)\lt g(x)\lt 1$ and $0\lt h(x)\le 1$

Case 6 : $x\gt 0$ and $1\lt g(x)\lt f(x)$ and $0\lt h(x)\le 1$

Case 7 : $x\gt 0$ and $0\lt g(x)\lt f(x)\lt 1$ and $h(x)\ge 1$

Case 3 : $x\lt 0$ and $0\lt g(x)\lt f(x)\lt 1$ and $0\lt h(x)\le 1$

Since $x\lt 0$, we have $g(x)=x^2-3(-x)+2=x^2+3x+2$.

Case 3-1 : For $x\in(-\infty,-\sqrt 3)$, we have $$f(x)=(x^2-3)-2=x^2-5,\quad h(x)=\frac{x^3-(-(3x+2))}{x^3-(-(3x-2))}=\frac{x^3+3x+2}{x^3+3x-2}$$ $$0\lt g(x)\lt f(x)\lt 1\iff 0\lt x^2+3x+2\lt x^2-5\lt 1\iff x\in\left(-\sqrt 6,-\frac 73\right)$$ Since $x^3+3x-2\lt 0$ for $x\lt 0$, $$0\lt h(x)\le 1\iff 0\lt \frac{x^3+3x+2}{x^3+3x-2}\le 1\iff x^3+3x-2\le x^3+3x+2\lt 0$$ $$\iff x^3+3x+2\lt 0\iff x\lt \alpha$$ where $\left(-\frac 73\lt\right)\alpha$ is the only root of $i(x)=x^3+3x+2$ which is increasing with $i(-7/3)\lt 0$.

So, in this case, we have $$x\in\left(-\sqrt 6,-\frac 73\right)\tag1$$

Case 3-2 : For $x\in\left[-\sqrt 3,-\frac 23\right)$, we have $$f(x)=-(x^2-3)-2=-x^2+1,\quad h(x)=\frac{x^3-(-(3x+2))}{x^3-(-(3x-2))}=\frac{x^3+3x+2}{x^3+3x-2}$$

$$0\lt g(x)\lt f(x)\lt 1\iff 0\lt x^2+3x+2\lt -x^2+1\lt 1\iff x\in\left(-1,-\frac 12\right)$$

$$0\lt h(x)\le 1\iff x\lt \alpha$$where $\left(-\frac 23\lt\right)\alpha$ is the only root of $i(x)=x^3+3x+2$ which is increasing with $i(-2/3)\lt 0$.

So, in this case, we have $$x\in\left(-1,-\frac 23\right)\tag2$$

Case 3-3 : For $x\in\left[-\frac 23,0\right)$, we have $$f(x)=-(x^2-3)-2=-x^2+1,\quad h(x)=\frac{x^3-(3x+2)}{x^3-(-(3x-2))}=\frac{x^3-3x-2}{x^3+3x-2}$$

$$0\lt g(x)\lt f(x)\lt 1\iff x\in\left(-1,-\frac 12\right)$$ $$0\lt h(x)\le 1\iff 0\lt \frac{x^3-3x-2}{x^3+3x-2}\le 1\iff x^3+3x-2\le x^3-3x-2\lt 0$$ $$\iff x^3-3x-2=(x-2)(x+1)^2\lt 0\iff x\in(-\infty,-1)\cup (-1,2)$$ So, in this case, we have $$x\in \left[-\frac 23,-\frac 12\right)\tag3$$

Therefore, in Case 3, we have $$(1)\cup (2)\cup (3)\iff x\in\left(-\sqrt 6,-\frac 73\right)\cup \left(-1,-\frac 12\right)\tag4$$

Case 5 : $x\gt 0$ and $0\lt f(x)\lt g(x)\lt 1$ and $0\lt h(x)\le 1$

Since $x\gt 0$, we have $g(x)=x^2-3x+2$.

Case 5-1 : For $x\in\left(0,\frac 23\right)$, we have $$f(x)=-(x^2-3)-2=-x^2+1,\quad h(x)=\frac{x^3-(3x+2)}{x^3-(-(3x-2))}=\frac{x^3-3x-2}{x^3+3x-2}$$ $$0\lt f(x)\lt g(x)\lt 1\iff 0\lt -x^2+1\lt x^2-3x+2\lt 1\iff x\in\left(\frac{3-\sqrt 5}{2},\frac 12\right)$$ Since $x^3+3x-2\lt 0$ for $x\lt \frac 12$ where $j(x)=x^3+3x-2$ is increasing with $j(1/2)\lt 0$, $$0\lt h(x)\le 1\iff 0\lt \frac{x^3-3x-2}{x^3+3x-2}\le 1\iff x^3+3x-2\le x^3-3x-2\lt 0$$ which does not hold for $x\gt 0$.

Case 5-2 : For $x\in\left[\frac 23,\sqrt 3\right)$, we have $f(x)=-x^2+1$ and $$0\lt f(x)\lt g(x)\lt 1\iff x\in\left(\frac{3-\sqrt 5}{2},\frac 12\right)$$ There are no $x$ such that $x\in\left[\frac 23,\sqrt 3\right)\cap \left(\frac{3-\sqrt 5}{2},\frac 12\right)$.

Case 5-3 : For $x\in [\sqrt 3,\infty)$, we have $$f(x)=(x^2-3)-2=x^2-5,\quad h(x)=\frac{x^3-(3x+2)}{x^3-(3x-2)}=\frac{x^3-3x-2}{x^3-3x+2}$$ $$0\lt f(x)\lt g(x)\lt 1\iff 0\lt x^2-5\lt x^2-3x+2\lt 1\iff x\in\left(\sqrt 5,\frac 73\right)$$ Since $x^3-3x+2=(x+2)(x-1)^2\gt 0$ for $x\ge \sqrt 3$, $$0\lt h(x)\le 1\iff 0\lt \frac{x^3-3x-2}{x^3-3x+2}\le 1\iff 0\lt x^3-3x-2\le x^3-3x+2$$ $$\iff 0\lt x^3-3x-2=(x-2)(x+1)^2\iff x\in (2,\infty)$$ Therefore, in Case 5, we have $$x\in\left(\sqrt 5,\frac 73\right)\tag5$$

Case 6 : $x\gt 0$ and $1\lt g(x)\lt f(x)$ and $0\lt h(x)\le 1$

Since $x\gt 0$, we have $g(x)=x^2-3x+2$.

Case 6-1 : For $x\in\left(0,\sqrt 3\right)$, we have $f(x)=-(x^2-3)-2=-x^2+1$ and $$1\lt g(x)\lt f(x)\iff 1\lt x^2-3x+2\lt -x^2+1$$ There are no such $x$.

Case 6-2 : For $x\in [\sqrt 3,\infty)$, we have $$f(x)=(x^2-3)-2=x^2-5,\quad h(x)=\frac{x^3-3x-2}{x^3-3x+2}$$

$$1\lt g(x)\lt f(x)\iff 1\lt x^2-3x+2\lt x^2-5\iff x\in\left(\frac{3+\sqrt 5}{2},\infty\right)$$ $$0\lt h(x)\le 1\iff x\in (2,\infty)$$

Therefore, in Case 6, we have $$x\in\left(\frac{3+\sqrt 5}{2},\infty\right)\tag6$$

Case 7 : $x\gt 0$ and $0\lt g(x)\lt f(x)\lt 1$ and $h(x)\ge 1$

Since $x\gt 0$, we have $g(x)=x^2-3x+2$.

Case 7-1 : For $x\in\left(0,\frac 23\right)$, we have $$f(x)=-(x^2-3)-2=-x^2+1,\quad h(x)=\frac{x^3-(3x+2)}{x^3-(-(3x-2))}=\frac{x^3-3x-2}{x^3+3x-2}$$ $$0\lt g(x)\lt f(x)\lt 1\iff 0\lt x^2-3x+2\lt -x^2+1\lt 1\iff x\in\left(\frac 12,1\right)$$ Since $j(x)=x^3+3x-2$ is increasing with $j(\beta)=0$ where $\frac 12\lt \beta\lt \frac 23$, we have

• For $x\lt\beta$ where $x^3+3x-2\lt 0$, $$h(x)\ge 1\iff \frac{x^3-3x-2}{x^3+3x-2}\ge 1\iff x^3-3x-2\le x^3+3x-2\iff x\ge 0$$

• For $x\gt\beta$ where $x^3+3x-2\gt 0$, $$h(x)\ge 1\iff \frac{x^3-3x-2}{x^3+3x-2}\ge 1\iff x^3-3x-2\ge x^3+3x-2\iff x\le 0$$

from which we have $$h(x)\ge 1\iff 0\lt x\lt\beta$$

So, in this case, we have $$x\in\left(\frac 12,\beta\right)$$ where $\beta\approx 0.596$ is the only real root of $x^3+3x-2$.

Case 7-2 : For $x\in \left[\frac 23,\infty\right)$, we have $$h(x)=\frac{x^3-(3x+2)}{x^3-(3x-2)}=\frac{x^3-3x-2}{x^3-3x+2}$$ Since $x^3-3x+2=(x+2)(x-1)^2\gt 0$ for $x\in \left[\frac 23,\infty\right)$ with $x\not=1$, $$h(x)\ge 1\iff \frac{x^3-3x-2}{x^3-3x+2}\ge 1\iff x^3-3x-2\ge x^3-3x+2$$ There are no such $x$.

Therefore, in Case 7, we have $$x\in\left(\frac 12,\beta\right)\tag7$$ where $\beta\approx 0.596$ is the only real root of $x^3+3x-2$.

Hence, the answer is $(4)\cup (5)\cup (6)\cup (7)$, i.e. $$\small\color{red}{x\in\left(-\sqrt 6,-\frac 73\right)\cup \left(-1,-\frac 12\right)\cup \left(\frac 12,\sqrt[3]{1+\sqrt 2}-\frac{1}{\sqrt[3]{1+\sqrt 2}}\right)\cup \left(\sqrt 5,\frac 73\right)\cup \left(\frac{3+\sqrt 5}{2},\infty\right)}$$ where $\sqrt[3]{1+\sqrt 2}-\frac{1}{\sqrt[3]{1+\sqrt 2}}=\beta\approx 0.596$ is the only real root of $x^3+3x-2$.

(From Sid's comment, we can find $\beta$ by setting $x=y-\frac 1y$ for $x^3+3x-2=0$ to have $(y^3)^2-2y^3-1=0$ which is a quadratic equation on $y^3$.)

Finally, let us prove Lemma 1 and Lemma 2.

Lemma 1 : If $x\lt 0$, then $h(x)\lt 1$.

Proof :

$$h(x)\ge 1\iff \frac{x^3-|3x+2|}{x^3-|3x-2|}\ge 1$$

• For $x\in\left(-\infty,-\frac 23\right)$, since $x^3+3x-2\lt 0$, $$h(x)\ge 1\iff \frac{x^3+3x+2}{x^3+3x-2}\ge 1\iff x^3+3x+2\le x^3+3x-2$$which does not hold.

• For $x\in\left[-\frac 23,\beta\right)$ where $\beta$ is the only real root of $x^3+3x-2$, since $x^3+3x-2\lt 0$, $$h(x)\ge 1\iff\frac{x^3-3x-2}{x^3+3x-2}\ge 1\iff x^3-3x-2\le x^3+3x-2\iff x\ge 0$$

• For $x\in\left(\beta,\frac 23\right)$, since $x^3+3x-2\gt 0$, $$h(x)\ge 1\iff \frac{x^3-3x-2}{x^3+3x-2}\ge 1\iff x^3-3x-2\ge x^3+3x-2\iff x\le 0$$

• For $x\in\left[\frac 23,\infty\right)$, since $x^3-3x+2=(x+2)(x-1)^2\gt 0$ with $x\not=1$, $$h(x)\ge 1\iff \frac{x^3-3x-2}{x^3-3x+2}\ge 1\iff x^3-3x-2\ge x^3-3x+2$$which does not hold.

So, the claim follows from that $h(x)\ge 1\implies x\ge 0$. $\quad\blacksquare$

Lemma 2 : There are no $x$ such that $f(x)\gt 1$ and $g(x)\gt f(x)$.

Proof :

$$f(x)\gt 1\iff |x^2-3|-2\gt 1\iff |x^2-3|\gt 3$$ $$\iff x^2-3\lt -3\quad\text{or}\quad x^2-3\gt 3\iff x\in (-\infty,-\sqrt 6)\cup (\sqrt 6,\infty)$$ On the other hand, $$g(x)\gt f(x)\iff x^2-3|x|+2\gt |x^2-3|-2$$

• For $x\in (-\infty,-\sqrt 6)$, $$g(x)\gt f(x)\iff x^2-3(-x)+2\gt (x^2-3)-2\iff x\in \left(-\frac 73,\infty\right)$$

• For $x\in (\sqrt 6,\infty)$, $$g(x)\gt f(x)\iff x^2-3x+2\gt (x^2-3)-2\iff x\in\left(-\infty,\frac 73\right)$$

The claim follows from that $\frac 73\lt \sqrt 6$. $\quad\blacksquare$

• This is matching with the answer key. Thanks for all your efforts. It really helped. In the book there is a tip that says to find the root, substitute x= $a-\dfrac{1}{a}$ and simplify, you will get a quadratic and you can find the only real root. Please do so and complete the answer. Thanks in advance. P.S. I am talking about $beta$
– Sid
Apr 2, 2017 at 6:55
• @Sid: That's nice idea. I've edited the answer. Apr 2, 2017 at 7:30
• I really appreciate how you didn't consider all the cases and proved there is no point. The makes the problem shorter and less tedious. You proved with calculus that the cubic has only 1 real root, but isn't there a way to formally prove this? How do u find the discriminant of a cubic?
– Sid
Apr 2, 2017 at 7:40
• @Sid: Ah, there is no calculus tag, sorry I didn't notice that. For the discriminant of a cubic, you might want to see here. Apr 2, 2017 at 7:53
• The original question was to find the number of intervals in the solution set which is 5 and the sum of all the boundaries of the $finite$ open intervals which is approximately 2. Their sum is 7. Just for the sake of curiosity, how long did would this problem take to solve on pen and paper? 30 minutes or more?
– Sid
Apr 3, 2017 at 5:19

Let us rewrite the equation to $$x\log_{r(x)} s(x) \geq 0$$ where $$r(x)=\log_{|x^2-3|-2} (x^2-3|x|+2)$$and $$s(x)=\frac{x^3-|3x+2|}{x^3-|3x-2|}$$

For the above function to be non-negative we have following cases

1)$x>0$ and $0<r(x)<1$ and $0<s(x)<1$

2)$x>0$ and $r(x)>1$ and $1<s(x)<\infty$

3)$x<0$ and $0<r(x)<1$ and $1<s(x)<\infty$

4)$x<0$ and $r(x)>1$ and $0<s(x)<1$

5)$x=0$

6)$s(x)=1$

Now some algebra

Consider solving

1) $0<r(x)<1$ when

a)$x>0$

$$0<\log_{|x^2-3|-2} (x^2-3x+2)<1$$ or $$1<x^2-3x+2<|x^2-3|-2$$Now consider two sub cases of this $$x^2-3x+1>0$$ and $$x^2-3x+2<|x^2-3|-2$$

If coefficent of $x^2$ of a parabola is positive then it opens upwards else downward.

For first Notice it is an upward parabola roots are $\frac{3+\sqrt{5}}{2}$ and $\frac{3-\sqrt{5}}{2}$.So solution is $x \in (0,\frac{3-\sqrt{5}}{2}) \cup (\frac{3+\sqrt{5}}{2},\infty)$

Now consider second .Firstly when $x<\sqrt3$ given equation becomes $$x^2-3x+2<-x^2+1$$ or $$2x^2-3x+1<0$$ this is also a upward parabola.roots $1/2,1$.So solution $x\in (1/2,1)$

Next consider $x \geq \sqrt3$ inequality becomes $x>7/3$.So solution $x \in (7/3,\infty)$Union of above two sub cases $x\in (1/2,1) \cup (7/3,\infty)$

For overall case 1.a) to be satisfied the solution is $$x\in(\frac{3+\sqrt5}{2},\infty)$$

Next case 2.$$0<s(x)<1$$,$$x>0$$

or $$0<\frac{x^3-|3x+2|}{x^3-|3x-2|}<1$$.For $s(x)$ to be defined $x \neq 1$ or $$0<x^3-|3x+2|<x^3-|3x-2|$$ For first inequality it is easy to find out $x \in (2,\infty)$.(For this consider the graph of $y=x^3$ and $y=|3x+2|$. Since $x^3$ is monotically increasing and intersection the other line in $2$)Here is a graph quite easy to draw manually

The second inequality is true $\forall x›0$Combined solution $x \in (2,\infty)$

Combining the above we have one solution as $$x\in(\frac{3+\sqrt5}{2},\infty)$$ By continuing like this we can get all solutions.

• Comments are not for extended discussion; this conversation has been moved to chat. Apr 2, 2017 at 16:59