# An Integral Diversion

The brilliant @dragon_dodo sent me this puzzle:

Evaluate $\int_0^1 \left(1-x^\frac{1}{7}\right)^3 - \left(1-x^\frac{1}{3}\right)^7 \d x$.

I’m not going to give you the solution right now; that will come after I’ve rambled for a bit.

After I’d solved the puzzle (see below), I wondered what each of the integrals actually evaluated to. Failing to solve it myself immediately, I turned to Wolfram Alpha, which told me it was $\frac{1}{120}$. Interesting. I played with the numbers a bit, and came to the experimental conclusion that $\int_0^1 \left(1 -x^\frac{1}{a}\right)^b \d x = \frac{1}{\nCr{a+b}{a}}$, for positive integers $a$ and $b$.

But could I prove it?

Well, yes. Eventually.

### A proof by induction

There are probably a dozen ways to prove this, but the one that leapt out at me was induction. I “know” the answer, the base cases are easy, and there are all sorts of Pascal’s triangle-related formulas that can come to my rescue if needed.

Let’s go.

**To prove**. $\int_0^1 \left(1 -x^\frac{1}{a}\right)^b \d x = \frac{1}{\nCr{a+b}{a}}$, for positive integers $a$ and $b$.

**Definition**: To save myself some typing, I’m going to define $I(a,b) = \int_0^1 \left(1-x^\frac{1}{a}\right)^b \d x$.

**Strategy**. My strategy is to show (base case) that the identity holds for the first diagonal of Pascal’s triangle, using $I(1,b)$; and then (iterative step) that if it holds for any element in the triangle, that it holds for its immediate neighbour to the right.

**Base case**. To show: $I(1,b) = \frac{1}{\nCr{b+1}{b}} = \frac{1}{b+1}$.

$I(1,b) = \int_0^1 (1 - x)^b \d x = \left[ \frac{1}{b+1}(1-x)^{b+1} \right]_0^1 = \frac{1}{b+1}$, as required.

That means the proof holds along the first diagonal of Pascal’s triangle.

**Lemma**. Looking at $I(a,b) = \int_0^1 \left(1-x^\frac{1}{a}\right)^b \d x$, we can apply the substitution $u^a = x$ and transform the integral into $\int_0^1 a (1-u)^b u^{a-1} \d u$.

**Iterative step**. Given that $I(a,b)=\frac{1}{\nCr{a+b}{a}}$, show that $I(a+1,b-1)=\frac{1}{\nCr{a+b}{a+1}}$.

Consider $I(a+1,b-1) = \int_0^1 \left(1 - x^\frac{1}{a+1}\right)^{b-1} \d x$. Applying the substitution $u^{a+1} = x$, this becomes $(a+1)\int_0^1 (1 - u)^{b-1} u^a \d u$.

Integrating by parts, with $U = u^a$ and $\diff Vu = (1-u)^{b-1}$, we have $\diff Uu = au^{a-1}$ and $V = -\frac{1}{b}(1-u)^b$. That leads to $I(a+1,b-1) = (a+1)\left(\left[-\frac{1}{b} u^a (1-u)^b\right]_0^1 + \frac{a}{b} \int_0^1 u^{a-1}(1-u)^{b} \d u\right)$. The first term is 0, leaving us with $I(a+1,b-1)= \frac{a+1}{b} I(a,b)$.

By assumption, $I(a,b)= \frac{1}{\nCr{a}{b}} = \frac{a!b!}{(a+b)!}$, so this gives us $I(a+1,b-1)=\frac{(a+1)a!\frac{b!}{b}}{(a+b)!}$, which rearranges to $\frac{(a+1)!(b-1)!}{(a+b)!} = \frac{1}{\nCr{a+b}{a+1}}$ - as required.

**Record scratch. Freeze frame**. I suppose you’re wondering how I ended up with this iterative step. Readers, here is my secret: I did the integration first and realised what it was telling me. What this step does is show that if you have an element correct in a row of Pascal’s triangle, the element to the right of it is also correct.

**Conclusion**. Since the identity holds for $I(1,b)$, and we know that if it holds for $I(a,b)$, it also holds for $I(a+1,b-1)$, we know it holds for every $I(2,b-1)$, $I(3,b-2)$, … and hence everywhere in Pascal’s triangle. $\blacksquare$ ((I imagine this can be tightened up; I’d be grateful for feedback.)).

### Aside

It turns out, this isn’t restricted to whole numbers; $I(a,b) = \frac{\Gamma(a+1)\Gamma(b+1)}{\Gamma(a+b+1)}$ for $a > 0$.

### The solution to the puzzle

The puzzle doesn’t require any of this integration nonsense! My approach - and @dragon_dodo’s, independently - was to sketch the first term of the integrand. It’s a curve in the first quadrant, it starts at (0,1), ends at (1,0), and declines smoothly in between.

We’re asked to integrate it in vertical strips (the $\d x$ says so), but we’d get the same area by using horizontal strips. To do that, we’d need to invert the function.

We have $y = \left( 1- x^\frac{1}{7}\right)^3$, so $y^\frac{1}{3} = 1 - x^\frac{1}{7}$.

Alternatively, $x^\frac{1}{7} = 1 - y^\frac{1}{3}$, or $x = \left(1-y^\frac{1}{3}\right)^7$ - which, apart from a change in the dummy variable (from $x$ to $y$), is the same as the second term of the integrand! (Note that the limits are the same in both cases as well.) That means the two terms of the integrand have the same value, so the integral reduces to 0.

If you prefer the other way, it’s $\frac{1}{\nCr{10}{7}} - \frac{1}{\nCr{10}{3}}$, which is also zero.