Consider the integral \begin{equation} I(x)=\int^{2}_{0} (1+t) \exp\left(x\cos\left(\frac{\pi(t-1)}{2}\right)\right) dt \end{equation} show that \begin{equation} I(x)= 4+ \frac{8}{\pi}x +O(x^{2}) \end{equation} as $x\rightarrow0$.
=> Using integration by parts, but its too complicated for me because of huge exponential term. please help me.
First, the change of variables $t\leftarrow2-t$ shows that $I(x)=\int_0^2(3-t)e^{x\,\cos(\pi(t-1)/2)}dt$, taking the half sum we conclude that $$\eqalign{I(x)&=2\int_0^2\exp\left(x\cos\frac{\pi(t-1)}{2}\right)dt\cr &=2\sum_{n=0}^\infty\frac{x^n}{n!}\int_0^2\cos^n\left(\frac{\pi(t-1)}{2}\right)dt\cr &=\frac{8}{\pi}\sum_{n=0}^\infty\frac{x^n}{n!}\int_0^{\pi/2}\cos^nu du\cr &= \frac{8}{\pi}\sum_{n=0}^\infty\frac{x^n}{n!}W_n }$$ where $W_n=\int_0^{\pi/2}\cos^nu du$ is the well-known Wallis integral. In particular, since $W_0=\frac{\pi}{2}$ and $W_1 =1$ we get $$I(x)=4+\frac{8}{\pi}x+{\cal O}(x^2)$$