# Value of integral $\int \frac{(1-x)^{n+1}}{x} dx$

I was working on a series, and I came up with integral, an indefinte form

$$\int \frac{(1-x)^{n+1}}{x} dx$$

I was wondering about how to solve this indefinte integral analytically. I solved it on Mathematica and got the result so, I was thinking how to approach the problem and solve it.After seeing the answer,I got no clue about how to approach it.

Also, Mathematica always doesn't give the neat answer. Can anyone approach the problem step wise and give a more simple answer that a undergraduate can work with.

• you can write the integral in the form of series(using binomial expansion), but I doubt a closed form exists. Probably it is supposed to be a definite integral Sep 14, 2020 at 8:28
• A FullSimplify[expr, Element[n, Integers] && n > 0] provides -Beta[1 - x, 2 + n, 0] Sep 14, 2020 at 8:32

Please correct me if I've gone wrong but here goes.. $$\int \frac{\left(1-x\right) \left(1-x\right)^n}{x}dx = \int \frac{\left(1-x\right)^{n+1}}{x}dx$$ $$\int\frac{\left(1-x\right)^n}{x}dx - \int\left(1-x\right)^ndx$$ $$\int\frac{\left(1-x\right)^n}{x}dx + \frac{\left(1-x\right)^{n+1}}{n+1} + k1$$ $$lnx=t$$ $$dx = xdt$$ $$x= e^t$$ $$\int\frac{\left(1-x\right)^n}{x}dx= \int(1- e^t)^ndt$$ $$\int(1- e^t)^ndt = \int[ 1 - {n \choose 1}e^t+ {n \choose 2}e^{2t}- {n \choose 3}e^{3t}+....+\left(-1\right)^n{n \choose n}e^{nt}]dt$$ $$= lnx- {n \choose 1}x+ \frac{{n \choose 2}x^2}{2}-\frac{ {n \choose 3}x^3}{3}+....+\frac{\left(-1\right)^n{n \choose n}x^n}{n}+k2$$

Hence, $$\int \frac{\left(1-x\right)^{n+1}}{x}dx= lnx- {n \choose 1}x+ \frac{{n \choose 2}x^2}{2}-\frac{ {n \choose 3}x^3}{3}+....+\frac{\left(-1\right)^n{n \choose n}x^n}{n}+ \frac{\left(1-x\right)^{n+1}}{n+1}+ k$$

• Can't I get it in closed form. Because I have got this integral from a series , and In turn you are also giving a series Sep 14, 2020 at 14:24
• If you look at it, it is in closed form as it has a finite number of predictable terms(dependent on n)..there might be some answer more concise,but i think this is the easiest approach Sep 15, 2020 at 8:30
• what did you do in the second step...it doesnt look like integration by parts Oct 1, 2020 at 6:41
• The numerator is (1-x)(1-x)^n= (1)(1-x)^n -(x)(1-x)^n Oct 1, 2020 at 7:32

My approach is similar to EtienneBfx's approach.

Let $$u = (1 - x) \Rightarrow -du = dx.$$

Also, note that
$$[E_1] ~(u - 1) \times (u^n + u^{(n-1)} + \cdots + 1) = u^{(n+1)} - 1.$$

Then, the (indefinite) integral becomes
$$\int ~\frac{u^{(n+1)}}{1 - u} \times (-du) ~=~ \int \frac{u^{(n+1)}}{u - 1} \times du$$
$$= ~\int \frac{u^{(n+1)} - 1}{u - 1} \times du ~+~ \int \frac{1}{u - 1} \times du.$$

In the line immediately above, the first term is easily resolved into a closed form expression via $$E_1.$$

The best way to do it, is to expand the formula $$\begin{equation} (1-x)^{n+1}=\sum_{k=0}^{n+1} \binom{n+1}{k} (-1)^k x^k \end{equation}$$ Then $$\begin{equation} \int \frac{(1-x)^{n+1}}{x} dx = \sum_{k=0}^{n+1} \binom{n+1}{k} (-1)^k \int x^{k-1} dx \end{equation}$$ Finnaly you can intergrate each term. $$\begin{equation} \int \frac{(1-x)^{n+1}}{x} dx = ln(x)-(n+1)x+\sum_{k=2}^{n+1} \binom{n+1}{k} (-1)^k \frac{x^{k}}{k-1} \end{equation}$$

• Binomial coefficient shouln't be $\binom{n+1}{k}$? Sep 14, 2020 at 8:35
• $(-x)^k$ is correct, but there is a $dx$ missing, and in the final result there should be $(x^k)/k$ Sep 14, 2020 at 8:39
• You both right, I correct it Sep 14, 2020 at 8:46
• $k-1$ should be $k$, so no need to extract the first term of the sum Sep 14, 2020 at 8:51