What will the value of following log expression What will be the value of the expression 
$$\log_x \frac{x}{y} + \log_y \frac{y}{x}?$$
I tried: 
$$\log_x x - \log_x y + \log_y y - \log_y x = 1 - \log_x y + 1 - \log_y x
= 2 - \log_x y - \log_y x.$$
Now what after this ?
 A: If $\log_a b = r$, this means that $a^r = b$, so $b = e^{\ln(a^r)} = e^{r\ln(a)}$. Therefore, $\ln(b) = r\ln (a)$, or 
$$\log_a b = \frac{\ln(b)}{\ln a}.$$
Thus, for 
$$\log_x y = \frac{\ln y}{\ln x}\quad\text{and}\quad \log_y x = \frac{\ln x}{\ln y},$$
so
$$\log_x y = \frac{1}{\log_y x}.$$
So:
$$\begin{align*}
\log_x\frac{x}{y} +\log_y\frac{y}{x} &= 1-\log_x y + 1 - \log_y x\\
&= 2 - \log_x y - \frac{1}{\log_x y}\\
&= 2 - \left(\log_x y + \frac{1}{\log_x y}\right)\\
&= 2 - \left(\frac{(\log_x y)^2 + 1}{\log_x y}\right)\\
&= -\frac{(\log_x y)^2 - 2\log_x(y) + 1}{\log_x y}\\
&= - \frac{(\log_x y - 1)^2}{\log_x y}.
\end{align*}$$
So for $r=\log_x y$, you get $-\frac{(r-1)^2}{r}$. The value will depend on $r$; if, for example, $y=x$, then you get $0$; if $y=x^2$, then you get $-\frac{1}{2}$; if $y=x^{-1}$, then you get $4$, etc. 
A: How about $2-\frac{\log y}{\log x} - \frac{\log x}{\log y}$
Which is $2-\frac{(\log x)^2+(\log y)^2}{\log x\log y}$
Not sure if this is simpler, but it gets rid of the different bases.
