Same integration with 2 different answers? $$\int x(x^2+2)^4\,dx $$
When we do this integration with u substitution we get
$$\frac{(x^2+2)^5}{10}$$
as $u=x^2+2$
$du=2x\,dx$
$$\therefore \int (u+2)^4\,du = \frac{(x^2+2)^5}{10} + C$$ 
Although when we expand the fraction and then integrate the answer we get is different:
$x(x^2+2)^4=x^9+8x^7+24x^5+32x^3+16x$
$$\int x^9+8x^7+24x^5+32x^3+16x \,dx$$
we get
$$\frac {x^{10}}{10} +x^8+4x^6+8x^4+8x^2 + C$$
For a better idea of the questions, let's say the questions asks us to find the value of C when y(0)=1
Now,
$x=0$
$$\frac {0^{10}}{10} + 0^8 + 4(0)^6 + 8(0)^4 + 8(0)^2 + C = 1$$
$$\therefore C= 1$$
AND
$$\frac {(0+2)^5}{10} + C= 1$$
$$\therefore \frac {32}{10} + C = 1$$
$$\therefore C = 1 - 3.2 = -2.2$$

You can check an antiderivative by differentiating.
$$\left(\frac{(x^2+2)^5}{10}\right)'=x(x^2+2)^4=x^9+8x^7+24x^5+32x^3+16x$$
and
$$\left(\frac {x^{10}}{10} +x^8+4x^6+8x^4+8x^2\right)'=x^9+8x^7+24+32x^3+16x$$
and the two expressions are indeed equivalent.

Now the long explanation.
Consider the binomial $x^2+a$ raised to some power $n$ and multiplied by $2x$.
$$2x(x^2+a)^m$$
which integrates as
$$\frac{(x^2+a)^{m+1}}{m+1}.$$
By the binomial theorem, the terms in the development of this antiderivative are
$$\frac1{m+1}\binom{m+1}kx^{2(m+1-k)}a^k.$$
On the other hand, the development of the initial integrand gives terms
$$2\binom mkx^{2(m-k)+1}a^k,$$ and after integration
$$\frac1{m-k+1}\binom mkx^{2(m-k)+2}a^k.$$ 
It is easy to see that all terms coincide, because
$$\frac1{m+1}\frac{(m+1)!}{k!(m+1-k)!}=\frac1{m-k+1}\frac{m!}{k!(m-k)!}=\frac{(m-1)!}{k!(m-k+1)!}.$$
Anyway, the first development holds for $0\le k\le m+1$, giving a constant term $\dfrac{a^m}{m+1}$, but the second for $0\le k\le m$ only, giving no constant term. But this does not matter, as two antiderivatives can differ by a constant.
