4

I have just thought about an interview question, it was maybe asked previously, but I thought about it myself.

Consider, $a \leq b$, is $a^b \leq b^a$ correct? Justify.

I thought about solving it in the following manner, but don't end with a conclusive result.

Let's consider: $$\begin{align} a^b &\leq b^a \\ e^{\ln(a^b)} &\leq e^{\ln(b^a)} \\ \ln(a^b) &\leq \ln(b^a) \\ b\ln(a) &\leq a\ln(b) \end{align} $$ I know that $\ln(a) \leq \ln(b)$, but cannot conclude from there. Do you have any suggestion?

QFi
  • 1,215

3 Answers3

8

Here is a slightly more systematic way of looking at it. You want to check whether $$a \le b \implies \frac{\log a}{a} \le \frac{\log b}{b}$$ This would be true if the function $f: \mathbb{R} \to \mathbb{R}$ mapping $x \mapsto \frac{\log x}{x}$ were an increasing function.

Now, if you know a little calculus, we can look at the derivative to get a bit of a clue. It's hopefully easy for you to check that $$f'(x) = \frac{1-\log x}{x^{2}}.$$

Now the relationship between increasing/decreasing functions and their derivatives is the sign of the derivative. It is also hopefully easy to see that $$f'(x) \text{ is } \begin{cases} \text{positive } & \text{ if } x < e \\ \text{zero } & \text{ if } x = e \\ \text{negative } & \text{ if } x > e \end{cases}$$

So, $f$ is increasing, stationary, and decreasing on the respective intervals. Oh no! If $f$ is decreasing, then our desired property will fail. So pick some $e < a < b$, and you should get a counterexample. Indeed, $$3 \le 4 \text{ but } 3^{4} > 4^{3}$$ as (un)desired.

  • This has the nice side effect of proving a fact that looks almost like the original proposition: if $e \leq a \leq b$ then $b^a \leq a^b.$ – David K Mar 29 '19 at 21:06
  • Thank you for this crystal clear answer. Indeed, I missed to check the derivative of $f(x)=\frac{log(x)}{x}$, as it gives all information needed to have a complete answer to the problem. – QFi Mar 29 '19 at 21:07
  • @Zizou23 No problem! Glad you found it helpful. – preferred_anon Mar 29 '19 at 23:50
3

Counter-example:

$2\le 5$, yet $\;2^5>5^2$.

Bernard
  • 175,478
  • Yes. Sorry for the mistyping. – Bernard Mar 29 '19 at 20:48
  • Certainly the problem is not formulated perfectly, as it just popped up in my mind. More opened question would be how do you compare $a^b$ to $b^a$ for $a\leq b$. Then, if it is possible to find general solutions for different constraints if required, such as $a\leq b \leq 0$ or $0\leq a \leq b$, for instance. – QFi Mar 29 '19 at 20:52
  • Your answer is perfectly valid to the question I posted. Can you edit it in such a way it answers to the following question: $a\leq b$ how do you compare $a^b$ to $b^a$? Thinking this question would be more interesting to the community. – QFi Mar 29 '19 at 20:56
  • You're right. However, speaking of $a^b$ and $b^a$ implies $a$ and $b$ are positive if they're not necessarily integers. Also comparing these powers amounts to $\frac{\ln a} a\le\frac{\ln b}b$, i.e. you have to determine whether the function $\frac{\ln x}x$ is increasing or decreasing. You can do that looking at the derivative. – Bernard Mar 29 '19 at 20:58
  • Yes, thank you. – QFi Mar 29 '19 at 21:08
1

When looking for counterexamples, I recommend trying the simplest cases first.

Are the signs of $a, b$ restricted in any way? If not, try $a = -1, b = 2$.

avs
  • 6,276