Asymptotic expansion of integral - find my mistake The question asks for the leading term in the asymptotic expansion of
$$I(x) = \int_0^{\pi/2} \biggr ( 1-\frac{2t}{\pi} \biggr )^k \cos(x\cos{t}) \, dt, \;\; x \to \infty$$
for $k = 0, -1/2, -3/4$.
My attempt:
Let
$$J(x) = \int_0^{\pi/2} f_k(t) e^{ixu(t)} \, dt$$
where $f_k(t)=( 1-\frac{2t}{\pi})^k$ and $u(t)=\cos{t}$, so that $I(x) = Re (J(x))$
Applying the stationary phase method, I know the dominant $1/\sqrt{x}$ contribution will come from stationary points of $u(t)$, in our case at $t=0$.
So
$$J(x) \sim f_k(0) \int_0^\epsilon e^{ixu(t)} \, dt$$
We approximate $u(t) \approx 1 - \frac{t^2}{2}$ near $t=0$ so that
$$J(x) \sim f_k(0) e^{ix} \int_0^\epsilon e^{-ixt^2/2} \, dt$$
Asserting the $[\epsilon, \infty)$ contribution to be exponentially small and applying a Fresnel integral we obtain
$$J(x) \sim f_k(0) e^{i(x-\pi/4)} \sqrt{\frac{\pi}{2x}}$$
and so $$I(x) \sim f_k(0) \cos{(x-\pi/4)} \sqrt{\frac{\pi}{2x}}$$
But this is incorrect, (for one note $f_k(0)=1$ at all our values of $k$ of interest), yet I cannot see where I have made a mistake.
I did wonder if perhaps taking the Real part was not justified here, so i repeated the calculation instead using $\cos{\theta}=(e^{i\theta}+e^{-i\theta})/2$, but arrived at the same answer.
Any help is appreciated!
 A: Thanks to Maxim's comment for this answer. I've slightly rewritten it to try and do this without steepest descent, but the contour integration we'll need is essentially the same thing anyway.
The contribution missing from the singularity at $t=\pi/2$ is
$$K = \int_{\pi/2 - \epsilon}^{\pi/2}f_k(t)e^{ix\cos{t}} dt \approx \int_0^\epsilon (\frac{2t}{\pi})^k e^{ixt} dt$$
Integration by parts once and applying Riemann Lebesgue's lemma shows the $[\epsilon,\infty)$ contribution to be $O(1/x)$ (assuming $k<0$), which we will neglect.
So
$$K \sim \int_0^\infty(\frac{2t}{\pi})^k e^{ixt} dt$$
Following the same idea as a Fresnel integral you can deform the contour of integration to up the imaginary axis (show the quarter circle contribution vanishes) to get
$$K \sim i \int_0^\infty(\frac{2it}{\pi})^k e^{-xt} dt = (\frac{2}{\pi})^k i^{k+1} \frac{\Gamma(k+1)}{x^{k+1}}$$
(note $0<k+1<1$ so we were safe to neglect $O(1/x)$ terms). So all in all
$$I(x) \sim \cos{(x-\pi/4)} \sqrt{\frac{\pi}{2x}} + (\frac{2}{\pi})^k \frac{\Gamma(k+1)}{x^{k+1}} \cos{\frac{\pi(k+1)}{2}}$$
