Evaluate the limit $$\lim\limits_{x \to 1} \frac{1-x + \ln x}{1+ \cos πx}$$
The limit im trying to get is $-\frac{1}{π^2}$ as I've solved from l'Hopitals rule.
Now I need to solve the limit by using Taylor Series and this is what i did so far
$$\begin{align*} f(x) &= 1-x + \ln x = 1 -x + (x-1) + \frac{1}{2} (x-1)^2 + \frac{1}{3} (x-1)^3 - \frac{1}{4} (x-1)^4 + \ldots \\ g(x) &= 1+\cos πx = 1+\left[ 1+\frac{1}{2!} (πx)^2 + \frac{1}{4!} (πx)^4 - \frac{1}{6!} (πx)^6 +\ldots \right] \\ \frac {f(x)}{g(x)} & = \frac{\frac{1}{2} (x-1)^2 + \frac{1}{3} (x-1)^3 - \frac{1}{4}(x-1)^4 + \ldots} {2-\frac{1}{2!} (πx)^2 + \frac{1}{4!} (πx)^4 - \frac{1}{6!} (πx)^6+\ldots} \end{align*}$$
I have no idea where to go to solve for $-\frac{1}{π^2}$ now. Please help
Hint. You have, near $x=1$, $$1-x + \ln x = 1 -x + (x-1) -(x-1)^2/2+ O(x-1)^3$$ $$1-x + \ln x = -(x-1)^2/2+ O(x-1)^3$$ and $$1+\cos πx = 1 -1+\frac{\pi^2}2 (x-1)^2 + O(x-1)^3$$ $$1+\cos πx = \frac{\pi^2}2 (x-1)^2 + O(x-1)^3$$ thus
$$\frac{1-x + \ln x}{1+ \cos πx} =\frac{-(x-1)^2/2+ O(x-1)^3}{\frac{\pi^2}2 (x-1)^2 + O(x-1)^3}=\frac{-1/2+ O(x-1)}{\pi^2/2 + O(x-1)}=-\frac{1}{\pi^2}+ O(x-1)$$ then