Solution Verification for Problem Finding constant $a$ and $b$ such that $\lim\limits_{x\to\frac{\pi}{2}}\dfrac{a(2x-\pi)\cos x+b}{\sin x-1}=1.$ 
Find $a$ and $b$ such that
$$\lim\limits_{x\to\frac{\pi}{2}}\dfrac{a(2x-\pi)\cos x+b}{\sin
 x-1}=1.$$

I try answer as follows.
The denumerator is zero when $x=\dfrac{\pi}{2}$. Now I assumed numerator is equal to $0$ (because if the numerator not equal $0$, the RHS is infinity). Then $b=0$ must hold. Now I try to using L'Hospital rule as below.
\begin{align}
\lim\limits_{x\to\frac{\pi}{2}}\dfrac{2a\cos x-a(2x-\pi)\sin x}{\cos x}&=1\\
\iff \lim\limits_{x\to\frac{\pi}{2}}\dfrac{-2a\sin x-2a\sin x-a(2x-\pi)\cos x}{-\sin x}&=1\\
\iff \lim\limits_{x\to\frac{\pi}{2}}\left(4a+a(2x-\pi)\cot x\right)&=1\\
\iff 4a&=1\\
\iff a&=\dfrac{1}{4}.
\end{align}
So, we have $a=\dfrac{1}{4}$ and $b=0$. Is it correct answer? I'm not sure with my answer.

Without l'Hospital, to verify we can also proceed by standard limits,  by $y=\frac \pi 2-x \to 0$
$$\dfrac{a(2x-\pi)\cos x+b}{\sin x-1}=\dfrac{-2ay\sin y+b}{\cos y-1}=\frac{y^2}{1-\cos y}\dfrac{2ay\sin y-b}{y^2}$$
from which we obtain the same answer.
