Integrating powers of linear and quadratic functions How can I integrate function such as $(x+9)^3$? I obviously know that I can expand the function and integrate it normally. However, that is possible and feasible only as it is of third degree. What if the function is more like: $(x^2-9x+5)^7$? How could I integrate this function?
 A: Setting $u = x+9 \implies du = \,dx$
That gives us $$\int (x+9)^3\,dx = \int u^3 \,du = \frac {u^4}4 + C = \frac 14(x+9)^4 + C$$
In your second example, we have a quadratic raised to a power, so the same method may not work. If you have $$\int x(x^2-9x+5)^7\,dx$$ then it will work since $x\,dx$ can be multiplied by a constant to give us $(x^2 - 9x + 5)' = 2x$.
With quadratics (raised to a power) for which you can complete the square, you can use trigonometric substitution. For example, $$(x^2 + 4x + 13) = (x^2 + 4x + 4 + 9) = (x+2)^2 + 3^2$$ Then the substitution $x+2 = 3 \tan \theta$ works well.
Note that for any function $f(x)$, $$\int f'(x) \cdot (f(x))^n \,dx = \dfrac{(f(x))^{n+1}}{n+1} + C$$
A: The first is simple because of the form $$\int (x+a)^n ~dx$$ hat is to say a first order polynomial to some power. So, the change of variable $x+a=y$ is clear and simple.  
The second one is effectively difficult and expansion (tedious task here !) will be what I should do because I cannot find, in the most general case, a suitable change of variable for $$\int (x^2+a x+b)^n ~dx$$ 
A: In case the quadratic has real roots, a possibility is to factorize to get $\displaystyle \int (x-a)^n(x-b)^n\mathop{dx}$
After the variable substitution $\ t=\dfrac{a-x}{a-b}\quad$ (note that $t$ is still a real variable...)
You arrive to an incomplete beta function $\displaystyle (-1)^{n+1}(a-b)^{2n+1}\underbrace{\int t^n(1-t)^n\mathop{dt}}_{B(x;\ n,n)}$
A: If $P(x)$ has degree $1$, say $P(x)=ax+b$, then
$$\int P(x)^ndx=\frac1{a(n+1)}P(x)^{n+1}+C$$
If $P(x)$ has a higher degree I don't think that there is a simple formula. But any online integrator will gladly do the dirty work for you.
