Limit of sequence using taylor's formula on trigonometric functions I had the following question in an exam. I wasn't able to solve the problem and I don't understand the solution. 
I am supposed to find the limit of the following sequence: 
$$ \lim_{x\to 1} \frac{\ln(x) - \sin(\pi x)}{\sqrt{x -1}} $$
where x > 1. 
Now the solution proceeded as follows 
$$ \ln(x) = x - 1 + O(|x-1|^2)  $$ 
which didn't make sense. I know that the taylor expansion of the natural logarithm is $ \ln(x+1) = x + O(x^2) $. But why did they add the -1 and why replace x with (x-1)? 
They then set:
$$ \sin(\pi x) = -\pi (x-1) + O(|x-1|^2) $$ which again isn't very clear to me. The taylor expansion of sin(x) is: $ \sin(x) = x + O(x^3) $. So how did they get to this expansion and how should I proceed to reach the same results? 
Thank you 

Since $\ln(x+1)=x+O(x^2)$, $\ln(x)=\ln\bigl((x-1)+1\bigr)=x-1+O\bigl((x-1)^2\bigr)$. And since $\sin(x)=x+O(x^2)$,\begin{align}\sin(\pi x)&=-\sin(\pi x-\pi)\\&=-\sin\bigl(\pi(x-1)\bigr)\\&=-\pi(x-1)+O\bigl((x-1)^2\bigr).\end{align}So\begin{align}\frac{\ln(x)-\sin(\pi x)}{\sqrt{x-1}}&=\sqrt{x-1}\frac{\ln(x)-\sin(\pi x)}{x-1}\\&\to0\times(1-\pi)\\&=0.\end{align}
