Here is the problem from the textbook:
$$\int \frac{x^2}{x^3-7}dx$$
I don't understand why u substitution works on this problem, as in the explanation from the textbook I can only use it when I have two factors where one of them being the derivative of the otherone.
In the solution the enumerator is being treated as $\operatorname{g'}(x)$ and the first step of the solution looks like this:
$$\frac{1}{3}\int \frac{3x^2}{x^3-7}dx$$
Can we just add the factor 3 to x² because we're multiplying the whole integral by 1/3 which neutralizes the factor of 3 again?
You can do a $u$-substitution when you have something containing a function, and that something is multiplied by the derivative of that function. In other words, if you have $∫(())′()$, you can use a u substitution.
In your case you have $f(x)=\frac{1}{x-7}$ and $g(x)=x^3$ to give $f(g(x))g'(x)=\frac{1}{x^3-7}\cdot3x^2=\frac{3x^2}{x^3-7}.$ So to get rid of the extra factor of $3$, you multiply it by $\frac{1}{3}$. Then you substitute $u=g(x)=x^3.$