# 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.

-

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.

-