A floor function integral

Calculus Level pending

Let n \lfloor n\rfloor be the greatest integer less than or equal to x x . For example, 2 = 2 \lfloor 2\rfloor=2 and π = 3 \lfloor \pi\rfloor =3 .

What is 0 n 2 x d x \int_0^n\lfloor2^x\rfloor dx ?

Note that k ! = k ( k 1 ) ( k 2 ) . . . ( 3 ) ( 2 ) ( 1 ) { k Z + } k!=k(k-1)(k-2)...(3)(2)(1)\ \left \{k\in\mathbb{Z}^+\right \} .

log 2 [ ( 2 n 1 ) ! ] \log_2\left [(2^n-1)!\right ] n 2 n log 2 [ ( 2 n ) ! ] n2^n-\log_2\left [(2^n)!\right ] n 2 n log 2 [ ( 2 n 1 ) ! ] n2^n-\log_2\left [(2^n-1)!\right ] n 2 n n2^n log 2 ( 2 n ) ! \log_2(2^n)!

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

2 x \lfloor 2^x\rfloor takes on all integer values from 1 1 to 2 n 1 2^n-1 in the domain interval [ 0 , n ) [0, n) .

[https://www.desmos.com/calculator/ighh5kisms](https://www.desmos.com/calculator/ighh5kisms) https://www.desmos.com/calculator/ighh5kisms In the image, the blue graph is 2 x 2^x and the red graph is 2 x \lfloor 2^x\rfloor .

The integral is the sum of areas of rectangles that increase in height by 1 1 and decrease in width, as follows:

0 n 2 x d x = 1 ( log 2 2 log 2 1 ) + 2 ( log 2 3 log 2 2 ) + . . . + ( 2 n 1 ) ( log 2 2 n log 2 ( 2 n 1 ) ) = log 2 1 log 2 3 . . . log 2 ( 2 n 1 ) + ( 2 n 1 ) log 2 ( 2 n ) = 2 n log 2 ( 2 n ) ( log 2 1 + log 2 3 + . . . + log 2 ( 2 n ) ) = n 2 n log 2 [ 1 2 3 . . . ( 2 n 2 ) ( 2 n 1 ) ( 2 n ) ] = n 2 n log 2 [ ( 2 n ) ! ] \begin{aligned}\int_0^n\lfloor2^x\rfloor dx&=1(\log_22-\log_21)+2(\log_23-\log_22)+...+(2^n-1)(\log_2{2^n}-\log_2(2^n-1))\\&=-\log_21-\log_23-...-\log_2{(2^n-1)}+(2^n-1)\log_2(2^n)\\&=2^n\log_2(2^n)-\left (\log_21+\log_23+...+\log_2(2^n)\right )\\&=n2^n-\log_2\left [1\cdot2\cdot3\cdot...\cdot(2^n-2)(2^n-1)(2^n)\right ]\\&=\color{#20A900}{\boxed{n2^n-\log_2\left [ (2^n)!\right ]}}\end{aligned}

Really nice write-up. One small additional point that may be interesting: if you use Stirling's approximation for ( 2 n ) ! (2^n)! , you find n 2 n log 2 [ ( 2 n ) n ] n 2 n ( n 2 n 2 n log e 2 ) = 2 n log e 2 n 2^n - \log_2 \left[ \left( 2^n \right)^n \right] \approx n 2^n - \left(n 2^n - \frac{2^n}{\log_e 2} \right) = \frac{2^n}{\log_e 2}

...which you might recognise as the result of a very similar integral to the one in the question. This suggests an alternative approach, but I'm not sure it'd be enough to separate the two similar answer options.

Chris Lewis - 10 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...