Need help with taylor series. 
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 
 A: 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 

$$\lim\limits_{x \to 1} \frac{1-x + \ln x}{1+ \cos πx}=-\frac{1}{\pi^2}.$$

A: First, let $h=x-1$ then $\cos \pi x=\cos (\pi +\pi h)=-\cos (\pi h).$ 
Next re-write the original fraction as the following product
\begin{equation*}
\frac{1-x+\ln x}{1+\cos \pi x}=\frac{-h+\ln (1+h)}{1-\cos (\pi h)}=\frac{%
-h+\ln (1+h)}{h^{2}}\times \frac{(\pi h)^{2}}{(1-\cos (\pi h))}\times \frac{1%
}{\pi ^{2}}.
\end{equation*}
By Taylor expansion we can note that 
\begin{align}
\cos \pi h& =1-\frac{(\pi h)^{2}}{2}+o(h^{3})  \notag \\
\log (1+h)& =h-\frac{h^{2}}{2}+o(h^{3}).  \notag
\end{align}
then
\begin{equation*}
\lim_{h\rightarrow 0}\frac{-h+\log (1+h)}{h^{2}}=\lim_{h\rightarrow 0}(-%
\frac{1}{2}+o(h))=-\frac{1}{2}.
\end{equation*}
\begin{equation}
\lim_{h\rightarrow 0}\frac{1-\cos (\pi h)}{(\pi h)^{2}}=\lim_{h\rightarrow 0}%
\frac{\frac{(\pi h)^{2}}{2}+o(h^{3})}{(\pi h)^{2}}=\lim_{h\rightarrow 0}%
\frac{1}{2}+\frac{1}{\pi ^{2}}o(h)=\frac{1}{2}.  
\end{equation}
Therefore
\begin{eqnarray*}
\lim_{x\rightarrow 1}\frac{1-x+\ln x}{1+\cos \pi x} &=&\lim_{h\rightarrow 0}%
\frac{-h+\ln (1+h)}{h^{2}}\cdot \frac{(\pi h)^{2}}{(1-\cos (\pi h))}\cdot 
\frac{1}{\pi ^{2}}. \\
&=&\lim_{h\rightarrow 0}\frac{-h+\ln (1+h)}{h^{2}}\cdot \lim_{h\rightarrow 0}%
\frac{(\pi h)^{2}}{(1-\cos (\pi h))}\cdot \lim_{h\rightarrow 0}\frac{1}{\pi
^{2}}. \\
&=&-\frac{1}{2}\cdot \frac{2}{1}\cdot \frac{1}{\pi ^{2}} \\
&=&-\frac{1}{\pi ^{2}}.
\end{eqnarray*}
$\bf{EDIT:}$ You stack because you tried to deal with the whole expression at ONCE. My computations were done TWO times but on A SMALL piece at a time: Divide and conquer! 
A: You do not need the Tailor expansion but only the first derivative, the rule of L'Hôpital gives us:
$$
\lim\limits_{x \to 1} \frac{1-x + \ln x}{1+ \cos πx}=\lim\limits_{x \to 1} \frac{\frac{1}{x}-1}{-\pi\,\sin\pi x}=\lim\limits_{x \to 1} \dfrac{\dfrac{1}{x^2}}{-\pi^2\cos\pi x} = -\dfrac{1}{\pi^2}
$$
