<s>[INST] Expand [a+b*log(1-x)]^{-1} as power seires in x Consider the function $[a+b\ln(1-x)]^{-1}$ near $x=0$, where $a$ and $b$ are constants.
As well-known, the Taylor series of $\ln(1-x)$ is $\ln(1-x)=-x-\frac{1}{2}x^2-\frac{1}{3}x^3-\frac{1}{4}x^4+...$. To expand the above function in Taylor series, can we just plug the expansion of $\ln(1-x)$ to get:
$$\left[a+b(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)\right]^{-1}=a^{-1}\left[1+\frac{b}{a}(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)\right]^{-1},$$
and then use the Taylor series of $(1+x)^{-1}=1-x+x^2-x^3+...$?
That is,
$$\left[a+b(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)\right]^{-1}=a^{-1}\left[1+\frac{b}{a}(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)\right]^{-1}=a^{-1}\left[1-\frac{b}{a}(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)+(\frac{b}{a})^2(-x-\frac{1}{2}x^2-\frac{1}{3}x^3+...)^2-...\right].$$
To keep terms up to $x^2$, it produces $a^{-1}\left[1-\frac{b}{a}(-x-\frac{1}{2}x^2)+(\frac{b}{a})^2x^2-...\right]=a^{-1}\left[1+\frac{b}{a}x+(\frac{b}{2a}+\frac{b^2}{a^2})x^2+O(x^3)\right]$. Is it correct?
Thank you in advance?
 [/INST] Looks good to me.  Since we can let $r = b/a$ and write $$f(x;a,b) = (a + b \log (1-x))^{-1} = \frac{1}{a} (1 + r \log (1-x))^{-1},$$ the series expansion can be written more compactly in terms of $r$; e.g.,
$$f(x;a,b) = \frac{1}{a} \sum_{k=0}^\infty \frac{c_k}{k!} x^k,$$ where $$\begin{array}{c|c}
k & c_k \\
\hline
0 & 1 \\
1 & r \\
2 & r(1 + 2r) \\
3 & 2r(1 + 3r + 3r^2) \\
4 & 2r(3 + 11r + 18r^2 + 12r^3) \\
5 & 2r(12 + 50r + 105r^2 + 120r^3 + 60r^4) \\
6 & 2r(60 + 274r + 675r^2 + 1020r^3 + 900r^5 + 360r^6) \\
\vdots & \vdots
\end{array}$$
</s>