In a work calculation I have come across an expression that involves $\sin(x)/x$ which is undefined for $x=0$, even though for my problem, in the $x=0$ case, $\sin(x)/x$ should naturally be $1$ from the context of the problem.
This is handily fixed by substituting $\sin(x)/x = \operatorname{sinc}(x)$, which is defined as $\operatorname{sinc}(x) = \sin(x)/x$ for all nonzero $x$, and $\operatorname{sinc}(0) = 1$.
However, my work calculation also has an expression $(\cos(x)-1)/x$, which has an analogous problem; for $x=0$, it should simplify to $0$ (which is the limit for $x\to0$) but it is, of course, undefined.
As in the $\operatorname{sinc}$ case, my goal is to obtain an expression that's defined everywhere, with no inconvenient 'special case' for $x=0$.
Is there, perhaps, an obvious way to write $(\cos(x)-1)/x$ in terms of $\operatorname{sinc}(x)$ that I am missing? Or, alternatively, is there an analogous function defined for this case?
$$1-\cos x = 2 \sin^2\left(\frac{x}{2}\right)$$ $$\frac{\cos x-1}{x} = \frac{-2\sin^2\left(\frac{x}{2}\right)}{x} = \frac{-2\operatorname{sinc}^2\left(\frac{x}{2}\right)}{x}\left(\frac{x}{2}\right)^2= -\frac{x}{2}\operatorname{sinc}^2\left(\frac{x}{2}\right)$$