A definite integral in the Bessel function $J_{-1/2}(s)$ from Stein-Shakarchi I'm working through the asymptotics section of Stein-Shakarchi's Complex Analysis, where the Bessel function is defined, for $\nu > - \frac{1}{2}$ as
$$ J_{\nu}(s) = \frac{(s/2)^\nu}{\Gamma(\nu + 1/2)\Gamma(1/2)}\int_{-1}^1e^{isx}(1-x^2)^{\nu-1/2}\text{d}x $$
They then state that if $J_{-1/2}(s)$ is defined as $\lim_{\nu\to -1/2}J_\nu(s)$ then it equals $\sqrt{\frac{2}{\pi s}}\cos(s).$ I can see where the prefactor comes from but I don't understand how one gets $\cos(s)$ from this limit. Any help would be appreciated.
 A: Clearly, we cannot just let $\nu \searrow - \frac{1}{2}$ immediately in your formula, since the Gamma function and the integral are divergent for $\nu = -\frac{1}{2}$. We first rewrite the expression:
\begin{align}
\operatorname{J}_\nu (s) &= \frac{(s/2)^\nu}{\sqrt{\pi} \operatorname{\Gamma}\left(\nu + \frac{3}{2}\right)} \left(\nu + \frac{1}{2}\right) \int \limits_{-1}^1 \mathrm{e}^{\mathrm{i} s x} (1-x^2)^{\nu - \frac{1}{2}} \, \mathrm{d}x \\
&= \frac{(s/2)^\nu}{\sqrt{\pi} \operatorname{\Gamma}\left(\nu + \frac{3}{2}\right)} \left(\nu + \frac{1}{2}\right) \int \limits_0^1 2 \cos(s x) (1 - x^2)^{\nu - \frac{1}{2}} \, \mathrm{d} x \\
&= \frac{(s/2)^\nu}{\sqrt{\pi} \operatorname{\Gamma}\left(\nu + \frac{3}{2}\right)} \int \limits_0^1 \frac{\cos(sx)}{x} \frac{\mathrm{d}}{\mathrm{d}x} \left(1 - (1-x^2)^{\nu + \frac{1}{2}}\right) \mathrm{d} x \, .
\end{align}
Then we integrate by parts to obtain
$$
\operatorname{J}_\nu (s) = \frac{(s/2)^\nu}{\sqrt{\pi} \operatorname{\Gamma}\left(\nu + \frac{3}{2}\right)} \left[\cos(s) + \int \limits_0^1 [\cos(s x) + s x\sin(s x)] \frac{1 - (1-x^2)^{\nu + \frac{1}{2}}}{x^2} \mathrm{d} x \right] .
$$
Now the prefactor is harmless. The fraction in the remaining integral is bounded by $1$ and goes to zero for $x \in [0,1)$ as $\nu \searrow - \frac{1}{2}$. Therefore, we can finally take the limit to find
\begin{align}
\operatorname{J}_{-1/2} (s) &= \lim_{\nu \searrow -1/2} \frac{(s/2)^\nu}{\sqrt{\pi} \operatorname{\Gamma}\left(\nu + \frac{3}{2}\right)} \left[\cos(s) + \int \limits_0^1 [\cos(s x) + s x\sin(s x)] \frac{1 - (1-x^2)^{\nu + \frac{1}{2}}}{x^2} \mathrm{d} x \right] \\
&= \frac{(s/2)^{-1/2}}{\sqrt{\pi} \operatorname{\Gamma}(1)} [\cos(s) + 0] = \sqrt{\frac{2}{\pi s}} \cos(s) \, .
\end{align}
A: Consider the integral $\varphi_p(t):=\int^1_{-1}(1-x^2)^pe^{-ixt}\,dx$. Expanding the exponential in $\varphi_p$ as a power series yields
\begin{align*}
    \phi_p(t)&=\int^1_{-1}(1-x^2)^p\sum_{n\geq0}\frac{(-ixt)^n}{n!}\,dx =\sum_{n\geq0}\frac{(-it)^n}{n!}\int^1_{-1}(1-x^2)^px^n\,dx\\
    &=2\sum_{k\geq0}\frac{(-it)^{2k}}{(2k)!}\int^1_0(1-x^2)^px^{2k}\,dx\\
    &=\sum_{k\geq0}\frac{(-it)^{2k}}{(2k)!}\int^1_0(1-u)^pu^ku^{-1/2}\,du \\
    &=\sum_{k\geq0}\frac{(-1)^kt^{2k}}{(2k)!}B(p+1,k+\tfrac12)
  \end{align*}
where $B$ is the beta function.  Using the identities
\begin{align*}
    B(p+1,k+\tfrac12) &= \frac{\Gamma(p+1)\Gamma(k+\tfrac12)}{\Gamma(p+k+\tfrac32)} = \frac{\Gamma(p+1)}{\Gamma(p+k+\tfrac32)}\frac{(2k)!\sqrt{\pi}}{2^{2k}\,k!}
  \end{align*}
we obtain
\begin{align*}
    \varphi_p(t)&= \int^1_{-1}(1-x^2)^pe^{-ixt}\,dx=\sum_{k\geq0}\frac{(-1)^k\Gamma(p+1)\sqrt{\pi}}{\Gamma(k+ p+ \tfrac32)k!}\Big(\frac{t}{2}\Big)^{2k}
  \end{align*}
Then
\begin{align}
J_{p+\tfrac12}(t) = \frac{(t/2)^{p+\tfrac12}}{\Gamma(p+1)\sqrt{\pi}} \varphi_p(t)= \frac{(t/2)^{p+\tfrac12}}{\Gamma(p+1)\sqrt{\pi}} \sum_{k\geq0}\frac{(-1)^k\Gamma(p+1)\sqrt{\pi}}{\Gamma(k+ p+ \tfrac32)k!}\Big(\frac{t}{2}\Big)^{2k}
\end{align}
On the other hand, the trigonometric substitution $x=\sin\theta$ in the integral defining $\varphi_p$ gives
\begin{align*}
    \varphi_p(t)=\int^{\pi/2}_{-\pi/2}e^{-it\sin\theta}\cos^{2p+1}\theta\,d\theta=
    \int^{\pi/2}_{-\pi/2}e^{it\sin\theta}\cos^{2p+1}\theta\,d\theta=
    \int^\pi_0 e^{-i\cos\theta}\sin^{2p+1}\theta\,d\theta
  \end{align*}
Putting things together, we have that

Lemma: For $p>-\tfrac32$
\begin{align}
     \int^\pi_0e^{-it\cos\theta}\sin^{2p+1}\theta\,d\theta =  \frac{\Gamma(p+1)\sqrt{\pi}}{(t/2)^{p+\tfrac12}}J_{p+\tfrac12}(t)=\int^1_{-1}(1-x^2)^p e^{-xti}\,dx\tag{0}\label{zero}
   \end{align}
where $J_m$ is the Bessel function of order $m$.

A simple computation shows that
A simple computation shows that for all $m>-1$,
\begin{align}
    \frac{d}{dz}\Big(z^{-m}J_m(z)\Big)&=-z^{-m}J_{m+1}(z)\tag{1}\label{one}\\
    \frac{d}{dz}\Big(z^mJ_m(z)\Big) &= z^mJ_{m-1}(z)\tag{2}\label{two}
    \end{align}
For $p=0$ in identity \eqref{zero} we obtain
$$ J_{1/2}(t)=\frac{\sqrt{t}}{\sqrt{2\pi}}
  \int^1_{-1}e^{-itx}\,dx=\sqrt{\frac{2}{\pi t}}\sin t$$
Using \eqref{two} or ($p=-1$ in the power series above) yields
$$ J_{-1/2}(z)=\sqrt{\frac{2}{\pi t}}\cos t$$
