We will use the following formula: `int (f'(x))/(f(x))dx=ln|f(x)|+C`
The formula tells us that if we have integral of rational function where the numerator is equal to the derivative of the denominator, then the integral is equal to natural logarithm of the denominator plus some constant. The proof of the formula can be obtained by simply integrating the right-hand side.
Since `(x^3+3x^2+9x)'=3x^2+6x+9=3(x^2+2x+3)` we will first have to slightly modify the integral in order to apply the formula. We will both multiply and divide the integral by 3.
Now we apply the formula to obtain the final result.