# Plotting the regions where $\log_{x}|y-2|-\log_{|y-2|}x>0$

Draw the set: $S=\{(x,y): \log_{x}|y-2|-\log_{|y-2|}x>0\}$

We know that $x>0$ (base of the logarithm). Also, $$\log_{|y-2|}x=\frac{1}{\log_{x}|y-2|},$$ so we have $$\log_{x}|y-2| - \frac{1}{\log_{x}|y-2|}>0$$ and so $$((\log_{x}|y-2|)+1)((\log_{x}|y-2|)-1)>0\;.$$

What should I do next, though? $(\log_{x}|y-2|)+1>0$ or $(\log_{x}|y-2|)-1>0$?

-
if $x-\frac{1}{x}>0$, is it really true that $(x+1)(x-1)=x^2-1>0$? What happens if $x<0$? –  robjohn Oct 23 '11 at 10:05

Hint: First $$((\log_{x}|y-2|)+1)((\log_{x}|y-2|)-1)(\log_{x}|y-2|)>0 .$$ Consider the regions where each of these factors is positive and negative.

-
Sorry but I understand neither why this inequality should hold nor how it would help. –  Did Oct 23 '11 at 10:25
@Didier: Multiply both sides of $\log_{x}|y-2|-\log_{|y-2|}x>0$ by $\left(\log_{x}|y-2|\right)^2$ to get the inequality I gave. Then all one needs to do is to look at the level curves of $\log_{x}|y-2|$ for $\{-1,0,+1\}$. –  robjohn Oct 23 '11 at 10:53
Hmmm... clever. Maybe such a hint is more destined to the answerer and their kin than to the asker. –  Did Oct 23 '11 at 12:35
@Didier: The asker erroneously got to $((\log_{x}|y-2|)+1)((\log_{x}|y-2|)-1)>0$, and I commented that that ignored the sign of $\log_{x}|y-2|$. I thought that perhaps they could put that together with my hint to get an answer. The question seemed like a homework problem, and, in any case, the asker was asking for help, not an answer, so I didn't want to give too much. –  robjohn Oct 23 '11 at 12:48

I’d start by letting $u=y-2$, and asking when $\log_x |u|-\log_{|u|}x > 0$. Now convert the logs to the same base: $\log_a b = \frac{\ln b}{\ln a}$, so your inequality is $$\frac{\ln |u|}{\ln x} - \frac{\ln x}{\ln |u|} > 0\;.$$ Be a little careful in solving this: $\ln x$ and $\ln |u|$ can be negative.

-

Hints: 1. Use twice the fact that $\log_ab=\dfrac{\log b}{\log a}$ for every positive $a$ and $b$. 2. Beware of the signs in the inequalities, that is, for $c>0$, $a\leqslant b$ if and only if $ac\leqslant bc$, but for $c<0$, $a\leqslant b$ if and only if $ac\geqslant bc$.

-
How should I use it twice? I end up with $\log_{x}|y-2| - \frac{1}{\log_{x}|y-2|}>0$ and I don't see a way to get "out of" it. –  Jameson Oct 24 '11 at 13:12
Try to write everything in terms of the usual logarithm, for example $\log_x|y-2|=\log|y-2|/\log(x)$, and to proceed from there. –  Did Oct 24 '11 at 16:45
OK. So we have $\frac{log|y-2|}{log(x)}$ and $\frac{log(x)}{log|y-2|}$. This gets us to $\frac{(log|y-2|)^2-log(x)^2}{log|y-2|log(x)}$. But how to move from here? –  Jameson Oct 24 '11 at 16:51
You want $a/b>b/a$ with $a=\log|y-2|$ and $b=\log(x)$. This means that (1) $a>0$, $b>0$ and $a>b$, or (2) $a<0$, $b<0$ and $a<b$, or (3) $a<0<b$ and $b>-a$, or (4) $b<0<a$ and $a<-b$. Case (1) means $|y-2|>x>1$, und so weiter... –  Did Oct 24 '11 at 17:05
Yes, but how should I draw, for example, the |y−2|>x>1 case? –  Jameson Oct 25 '11 at 15:11

You can start by drawing the important contour lines of $f(x,y) = \log_x |y-2| - \log_{|y-2|} x$ in the plane.

There are several lines where $f$ has a discontinuity, namely $x=0$, $y=2$, $y=1$, and $y=3$. Do you see why?

Next, you can solve for the curves where $f(x,y)=0$. Use Didier's hint. You should get four different curves.

Once you have these lines and curves, plot them in the plane. Inside each region $f$ is either positive or negative; you can determine which one by testing a point.

-