How to find the Taylor series of order $2$ at $x=1$ of the function $f(x)=\frac{x-1}{\ln (x)}.$ How to find the Taylor series of order $2$ at $x=1$ of the function $$f(x)=\frac{x-1}{\ln (x)}.$$
I don't want to use differentiation because I want to be prepared to find the Taylor series for higher orders. 
My Attempt: Write $$f(x)=\frac{1-x}{1-(1+\ln(x))}.$$ Now I consider the auxiliary function $$\frac{1}{1-u(x)}=1+(u(x)-1)+(u(x)-1)^2+o((u(x)-1)^2)$$ and since $1+\ln(x)\to 1$ as $x\to 1$ we have that $$f(x)=(1-x)(1+(x-x^2/2)+(x-x^2/2)^2+o(x^2))$$ $$=1-x^2/2+o(x^2).$$ However this answer is not correct. Where am I going wrong?
 A: $$\begin{align}\ln(1+x)&=x-x^2/2+x^3/3-\cdots\\ \ln(x)&=(x-1)-(x-1)^2/2+(x-1)^3/3\\ \frac1{\ln x}&=\frac{1}{x}\left(\frac1{1-(x-1)/2+(x-1)^2/3-\cdots}\right)\\&=\frac1{x-1}\cdot \left(1+\frac{x-1}2-\frac{(x-1)^2}3+\frac{(x-1)^2}4+O((x-1)^3)\right)\end{align}$$
So $$\frac{x-1}{\ln(x)}=1+\frac{x-1}2-\frac{(x-1)^2}{12}+O((x-1)^3)$$

Here we used the fact that $$\frac1{1-t}=1+t+t^2+\cdots$$
which is valid for $|t|<1$, which is true close to $x=1$ in the example we use ($x-1$ is small in this region).
A: Set $x=1+h$ $(h\to 0)$. Then
$$\frac{x-1}{\ln x}=\frac h{\ln(1+h)}=\frac{h}{h-\cfrac{h^2}2+\cfrac{h^3}3+o(h^3)}=\frac{1}{1-\cfrac{h}2+\cfrac{h^2}3+o(h^2)}.
$$
Next, do the division by increasing powers of $1$ by $\;1-\cfrac{h}2+\cfrac{h^2}3$ ip to order $2$. You should find
$$1+\frac{h}2-\frac{h^2}{12}+o(h^2),\quad\text{or, in terms of }\,x:1+\frac{x-1}2-\frac{(x-1)^2}{12}+o\bigl((x-1)^2\bigr). $$
A: In a neighbourhood of $x=1$ we have
$$ \log x = \log(1+(x-1)) = (x-1)-\frac{(x-1)^2}{2}+O((x-1)^3) $$
and in a neighbourhood of $z=0$ we have 
$$\frac{e^z-1}{z} = 1+\frac{z}{2}+\frac{z^2}{6}+O(z^3) $$
hence in a neighbourhood of $x=1$, by setting $z=\log x$, we have
$$\frac{x-1}{\log x}=\frac{e^{\log x}-1}{\log x}=1+\frac{\log x}{2}+\frac{\log^2 x}{6}+O(\log^3 x)$$
and by composing the previous Taylor polynomials
$$ \frac{x-1}{\log x} = \color{blue}{1}+\color{blue}{\frac{1}{2}}(x-1)\color{blue}{-\frac{1}{12}}(x-1)^2+O((x-1)^3). $$
These coefficients are known as Gregory coefficients and there is a vast literature on them and their relations to the Euler-Mascheroni constant $\gamma$.
