Let $f(x) = \frac{1 - \cos{P x}}{x \sin{x}}$ when $ x \neq 0 $ and $ f(0) = \frac{1}{2} $. If $ f $ is continuous at $ x = 0 $, then $ P $ is equal to