Integral involving the floor function

In summary: The proof is not difficult. Just use the fact that log base 2 is a monotonic function to conclude that the inside of the floor...The proof is not difficult. Just use the fact that log base 2 is a monotonic function to conclude that the inside of the floor function is an increasing function.
  • #1
Mr Davis 97
1,462
44

Homework Statement


##\displaystyle \int_0^1 \frac{1}{\lfloor 1- \log_2 (1-x)\rfloor}##

Homework Equations

The Attempt at a Solution


How in general do I approach integrals with floor functions? I'm thinking maybe I can figure out what the function in the integrand looks like on paper and calculate the area manually, but that seems very tedious...
 
Physics news on Phys.org
  • #2
Mr Davis 97 said:

Homework Statement


##\displaystyle \int_0^1 \frac{1}{\lfloor 1- \log_2 (1-x)\rfloor}##

Homework Equations

The Attempt at a Solution


How in general do I approach integrals with floor functions? I'm thinking maybe I can figure out what the function in the integrand looks like on paper and calculate the area manually, but that seems very tedious...
What I would do is to look at the values of x = 1/2, 1/4, 1/8, and so on, to get values for you integrand function. Maybe that will give you some ideas. Also note that you have a problem when x = 1, since ##\log_2(0)## is ##-\infty##.
 
  • #3
Mr Davis 97 said:

Homework Statement


##\displaystyle \int_0^1 \frac{1}{\lfloor 1- \log_2 (1-x)\rfloor}##

Homework Equations

The Attempt at a Solution


How in general do I approach integrals with floor functions? I'm thinking maybe I can figure out what the function in the integrand looks like on paper and calculate the area manually, but that seems very tedious...

Some problems just have tedious solutions.

Start off by doing it the hard way, and maybe while writing down the solution you will arrive at some insights that will help you to shorten the solution.
 
  • #4
So what it seems is that the integrand forms a staircase starting at x=1, and goes down to x=0, where, in the very least, there is a new stair at each ##x=1/2^n## in between. So that's something, but I'm wondering now, how can I prove whether or not there are additional drops in between each ##(1/2^{n+1}, 1/2^n)##...
 
  • #5
Mr Davis 97 said:
So what it seems is that the integrand forms a staircase starting at x=1, and goes down to x=0, where, in the very least, there is a new stair at each ##x=1/2^n## in between. So that's something, but I'm wondering now, how can I prove whether or not there are additional drops in between each ##(1/2^{n+1}, 1/2^n)##...
Instead of powers of 1/2, as I first suggested, look at values of x of 1/2, 3/4, 7/8, 15/16, ... ##\frac{2^n - 1}{2^n}##. These will produce numbers whose base-2 logs are integers.

##\log_2(1 - 1/2) = \log_2(1/2) = -1##
##\log_2(1 - 3/4) = \log_2(1/4) = -2##
and so on...
 
  • #6
I don't know why are you call it a floor function.It looks to me a function which is continuous and smooth between the integration limits.

Maybe you just need to put the integrand in a more evident form, remembering elementary definitions? Start by thinking what is 1 log2 of?
 
  • #7
Mark44 said:
Instead of powers of 1/2, as I first suggested, look at values of x of 1/2, 3/4, 7/8, 15/16, ... ##\frac{2^n - 1}{2^n}##. These will produce numbers whose base-2 logs are integers.

##\log_2(1 - 1/2) = \log_2(1/2) = -1##
##\log_2(1 - 3/4) = \log_2(1/4) = -2##
and so on...
So if I let ##\displaystyle f(x) = \frac{1}{\lfloor 1- \log_2 (1-x) \rfloor}##, then ##\displaystyle f \left(\frac{2^n-1}{2^n} \right) = \frac{1}{n+1}##. So ##f(0) = 1,~ f(1/2) = 1/2, ~ f(3/4)=1/3 ##, and so on. So I have infinite steps down to 0 as ##n## approaches infinity. This makes me think that I will end up with an infinite sum, summing up a bunch of areas that are getting smaller and smaller. However, I guess the last thing I need to check is whether is is true or not that if ##x^* \in \left[\frac{2^n-1}{2^n},\frac{2^{n+1}-1}{2^{n+1}} \right)## then ##f(x^*) = \frac{1}{n+1}##... I don't really see how. Should I just assume it's true?
 
  • #8
Mr Davis 97 said:
So if I let ##\displaystyle f(x) = \frac{1}{\lfloor 1- \log_2 (1-x) \rfloor}##, then ##\displaystyle f \left(\frac{2^n-1}{2^n} \right) = \frac{1}{n+1}##. So ##f(0) = 1,~ f(1/2) = 1/2, ~ f(3/4)=1/3 ##, and so on. So I have infinite steps down to 0 as ##n## approaches infinity. This makes me think that I will end up with an infinite sum, summing up a bunch of areas that are getting smaller and smaller. However, I guess the last thing I need to check is whether is is true or not that if ##x^* \in \left[\frac{2^n-1}{2^n},\frac{2^{n+1}-1}{2^{n+1}} \right)## then ##f(x^*) = \frac{1}{n+1}##... I don't really see how. Should I just assume it's true?
Set up a Riemann sum to approximate your integral. In the integral you're not just adding 1 + 1/2 + 1/3 + ... -- you're adding the areas of the rectangles, all of which are decreasing in width.
 
  • #9
Mr Davis 97 said:
I guess the last thing I need to check is whether is is true or not that if ##x^* \in \left[\frac{2^n-1}{2^n},\frac{2^{n+1}-1}{2^{n+1}} \right)## then ##f(x^*) = \frac{1}{n+1}##... I don't really see how. Should I just assume it's true?
It is true, and I think you would be expected to prove it.

The proof is not difficult. Just use the fact that log base 2 is a monotonic function to conclude that the inside of the floor function is monotonic, and then show that it is an integer whenever ##x=\frac{2^k-1}{2^k}## for some non-negative integer ##k##.

I don't expect there will be a closed expression for the infinite sum, but it will converge rapidly so can be calculated to good accuracy with only a few terms.
 
  • #10
andrewkirk said:
It is true, and I think you would be expected to prove it.

The proof is not difficult. Just use the fact that log base 2 is a monotonic function to conclude that the inside of the floor function is monotonic, and then show that it is an integer whenever ##x=\frac{2^k-1}{2^k}## for some non-negative integer ##k##.

I don't expect there will be a closed expression for the infinite sum, but it will converge rapidly so can be calculated to good accuracy with only a few terms.

Actually, it has a quite familiar closed-form.
 
  • #11
Again I say there is nothing in problem statement 1 to tell me this is a floor function. The integrand plots as a fairly ordinary function with a finite integral between the given limits, see below.

However the integrals of reciprocal logs require a special function, Li, (I am not telling you one) not simply related as far as I know to any of the widely known functions, just defined by an integral

$$Li\left( x\right) =\int ^{x}_{0}\dfrac {dx}{\ln x}$$

Once one knows that, one can work out as already indicated the answer to the present problem in terms of this function, I think it is
$$2\ln 2Li\left( \dfrac {1}{2}\right) $$
Which is about 0.525
BF08CED9-2163-431A-BFB0-FE6EA61D239B.jpeg
The
 

Attachments

  • BF08CED9-2163-431A-BFB0-FE6EA61D239B.jpeg
    BF08CED9-2163-431A-BFB0-FE6EA61D239B.jpeg
    33.4 KB · Views: 457
  • #12
epenguin said:
there is nothing in problem statement 1 to tell me this is a floor function.
The integrand is not a floor function, but there is a floor function applied in the denominator of the integrand, denoted by the infix operator ##\lfloor ... \rfloor##. That function returns the greatest integer that is less than or equal to the argument. The latex codes for the delimiters are \lfloor and \rfloor. The difficulty it raises is that it turns the integrand into a function that is discontinuous but piecewise constant. It is also càdlàg.
 
  • Like
Likes Orodruin
  • #13
Mr Davis 97 said:
So what it seems is that the integrand forms a staircase starting at x=1, and goes down to x=0, where, in the very least, there is a new stair at each ##x=1/2^n## in between. So that's something, but I'm wondering now, how can I prove whether or not there are additional drops in between each ##(1/2^{n+1}, 1/2^n)##...

There is nothing to prove. As long as ##k \leq 1-\log_2(1-x) < k+1## for integer ##k## the floor function gives a value of ##k## by definition.
 

What is an integral involving the floor function?

An integral involving the floor function is a mathematical expression that calculates the area under a curve where the values of the function are rounded down to the nearest integer.

What is the notation for an integral involving the floor function?

The notation for an integral involving the floor function is ∫f(x)dx, where f(x) is the function with values rounded down to the nearest integer and dx represents the variable of integration.

How do you solve an integral involving the floor function?

To solve an integral involving the floor function, you must first rewrite the function as a piecewise function with the floor function. Then, you can break up the integral into smaller integrals, using the properties of the floor function, and solve each integral separately.

What are some real-world applications of integrals involving the floor function?

Integrals involving the floor function are commonly used in computer science and engineering, particularly in the analysis of algorithms and signal processing. They can also be used to model and solve problems in economics, such as calculating the cost of dividing resources among a group of people.

What are some tips for solving integrals involving the floor function?

Some tips for solving integrals involving the floor function include carefully identifying the intervals where the function is changing, using the properties of the floor function to simplify the expression, and breaking up the integral into smaller integrals to make the problem more manageable. It is also important to pay attention to the limits of integration and adjust them accordingly when breaking up the integral into smaller parts.

Similar threads

  • Calculus and Beyond Homework Help
Replies
17
Views
890
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
968
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • Calculus
Replies
6
Views
1K
Back
Top