Open Book Publishers logo Open Access logo
  • button
  • button
  • button
GO TO...
book cover

Problem 38:  Discontinuous integrands ( )

For any number x, the largest integer less than or equal to x is denoted by [x]. For example, [3.7] = 3 and [4] = 4.

Sketch the graph of y = [x] for 0 x < 5 and evaluate

Sketch the graph of y = [ex] for 0 x < lnn, where n is an integer, and show that
0ln n[ex]dx = nlnn ln(n!).

Hence show that n! nne1n.


I had to add a bit to the original question because it was all dressed up with nowhere to go. The question is clearly about estimating n! so I added in the last line, which makes the question a bit longer but not much more difficult. I could have added another part, but I thought that you would probably add it yourself: you will easily spot, once you have drawn the graphs, that a similar result for n! with the inequality reversed can be obtained by considering rectangles the tops of which are above the graph of ex instead of below it. You therefore end up with a nice sandwich inequality for n!.

Stirling (1692 – 1770) proved in 1730 that n! 2πnn+1 2 en for large n. This was a brilliant result — even reading his book, it is hard to see where he got 2π from (especially as he wrote in Latin). Then he went on to obtain the approximation in terms of an infinite series; the expression above is just the first term.

Solution to problem 38



The graph of [x] consists of the horizontal parts of an ascending staircase with 5 stairs, the lowest at height 0, each of width 1 unit and rising 1 unit.

The integral is the sum of the areas of the rectangles shown in the figure:

area = 0 + 1 + 2 + 3 + 4 = 10.



The graph of [ex] is also a staircase: the height of each stair is 1 unit and the width decreases as x increases because the gradient of ex increases. It starts at height 1 and ends at height (n 1).

The value of [ex] changes from k 1 to k when ex = k i.e. when x = lnk. Thus [ex] = k when lnk x < ln(k + 1) and the area of the corresponding rectangle is kln(k + 1) lnk.

The total area under the curve is therefore

1(ln2 ln1) + 2(ln3 ln2) + + (n 1)lnn ln(n 1)

which you can rearrange to obtain nlnn ln(n!) as required.

For the last part, note that [ex] ex (this is clear from the definition) so

0ln n[ex]dx 0ln nexdx = n 1i.e.nlnn ln(n!) n 1.

Taking exponentials gives the required result.


Usually when you draw a graph of a discontinuous function, you should specify at the jump whether the function takes the upper or lower value. For example [x] takes the value 1 at x = 1, which is the upper value. This can be achieved by putting (say) a circle round the upper or lower point, as appropriate. I didn’t bother on the above graphs, because it doesn’t affect the value of the integral and I didn’t want to clutter up the graphs.

Considering [ex + 1] instead of [ex] gives rectangles above the graph of y = ex rather than below. The calculations are roughly the same, so you should easily arrive at n! nn+1e1n. We have therefore proved that

nne1n n! nn+1e1n.

This gives a pretty good (given the rather elementary method at our disposal) approximation for n! for large n.