# Show that $\int_0^b f(x)(b-x)\,dx=\int_0^b(\int_0^x f(t)\,dt)\,dx$

Let f: $$\mathbb{R}\rightarrow\mathbb{R}$$ be an arbitrary continuous function.

Show that: $$\int_0^b f(x)(b-x)\,dx=\int_0^b(\int_0^x f(t)\,dt)\,dx$$

I have gotten relatively close using integration by parts but inserting the limits have gotten me confused. Any ideas?

• just switch order of integration on rhs – mathworker21 Aug 12 at 23:48

I doubt you have learnt Fubini's Theorem for changing the order of multiple integrals, so I'll present an answer using only integration by parts and the Fundamental Theorem of Calculus.

First, recall the integration by parts formula: \begin{align} \int_0^b u'(x) v(x) \, dx = u(x) v(x) \bigg|_0^b - \int_0^b u(x) v'(x) \, dx \end{align}

Now, to apply this to your particular question at hand, define the functions $$u,v:\Bbb{R} \to \Bbb{R}$$ by \begin{align} u(x) := \int_0^x f(t) \, dt \quad \text{and} \quad v(x) := b-x \end{align}

Using the Fundamental Theorem of Calculus (since $$f$$ is continuous, all the hypotheses of FTC are satisfied), we get that $$u'(x) = f(x)$$ and a simple computation shows that $$v'(x) = -1$$. Therefore, \begin{align} \int_0^b f(x) (b-x) \, dx &= \int_0^b u'(x) v(x) \, dx \\\\ &= \text{... integration by parts} \\\\ &= \int_0^b \left( \int_0^x f(t) \, dt \right) \, dx \end{align}

I tried to tailor my notation so that this now becomes a direct application of integration by parts. Can you see how to fill in the details of the argument?

• Thank you very much! – J. Cricks Aug 13 at 0:22
• @J.Cricks I'm glad it was helpful! (Also if you try to prove the generalization of this formula, just remember to not get lost in the notation, because the general concept is to simply use integration by parts and FTC) – peek-a-boo Aug 13 at 14:42
• Just another question, when you integrate by parts, you get the u(x)v(x) part right? How does this equal to zero when inserting the limits? – J. Cricks Aug 13 at 23:48
• @J.Cricks because $u(0) = 0$ (integrating $f$ from $0$ to $0$ gives you $0$) and $v(b) = 0$ simply by definition. Hence, the products are also zero: $u(0)v(0) = 0$ and $u(b)v(b) = 0$. – peek-a-boo Aug 14 at 1:24

If $$\Omega=\{(t,x)\in \mathbb{R}^2|0\leq t \leq x \leq b\}$$ then $$\int_0^b \int_0^x f(t) dt dx=\int_{\Omega} f(t) dA = \int_0^b \int_t^b f(t) dx dt=\int_0^b f(t)(b-t)dt=\int_0^bf(x)(b-x)dx.$$

Let $$G(b)=\int_0^b f(x)(b-x)\,dx-\int_0^b \left(\int_0^x f(t)\,dt \right)\,dx.$$ Then $$G'(b)=\int_0^b f(x)\,dx-\int_0^b f(t)\,dt=0$$ and hence $$G(b)\equiv C.$$ Since $$G(0)=0$$, one has $$C=0$$ and so $$G(b)\equiv0$$. Thus $$\int_0^b f(x)(b-x)\,dx=\int_0^b \left(\int_0^x f(t)\,dt \right)\,dx.$$

• I merely edited the parentheses to make it look nicer. But this is an interesting approach, I learnt something new :) – peek-a-boo Aug 14 at 1:31