Finding an indefinite integral I have worked through and answered correctly the following question:
$$\int x^2\left(8-x^3\right)^5dx=-\frac{1}{3}\int\left(8-x^3\right)^5\left(-3x^2\right)dx$$
$$=-\frac{1}{3}\times\frac{1}{6}\left(8-x^3\right)^5+c$$
$$=-\frac{1}{18}\left(8-x^3\right)^5+c$$
however I do not fully understand all of what I have done or why I have done it (other than I used principles I saw in a similar example question).
Specifically I picked $-\frac{1}{3}$ to multiply the whole of the integral because it is the reciprocal of $-3$ but I do not fully understand why it is necessary to perform this step.
The next part I do not understand is on the second line what causes the $\left(-3x^2\right)$ to disappear?
Here is what I think is happening:
$$-\frac{1}{3}\times-3x^2=x^2$$
therefore 
$$\int x^2\left(8-x^3\right)^5dx=-\frac{1}{3}\int\left(8-x^3\right)^5\left(-3x^2\right)dx$$
But I picked as stated before the reciprocal of $-3$ because it was the coefficient of the derivative of the expression $8-x^3$ not because it would leave an expression equivalent to $x^2$.  For example if I alter the question slightly to:
$$\int x^3\left(8-x^3\right)^5dx$$
then by picking $-\frac{1}{3}$ the following statement would be false?
$$\int x^3\left(8-x^3\right)^5dx=-\frac{1}{3}\int\left(8-x^3\right)^5\left(-3x^2\right)dx$$
Also 
$$\int-3x^2=-3\left(\frac{1}{3}x^3\right)+c$$
$$=x^3+c$$
Which is why I am confused as to why when integrating the full question $-3x^2$ seems to disappear.

You correctly recognised x^2 as "almost" thw derivative of  
So put  u = (8 - x^3),  and find du/dx = -3x^2.
The your integral becomes (-1/3)∫(-3x2)(8−x3)^5dx
= (-1/3) ∫ u^5 (du/dx) dx
= (-1/3) ∫ u^5 du   --  which is rather easier to follow.  It is the change of variable procedure, which is the reverse of the chain rule for derivatives.
(To verify this procedure, put  I = the integral, and compare dI/dx  and  dI/du, using the chain rule.)
