# How can we find a closed form solution of $\int(x+a)^m(x+b)^n~dx$?

I came across a problem of the form $\int(x+a)(x+b)^n~dx$ where $n$ is a constant and $n\in\mathbb{N}$. I was able to find its antiderivatives as well as generalize the result $$\int(x+a)(x+b)^n~dx=(a-b)\dfrac{(x+b)^{n+1}}{n+1}+\dfrac{(x+b)^{n+2}}{n+2}+C$$ However, I came across another problem of the form $\int(x+a)^m(x+b)^n~dx$ where $m$ and $n$ are constants and $m,n\in\mathbb{N}$. I was able to find its solution by using integration by substitution. However, I could not generalize my result. Instinctively, I tried using substitution as I used for the previous expression but could not distribute the factors.

Here is the integral computed on Wolfram Alpha.

The solution on Wolfram Alpha uses hypergeometric function but I can't figure out how to compute the solution. Any hints would appreciated.

• use binomial theorem to expand the the brackets, integrate termwise and bring it into hypergeometric form if you want reproduce WA – tired Feb 18 '17 at 12:10

Approach $1$:

$\int(x+a)^m(x+b)^n~dx$

$=\int(x+b+a-b)^m(x+b)^n~dx$

$=\int\sum\limits_{k=0}^mC_k^m(a-b)^{m-k}(x+b)^{n+k}~dx$

$=\sum\limits_{k=0}^m\dfrac{C_k^m(a-b)^{m-k}(x+b)^{n+k+1}}{n+k+1}+C$

Approach $2$:

$\int(x+a)^m(x+b)^n~dx$

$=\int(x+a)^m(x+a+b-a)^n~dx$

$=\int\sum\limits_{k=0}^nC_k^n(b-a)^{n-k}(x+a)^{m+k}~dx$

$=\sum\limits_{k=0}^n\dfrac{C_k^n(b-a)^{n-k}(x+a)^{m+k+1}}{m+k+1}+C$

• If $b=a$ then the sum becomes zero but thats not the integral of an expression of the form $(x+a)^m$ where $a$ and $m$ are constants. – Parth Feb 21 '17 at 12:49
• What about the summand for $k = n$? You actually have a $0^0$ i.e. it doesn't have to be $0$. – Paul K Feb 21 '17 at 12:55
• @menag yes you are right. Didn't notice that. Thanks for pointing out. – Parth Feb 21 '17 at 13:04
• How can we express this in terms of hypergeometric function? I tried but couldn't express it in that form. – Parth Feb 23 '17 at 11:49