How to integrate $\int \frac{1}{y^s (1-y)} dy$? I want to integrate the above function where s can take any value (positive or negative). Also, I would like to integrate this without limits, so I won't be able to use Gamma function as per my understanding.
For this specific problem, $0 < y < 1$, hence I tried expanding $(1-y)$ as
$$
1 + y + y^2 + y^3 + \cdots = \frac{1}{1-y}
$$
Multiplying this with $\frac{1}{y^s}$ and integrating gave
$$
\int \frac{1}{y^s (1-y)} dy = \frac{-1}{y^s} \left(\frac{y}{-s+1} + \frac{y^2}{-s+2} + \cdots \right)
$$
For $s = 0$, the expression comes out to be $\ln(1-y)$ which is expected, however, I would like to obtain a closed-form solution for any general s. Any hints are greatly appreciated.
 A: the upper/lower incomplete gamma function will likely give a result for this. You can easily define your function in terms of the incomplete beta function which can be defined in terms of the hypergeometric function:
$$B(z;a,b)=\int_0^zx^{a-1}(1-x)^{b-1}\,dx$$
also note the Chebyshev integral is defined as:
$$\operatorname{Ch}(a,b)=\int x^p(1-x)^q\,dx=B(x;1+p,1+q)$$
in your case you get:
$$\int y^{-s}(1-y)^{-1}\,dy=B(y;1-s,0)$$
now using the relationship:
$$B(z;a,b)=\frac{z^a}{a}\,_2F_1(a,1-b;a+1;z)$$
you can get your integral in terms of the hypergeometric function, which can be accurately calculated by most softwares
A: Not entirely sure whether this works but here's what I have come up with
$$\begin{align}\int y^{-s}(1-y)^{-1}dy &= \int y^{-s}\sum_{x=0}^{\infty}y^xdy \\ &=\sum_{x=0}^{\infty} \int y^{-s}y^xdy \\ &=\sum_{x=0}^{\infty} \frac{y^{x-s+1}}{x-s+1} \\ &= y^{1-s}\Phi(y, 1, s-1) \end{align}$$
Given that $0<y<1$, where $\Phi(y, 1, s-1)$ is the Lerch Transcendent
A: While this can be expressed in terms of the incomplete beta function, this runs into a problem if you want a real valued function. The beta function has a branch point at $y = 1$, so you get complex numbers for $y > 1$. However, the imaginary part is a constant $-i\pi$, and since the derivative of a constant is $0$, just ignoring that gives a real-valued antiderivative on $\mathbb R \setminus \{1\}$. This domain is the best you can do, as the integral diverges for $y = 1$. Thus
$$
\mathrm{Re}[B_y(1-s, 0)] + C(y)
$$
is the general form, where $C(y)$ is constant on $y < 1$ and $y > 1$, though not necessarily the same in both regions.
A: Something that you can verify on your own for the discrete case is for any integer positive integer $n$,
$$\sum_{k=1}^n \frac{1}{y^k} = \frac{y^n-1}{y^n(y-1)}$$
using the geometric series formula. From this,
$$\sum_{k=1}^n \frac{1}{y^k}+\frac{1}{y^n(y-1)}=-\frac{1}{1-y}$$
which implies
$$\frac{1}{y^n(1-y)}=\sum_{k=1}^n \frac{1}{y^k}+\frac{1}{1-y}$$
This will lead to the result of (for $s$ an integer)
$$\int\frac{1}{y^s(1-y)}dy = \int \sum_{k=1}^s \frac{1}{y^k} dy -\ln|1-y| = \ln|y|-\sum_{k=2}^s\frac{1}{(k-1)y^{k-1}}-\ln|1-y|, s \geq 2$$
