Expanding Brackets Before Integrating a Linear Polynomial to the nth Power

144 Views Asked by At

I've just noticed that when integrating

$$\int dx(x+a)^2 = \frac1 3(x+a)^3 + c = \frac1 3(x^3+3ax^2+3a^2x+a^3)+c$$

You have an $a^3 + c$ constant if integrated in the brackets, but if you expand the brackets and integrate, you get

$$\int dx(x+a)^2 = \frac1 3(x^3+3ax^2+3a^2x) + d$$

where presumably the $a^3$ term is absorbed by the constant $d$.

I just wondered if there's any advantage to keeping these constants separate by avoiding expansion beforehand, as when integrating between limits all constants cancel out anyway?