# Getting different answers when using integration by parts vs adding zero

$$\int \:bx\left(x+a\right)^{n-1}dx$$

I tried using $$(x+a-a)$$ which gives the apparently correct $$\frac{b}{n+1}\left(x+a\right)^{n+1}-\frac{ba}{n}\left(x+a\right)^n+C$$

However, I tried using by parts as well, using the tabular/DI method. It needed two iterations but my answer is different! My main concern is no $$a$$ term out the front. By integrating $$\left(x+a\right)^{n-1}$$ and differentiating $$x$$, I get $$\frac{bx}{n}\left(x+a\right)^{n+1}-\frac{b}{n\left(n+1\right)}\left(x+a\right)^{n+1}+C$$

Why is this happening?

When you do integration by parts, you get $$b\left[\frac{x(x+a)^{\color{red}{n}}}{n}-\frac{(x+a)^{n+1}}{n(n+1)}\right]+C.$$ (Note: the power in the first term is incorrect in your answer by IP method) We can write this as: $$\frac{b(x+a)^n}{n}\left[x-\frac{(x+a)}{n+1}\right]+C=\color{blue}{\frac{b(x+a)^n}{n(n+1)}\left[nx-a\right]+C}.$$ This is same as the answer you got by the first method (simplify that by factoring out $$b(x+a)^n$$).
• Expanding $\color{blue}{\frac{b(x+a)^n}{n(n+1)}\left[nx-a\right]+C}$ doesnt give you $\frac{b}{n+1}\left(x+a\right)^{n+1}-\color{red}{\frac{ba}{n}\left(x+a\right)^n}+C$ Jul 26 at 12:31
• @user71207 Your first answer can be simplifed as follows: $\frac{b}{n+1}\left(x+a\right)^{n+1}-\frac{ba}{n}\left(x+a\right)^n+C=b(x+a)^n\left[\frac{x+a}{n+1}-\frac{a}{n}\right]+C=\frac{b(x+a)^n}{n(n+1)}\left[nx-a\right]+C$. This last expression is the same as I have in my answer. Jul 26 at 12:34
• @user71207 If you want to start from $\color{blue}{\frac{b(x+a)^n}{n(n+1)}\left[nx-a\right]+C}=\frac{b(x+a)^n}{n(n+1)}\left[nx+\color{red}{na-na}-a\right]+C=b(x+a)^n\left[\frac{nx+na}{n(n+1)}-\frac{a(n+1)}{n(n+1)}\right]+C$. Now you get the answer you were looking for. Jul 26 at 12:41