An interesting definite integral $\int_0^1(1+x+x^2+x^3+\cdot\cdot\cdot+x^{n-1})^2 (1+4x+7x^2+\cdot\cdot\cdot+(3n-2)x^{n-1})~dx=n^3$

Solution 1:

First apply the substitution $x = t^3$. Then

\begin{align*} I_n &= \int_{0}^{1} (1 + t^3 + \cdots + t^{3n-3})^2 (1 + 4t^3 + \cdots + (3n-2)t^{3n-3}) \cdot 3t^2 \, dt \\ &= \int_{0}^{1} 3 (t + t^4 + \cdots + t^{3n-2})^2 (1 + 4t^3 + \cdots + (3n-2)t^{3n-3}) \, dt. \end{align*}

Now let $u = u(t) = t + t^4 + \cdots + t^{3n-2}$. Then

$$ 3 (t + t^4 + \cdots + t^{3n-2})^2 (1 + 4t^3 + \cdots + (3n-2)t^{3n-3}) = 3u^2 \frac{du}{dt}.$$

Therefore

$$ I_n = \left[ u(t)^3 \right]_{t=0}^{t=1} = u(1)^3 - u(0)^3 = n^3. $$