Which is bigger e^pi or pi^e?

By Martin McBride, 2025-09-30
Tags: chain rule quotient rule differentiation logarithm maclaurin series
Categories: recreational maths olympiad
Level:


A famous Olympiad-style question is which is greater, e to the power π, or π to the power e?

You aren't allowed to use a calculator or computer, of course (otherwise it would be trivially easy). And since e and π are numerically quite close, it isn't easy to guess (and you are expected to show your reasoning, so just guessing won't count).

In this article, we will look at two methods. The first relies on the fact that one of the numbers is e specifically. The second will work with other pairs of numbers, although not all pairs of numbers.

Properties of the exponential and natural log functions

Before we start, it is useful to quickly recap some important properties of two standard functions. The exponential function, exp(x), is e to the power x. It is defined for all x and has the following well-known properties:

  • It is always positive.
  • It always increases as x increases.
  • It has the value 1 when x is 0 (and since it always increases, it is greater than 1 for positive x).

This is shown on the left, below. The values e and π are shown for reference:

exp and ln functions

The natural log function, ln(x), is the logarithm with base e. This function is the inverse of the exponential function. It is only defined for positive x, and has these well-known properties:

  • It always increases as x increases.
  • It has the value 0 when x is 1 (and since it always increases, it is positive for x > 1).

It is shown on the right of the graph above.

First method using Maclaurin expansion

For the first method, we will use the Maclaurin series of the exponential function. A Maclaurin series is a way of calculating the value of a function using an infinite series. The Maclaurin series for the exponential series is:

Maclaurin expansion method

If we plug any value x into this series, it will calculate the value of the function. The important thing to notice is that, when x is positive, all the terms in the expansion are strictly positive, that is to say, they are all greater than zero.

So, if we truncate the series to just the first two terms, all the terms we have removed are positive. The truncated result will definitely be smaller than the full series, so we can say:

Maclaurin expansion method

Now we will set x equal to:

Maclaurin expansion method

We aren't allowed to use a calculator, but we are allowed to know that π is bigger than e, so the above expression is positive. So it is valid to use this value in the previous inequality:

Maclaurin expansion method

Let's simplify the LHS. We can separate the two terms in the exponent to give a product of two simpler exponentials. Then, of course e to the power -1 is 1/e:

Maclaurin expansion method

We can also simplify the RHS, trivially:

Maclaurin expansion method

This leaves us with:

Maclaurin expansion method

Since e is positive, we can cancel the denominators without affecting the inequality:

Maclaurin expansion method

Now we can raise both sides to the power e. Again, because e is positive, this doesn't affect the inequality:

Maclaurin expansion method

When we raise a power to a power, that is equivalent to multiplying the powers:

Maclaurin expansion method

Using this, we can simplify the exponent on the LHS, cancelling e top and bottom, giving the final result:

Maclaurin expansion method

Just as a final check, we will now calculate the values to confirm our result. They are, to four places:

Maclaurin expansion method

Using calculus

The above solution relies on the fact that one of the numbers is e, because that is what allowed us to use the Maclaurin expansion. Now we will try a different approach to find a general solution for any two positive numbers a and b. To do this, we need to ask a slightly different question. Under what conditions is the following true:

Calculus method

The problem with this is that we are trying to compare two values, but both values depend on a and b. It would be a lot easier if we could separate these, so that the LHS only depends on a and the RHS only depends on b.

We are limiting ourselves to positive a and b values, so we can raise both sides of the equation to the power 1/ab without affecting the comparison (because the function a to the power x increases monotonically with x for positive a and x). Here is what we get:

Calculus method

Let's define the following function:

Calculus method

Now the question we need to answer is under what conditions is p(a) greater than p(b)?

This is where calculus comes to our aid. If we know the rate of change of p(x), we might be able to say whether p(a) or p(b) is the greater for different values of a and b.

Differentiating p(x)

Our function p has x in its base and its exponent, which makes things a little difficult. There is a useful trick in situations like this. We know that e to the power ln x is equal to x (provided x is positive, which we know it is). So we can replace the base x like this:

Calculus method

Here, again, we have used the power to a power rule. We now have a composed function f(g(x)):

Calculus method

We can apply the chain rule is this situation:

Calculus method

Notice that the first term is identical to the substituted version of p(x). That substitution has served its purpose, so we can replace it with the original p(x). We will label this as equation (1):

Calculus method

Next, we need to differentiate g(x). This function is the quotient of two other functions, so we can apply the quotient rule using functions h and k:

Calculus method

The derivatives of h and k are:

Calculus method

Here is the standard quotient rule formula:

Calculus method

Substituting our functions gives us:

Calculus method

Putting this all back into the previous equation (1) gives us the following derivative:

Calculus method

Analysing p'(x)

So what does this tell us? We are mainly interested in the sign of p' because we want to know whether p is increasing or decreasing between values a and b. So the first thing to notice is that the initial quotient term is always positive (for positive x), so we can ignore it. The only term we are interested in is (1 - ln x). Here is a graph of that function:

Calculus method

From this graph, we can see that:

  • p' is zero ln x is 1, ie when x = e. So p has a turning point there.
  • p' is positive when x < 1, so p is increasing in that region.
  • p' is negative when x > 1, so p is decreasing in that region.

So p(x) has a maximum value when x = e. Here is a graph of p(x):

Calculus method

Of course, we aren't allowed to use a calculator for this problem, so we shouldn't really be looking at these graphs. But, although the graphs are quite helpful in visualising the functions, we don't really need the graphs. The only fact we need to know is that p(x) has just one stationary point, a maximum at x = e. We can find this fact from the equations, without using the graphs - the graphs just to illustrate the point.

The general rule

So p(x) has a maximum at e, and decreases monotonically as we move away from e in either direction.

Looking at points r and s, p(s) is greater than p(r), which means that:

Calculus method

The reason p(s) is greater is that s is closer to e, the location of the turning point. The function has a positive rate of change in that region, so it has to get bigger as we approach the turning point.

If we look at t and u we find that p(t) is greater than p(u), meaning that:

Calculus method

This again is because t is closer to e. So we have the general rule:

If a and b are both on the "same side" of e, and a is closer ro e, then a^b will be bigger than b^a.

More precisely:

Calculus method

Notice that we cannot apply this rule if a and b are on different sides of e. For example, looking at points r and u. r is closer to e, but p(u) > p(r). One is less than e and one is greater than e, so our simple rule doesn't apply.

See also



Join the GraphicMaths Newsletter

Sign up using this form to receive an email when new content is added:

Popular tags

adder adjacency matrix alu and gate angle answers area argand diagram binary maths cartesian equation chain rule chord circle cofactor combinations complex modulus complex numbers complex polygon complex power complex root cosh cosine cosine rule countable cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon e eigenvalue eigenvector ellipse equilateral triangle erf function euclid euler eulers formula eulers identity exercises exponent exponential exterior angle first principles flip-flop focus gabriels horn galileo gamma function gaussian distribution gradient graph hendecagon heptagon heron hexagon hilbert horizontal hyperbola hyperbolic function hyperbolic functions infinity integration integration by parts integration by substitution interior angle inverse hyperbolic function inverse matrix irrational irrational number irregular polygon isomorphic graph isosceles trapezium isosceles triangle kite koch curve l system lhopitals rule limit line integral locus logarithm maclaurin series major axis matrix matrix algebra mean minor axis n choose r nand gate net newton raphson method nonagon nor gate normal normal distribution not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutation matrix permutations pi pi function polar coordinates polynomial power probability probability distribution product rule proof pythagoras proof quadrilateral questions quotient rule radians radius rectangle regular polygon rhombus root sech segment set set-reset flip-flop simpsons rule sine sine rule sinh sloping lines solving equations solving triangles square square root squeeze theorem standard curves standard deviation star polygon statistics straight line graphs surface of revolution symmetry tangent tanh transformation transformations translation trapezium triangle turtle graphics uncountable variance vertical volume volume of revolution xnor gate xor gate