Integrate by substitution (Not by parts) $\int(x^2-2x)(x^3-3x^2+9)dx$ I have an integration question and I cannot figure out why my answer is incorrect as online calculators will use integration by parts instead, when technically we haven't (and won't) learn that method so I want to be very comfortable with integration with substitution.
$$\int\big(x^2-2x\big)\big(x^3-3x^2+9\big)dx$$
So what I did was
$$u=x^3-3x^2+9$$
$$=\int(x^2-2x)\;u\;\frac{dx}{3(x^2-2x)}$$
$$=\frac{1}{3} \int u \;du $$
$$=\frac{u^2}{6}$$
$$=\frac{\big(x^3-3x^2+9\big)^2}{6}+C$$
But apparently this is incorrect.
My problem may be misunderstanding what can be substituted when?
Help is appreciated.
 A: Your approach is fine. There is more than one way to solve a problem.
Here are some minor edit.
Let $u=x^3-3x^2+9$
$\int(x^2-2x)\cdot (x^3-3x^2+9)dx$
$=\int(x^2-2x)\cdot u\frac{d\color{blue} u}{3(x^2-2x)}$
=$\frac{1}{3} \int udu $
$=\frac{u^2}{6}+\color{blue}{C}$
=$\frac{(x^3-3x^2+9)^2}{6}+C$
A: You can do it as a 'chain rule backwards'.
If you set up the situation
$$\int f'(x)f(x)dx$$
it will equal
$$\frac{\big(f(x)\big)^{2}}{2}+c$$
So, a small adjustment sets up the situation,
$$\int\big(x^2-2x\big)\big(x^3-3x^2+9\big)dx$$
$$=\frac{1}{3}\int\big(3x^2-6x\big)\big(x^3-3x^2+9\big)dx$$
and the answer is then,
$$=\frac{1}{3} \times \frac{\big(x^3-3x^2+9\big)^2}{2}+c$$
which is the same as you got.
It's illuminating to now differentiate this answer using the 'chain rule' to see how the one part answer goes back to the two parts of the question.
The advantage of the 'chain rule backwards' approach is that, although harder to learn initially, lets you see the 'bigger picture' whereas the substitution method tends to focus eyes on the 'smaller picture' of getting a technical mechanism to work.
Anyway, don't lose sight of the fact that you got it right !
PS
The more general rule is,
$$\int f'(x)(f(x))^ndx$$
$$=\frac{\big(f(x)\big)^{n+1}}{n+1}+c$$
In your case $n=1$.
A: As per your comment, you can always expand:
$$\int\big(x^2-2x\big)\big(x^3-3x^2+9\big)dx$$
$$= \int x^5-3x^4+9x^2-2x^4+6x^3-18x \  \mathrm{d} x$$
$$= \int x^5-5x^4+6x^3+9x^2-18x \  \mathrm{d} x$$
$$= \frac{1}{6}x^6 - x^5 + \frac{3}{2}x^4 + 3x^3-9x^2 + C$$
$$= \frac{1}{6} \left(x^6 - 6x^5 + 9x^4 + 18x^3 - 54x^2 + C'\right)$$
Which should be equivalent to:
$$\frac{1}{6}  \left( \left(x^3-(3x^2-9) \right)\left(x^3-(3x^2-9) \right)  \right)$$
$$=\frac{1}{6} \left(x^6-2(x^3)(3x^2-9) + (3x^2-9)^2 \right)$$
$$=\frac{1}{6} \left(x^6-6x^5+18x^3+9x^4-54x^2+81 \right)$$
$$=\frac{1}{6} \left(x^6-6x^5+9x^4+18x^3-54x^2+C' \right) \color{#228b22}{\checkmark}$$
