It holds that $\int_a^b(b-x)(x-a)dx=1/6(b-a)^3$. I was wondering if there is a smart way of seeing this, instead of brute-force solving the intergral (it's not that tedious, but if there is a quick way about it, I would like to know it)
If it's not possible to do it smartly, then my other question would be how we go about factorizing the following expression: $$ 1/6(b^3-a^3+3a^2b-3ab^2). $$ I mean, I know now that it equals $1/6(b-a)^3$, but what are the steps for factorizing this? Should we think of it as a polynomial in $a$ and $b$? Whenever I think of a factorization of a polynomial, I think of zeroes, but I'm not sure how that would work here.
You may use the fact that for quadratic polynomials the Simpson $1-4-1$ rule is an exact quadrature formula. In particular $$ \int_{a}^{b}(b-x)(x-a)\,dx = \frac{b-a}{6}\cdot 4\left(\frac{a-b}{2}\right)^2 =\frac{1}{6}(b-a)^3.$$ As an alternative, you may substitute $x=a+\lambda(b-a)$ and exploit $$ \int_{0}^{1}\lambda(1-\lambda)\,d\lambda = B(2,2) = \frac{\Gamma(2)^2}{\Gamma(4)}=\frac{1}{6}.$$ In a elementary geometric fashion, the identity above is a consequence of the Archimedean quadrature of the parabolic segment.