**The Problem:**

Find \(I=\displaystyle\int_{0}^{2} (x^2+1)\,d\left \lfloor x\right \rfloor\)

**My Doubt:**

There seem two probable approaches to the question but both of them yield different results. Both seem to be mathematically correct and hence the confusion.

**Approach 1:**

We know that,

\(g(x). f'(x) + f(x). g'(x) = \large \frac{d\left(f(x). g(x)\right)}{dx}\)

Integrating the above expression we get:

\(\displaystyle\int_{a}^{b} g(x)\,df(x) + \displaystyle\int_{a}^{b} f(x)\,dg(x) = f(b).g(b)-f(a).g(a)\)

Using the above property to solve the integration we get the answer as \(\boxed{7}\)

**Approach 2:**

We can write

\(I=\displaystyle\int_{0}^{1} (x^2+1)\,d\left \lfloor x\right \rfloor +\displaystyle\int_{1}^{2}(x^2+1)\,d\left \lfloor x\right \rfloor\)

But \(\left \lfloor x\right \rfloor\) assumes constant values of \(\left \lfloor x\right \rfloor=0\) and \(\left \lfloor x\right \rfloor=1\) in the respective intervals. And hence in both cases \(d\left \lfloor x\right \rfloor=0\) and therefore \(I=0\)

I genuinely can't understand what's the correct method. I will really be grateful if someone can explain it to me.

Thank You!

## Comments

Sort by:

TopNewestYour Approach 1 is fine.

In Approach 2, the floor function fails to be constant on the two subintervals; consider the two endpoints! The first integral takes the value of 1 due to the step at 1, and the second one takes a value of 5. With this correction, both approaches work and yield the same result. – Otto Bretscher · 1 year ago

Log in to reply

First off, integration by parts doesn't work as the step function isn't differentiable.

Secondly, the integral is 2. I'll provide a proof of this later.

Btw, @Aditya Kumar The integral makes perfect sense and is defined. – Deeparaj Bhat · 1 year ago

Log in to reply

– Miraj Shah · 1 year ago

It would be really nice of you to put the proof here if possible! But I would also like to know then what's wrong with the Approach 1&2 illustrated above? It's a bit bafflingLog in to reply

We shall use the definition of integration as given in this book, with \(\alpha(x)=\lfloor x \rfloor\) and \(f(x)=1+x^2\).

Consider a partition \(P\) of \([0,2]\) such that \(x_{r-1}\leq 1\leq x_{r}\) where strict inequality holds in atleast one of the two inequalities. Also, by the definition of a partition, we have \(x_{n-1}<2=x_n\). Then,

\[U(P, f, \alpha)=f(x_r)+f(x_n) \\ L(P, f, \alpha)=f(x_{r-1})+f(x_{n-1}) \\\implies \inf U(P, f, \alpha)=\sup L(P, f, \alpha)=f(1)+f(2) \\\implies \int_0^2 f \, d\alpha = 7\]

Note:I've only used the fact that \(f\) is monotonic.Plus, in the book mentioned above, in the exercises, a more generalised version of IBP, valid for even discontinuos functions is given. You've made use of this version in approach 1 (luckily, the step function is monotonic).

If the integrals are calculated using the definition in approach 2, you get the right answer, 7.

@Miraj Shah @Aditya Kumar – Deeparaj Bhat · 1 year ago

Log in to reply

@Miraj Shah – Deeparaj Bhat · 1 year ago

Was this helpful?Log in to reply

@Deeparaj Bhat ! Sorry for replying a bit late. Busy studying for the big one which is to be held on 22nd May! Actually the above problem was from a test paper it self! Had a doubt in the question, so thought of taking help from the brilliant

Oh yes! Really helpfulBrilliant Communityas I was pretty sure that I will be able to get at least some insight!Thank you! – Miraj Shah · 1 year ago

Log in to reply

– Deeparaj Bhat · 1 year ago

You're writing any other exams? (Except JEE ADVANCED, which is on 22nd)Log in to reply

– Miraj Shah · 1 year ago

Actually yes. BITS and all! You have to give JEE this year?Log in to reply

– Deeparaj Bhat · 1 year ago

Yup. That, BITSAT and CMI in my case.Log in to reply