Solving Definite Integral with Floor Function: Help Needed

In summary, the conversation is about finding the correct solution for a given integration problem. The person asking for help is getting a different answer from the one given in the book and is unsure about their reasoning. Another person suggests a different approach by graphing the function and points out the values of x where the floor function is equal. The conversation ends with a question about what happens when x increases by 1.
  • #1
maverick280857
1,789
4
Hi

I need help doing the following integration:

[tex]\int_{x=0}^{x=n}[{x-\frac{1}{\sqrt{2}}]-[{x-\frac{1}{\sqrt{3}}]dx[/tex]

where n is an integer and [.] denotes the greatest integer function (floor), i.e. [x] = greatest integer less than or equal to x.

The answer given in the book is

[tex]n(\frac{1}{\sqrt{3}}-\frac{1}{\sqrt{2}})[/tex]

whereas I am getting zero as the answer. My solution is a bit jerky due to the step marked # below:

By definition, there exists some [tex]k \epsilon Z[/tex] such that

[tex]k\leq x < k+1[/tex] (so that [x] = k)

which means that

[tex]k-1<k-\frac{1}{\sqrt{2}}\leq x - \frac{1}{\sqrt{2}} < k+1-\frac{1}{\sqrt{2}}[/tex] and
[tex]k-1<k-\frac{1}{\sqrt{3}}\leq x - \frac{1}{\sqrt{3}} < k+1-\frac{1}{\sqrt{3}}[/tex]

But this would mean that (#)

[tex][{x-\frac{1}{\sqrt{2}}] = k-1[/tex]
[tex][{x-\frac{1}{\sqrt{3}}] = k-1[/tex]

Making the integrand zero and hence the integral zero as well.

I am not sure if this reasoning is correct (in particular, the integer parts cannot be greater than k-1 so this step could be wrong but still they can attain no other integral value) so I would be very grateful if someone could guide me here.

Thanks and cheers
Vivek
 
Last edited:
Physics news on Phys.org
  • #2
I suggest another method of approach. Draw the graph. Once you have that, the answer is trivial.

Notice that
[tex]\lfloor x-\sqrt2 \rfloor=\lfloor x-\sqrt3 \rfloor[/tex] if [tex]0\leq x < \sqrt{2}[/tex] or [tex]\sqrt{3}\leq x \leq 1[/tex]

What happens when [tex]\sqrt{2} \leq x < \sqrt{3}[/tex].

What changes when x increases by 1?
 
Last edited:
  • #3



Hi Vivek,

Thank you for reaching out for help with this definite integral problem. I can see that you have put a lot of thought and effort into solving it, but there are a few errors in your reasoning. Let me guide you through the correct approach to solving this problem.

First, let's rewrite the integral using the definition of the floor function:

\int_{x=0}^{x=n}[{x-\frac{1}{\sqrt{2}}]-[{x-\frac{1}{\sqrt{3}}]dx
= \int_{x=0}^{x=n}[x-\frac{1}{\sqrt{2}}]-[x-\frac{1}{\sqrt{3}}]dx
= \int_{x=0}^{x=n}x - \left\lfloor x-\frac{1}{\sqrt{2}}\right\rfloor - \left\lfloor x-\frac{1}{\sqrt{3}}\right\rfloor dx

Now, let's focus on the limits of integration. We have x=0 on the lower limit, and x=n on the upper limit. This means that the value of x ranges from 0 to n, including both endpoints. In other words, x is a continuous variable, not an integer. So, your assumption that there exists some k \epsilon Z such that k\leq x < k+1 is incorrect. Instead, we can say that x is a real number such that 0\leq x \leq n.

Next, let's look at the floor functions in the integrand. Remember that the floor function takes the greatest integer less than or equal to the input. So, for any real number x, we have [x-\frac{1}{\sqrt{2}}] = k if and only if k\leq x-\frac{1}{\sqrt{2}} < k+1. Similarly, [x-\frac{1}{\sqrt{3}}] = m if and only if m\leq x-\frac{1}{\sqrt{3}} < m+1. Notice that the values of k and m are not necessarily integers, they can be any real numbers. This means that the floor functions in the integrand can take on non-integer values, and your assumption that they are equal to k-1 and m-1 is incorrect.

Now
 

1. What is a definite integral?

A definite integral is a mathematical concept that represents the area under a curve on a graph. It is denoted by ∫ and has an upper and lower limit, indicating the range of values over which the area is being calculated.

2. What is the floor function?

The floor function, denoted by ⌊x⌋, takes a real number as input and rounds it down to the nearest integer. For example, ⌊3.7⌋ = 3 and ⌊-2.1⌋ = -3. This function is commonly used in solving problems involving discrete values or integers.

3. How do you solve a definite integral with a floor function?

To solve a definite integral with a floor function, you first need to identify the intervals where the floor function changes its value. Then, you can break down the integral into multiple integrals, each corresponding to a different interval, and apply the floor function to the integrand. Finally, you can solve each integral separately and add up the results to get the final answer.

4. Can you provide an example of solving a definite integral with a floor function?

Sure, let's say we want to solve the integral ∫(⌊x⌋ + 1) dx from 0 to 5. We can break this down into two integrals: ∫(⌊x⌋ + 1) dx from 0 to 1 and ∫(⌊x⌋ + 1) dx from 1 to 5. In the first integral, the floor function is equal to 0, so we are left with ∫(0 + 1) dx from 0 to 1, which simplifies to ∫dx from 0 to 1. This gives us an answer of 1. In the second integral, the floor function is equal to 1, so we are left with ∫(1 + 1) dx from 1 to 5, which simplifies to ∫2 dx from 1 to 5. This gives us an answer of 8. Adding up the results, we get a final answer of 9.

5. What are some real-life applications of solving definite integrals with floor functions?

Solving definite integrals with floor functions can be useful in various fields, such as computer science, economics, and physics. One example is in computing the time complexity of algorithms, where the floor function can be used to represent the number of iterations or steps needed to complete a task. In economics, it can be used to calculate total profits or losses when dealing with discrete quantities. In physics, it can be used to calculate the work done by a varying force over a given distance.

Similar threads

  • Calculus
Replies
6
Views
1K
Replies
2
Views
920
Replies
6
Views
1K
Replies
2
Views
784
Replies
3
Views
934
Replies
3
Views
1K
Replies
3
Views
214
Replies
4
Views
187
Replies
16
Views
2K
Back
Top