Sketch the function first

Which is bigger, e to the π or π to the e? One sketch of ln x / x answers this and a whole family of similar questions.

Level: STEP 2. Uses A-level Mathematics only.

The idea

Some questions look like arithmetic but cannot be done by calculation, especially without a calculator. The trick is to rewrite them so that they become questions about a single function, and then to sketch that function. Its shape (where it increases, where it has a maximum, how it behaves at the ends) answers the question.

The function

For x>0x>0, let

f(x)=ln⁡xx.f(x)=\frac{\ln x}{x}.

By the quotient rule,

f′(x)=1−ln⁡xx2,f'(x)=\frac{1-\ln x}{x^2},

which is positive for x<ex<e and negative for x>ex>e. So ff increases up to x=ex=e, where it has its greatest value

f(e)=1e,f(e)=\frac1e ,

and decreases after that. At the ends: as x→0+x\to0^+, ln⁡x→−∞\ln x\to-\infty and so f(x)→−∞f(x)\to-\infty; as x→∞x\to\infty, f(x)→0f(x)\to0, staying positive for x>1x>1. The graph rises steeply from below, crosses the axis at x=1x=1, peaks at (e,1e)(e,\tfrac1e), and then decays slowly towards the axis.

Example 1: e to the π, or π to the e?

Taking logarithms, πe<eπ\pi^e<e^\pi is equivalent to eln⁡π<πe\ln\pi<\pi, and dividing by eπe\pi,

ln⁡ππ<1e=ln⁡ee.\frac{\ln\pi}{\pi}<\frac1e=\frac{\ln e}{e}.

This says f(π)<f(e)f(\pi)<f(e), which is true because ff has its unique maximum at ee, and π≠e\pi\ne e. So

eπ>πe.e^\pi>\pi^e .

No numerical estimate was needed. The whole comparison reduced to "the maximum of ff is at ee".

Example 2: counting solutions

For which values of kk does the equation ln⁡x=kx\ln x=kx have exactly two solutions?

Dividing by xx, the equation is f(x)=kf(x)=k: the solutions are where the horizontal line y=ky=k meets the graph. From the shape of the graph:

  • if k≤0k\le0, there is exactly one solution (on the rising part, with x≤1x\le1);
  • if 0<k<1e0<k<\frac1e, there are exactly two, one on each side of ee;
  • if k=1ek=\frac1e, there is exactly one, at x=ex=e;
  • if k>1ek>\frac1e, there are none.

So the answer is 0<k<1e0<k<\frac1e. Each claim needs the facts established above: ff is strictly increasing on one side of ee and strictly decreasing on the other, and it takes every value in the relevant ranges because it is continuous with the stated limits.

When to reach for it

  • Comparing two powers, such as aba^b and bab^a: take logarithms and divide to separate the variables.
  • "How many solutions does ... have?": rearrange to f(x)=kf(x)=k and sketch ff.
  • Any inequality between two expressions that are the same function evaluated at two points.

Try this

Find all pairs of positive integers a<ba<b with

ab=ba.a^b=b^a .
Hint

Rewrite the equation as f(a)=f(b)f(a)=f(b) with f(x)=ln⁡xxf(x)=\dfrac{\ln x}{x}. Where must aa lie, relative to ee?

Solution

If a=1a=1, the equation says 1=b1=b, which contradicts a<ba<b. So a≥2a\ge2. Taking logarithms and dividing by abab, the equation is equivalent to

ln⁡aa=ln⁡bb,that isf(a)=f(b).\begin{aligned}\frac{\ln a}{a}&=\frac{\ln b}{b},\qquad\text{that is}\qquad f(a)\\&=f(b).\end{aligned}

Since ff is strictly increasing on (0,e](0,e] and strictly decreasing on [e,∞)[e,\infty), two different numbers with the same value of ff must lie on opposite sides of ee. So a<e<ba<e<b, and the only integer aa with 2≤a<e2\le a<e is a=2a=2.

Now f(4)=ln⁡44=2ln⁡24=f(2)f(4)=\dfrac{\ln4}{4}=\dfrac{2\ln2}{4}=f(2), so b=4b=4 works, and it is the only b>eb>e that does because ff is strictly decreasing there. The only pair is (2,4)(2,4): indeed 24=42=162^4=4^2=16.

Want more like this? STEP Module 2: Proof and bounding teaches ideas of this kind in depth, with exercises and a full STEP question. The STEP Starter Pack has all four modules and three practice papers. Or start free with the STEP sample question.