Doing Some Asymptotic Integration: Problem with a Taylor Series I evaluated this integral (with some help from you guys):


  $$\int_0^{\arcsin\left(\frac{a}{b}\right)} \exp\left(-\beta\left(b\cos(x)-\sqrt{a^2 - b^2 \sin^2(x)}\right)^2 \right) \, dx$$


and got an answer in terms of an F1 Appell hypergeometric series (with some sums), so I tried using a Taylor expansion to simplify things...

I only need the integral to be valid for small $b\cos(x)-\sqrt{a^2-b^2 \sin^2(x)}$ so I Taylor expand:


  $$
\int_{0}^{\arcsin\left(\frac{a}{b}\right)}\left(1-\beta\left(b\cos(x)-\sqrt{a^{2}-b^{2}\sin(x)}\right)^2\cdots\right)dx$$
  
  $$
=\arcsin\left(\frac{a}{b}\right)-\beta\left[\left(a^{2}x+b\cos(x)\sin(x)-b\sin(x)\left(\sqrt{a^{2}-b^{2}\sin^{2}(x)}\right)-a^{2}\arctan\left(\frac{b\sin(x)}{\sqrt{a^{2}-b^{2}\sin^{2}(x)}}\right)\right)\right]_{0}^{\arcsin\left(\frac{a}{b}\right)}$$


according to Mathematica. Notice the $a/0$ in the $\arctan$ term at the upper limit, which makes the integral undefined at this point so the approach doesn't work. I know this integral has a definite value (from the hypergeometric version), so what's gone wrong with this approach?
Following the approach like Difficult Gaussian Integral Involving Two Trig Functions in the Exponent: Any Help?, you will get the two key types of integral: $\int_0^{\sin^{-1}\frac{a}{b}}\cos^{2n-2m}x\left(a^2-b^2+b^2\cos^2x\right)^m~dx$ and $\int_0^{\sin^{-1}\frac{a}{b}}\cos^{2n-2m+1}x\left(a^2-b^2\sin^2x\right)^{m-\frac{1}{2}}~dx$ , where $m$ and $n$ are any non-negative integers

For $\int_0^{\sin^{-1}\frac{a}{b}}\cos^{2n-2m}x\left(a^2-b^2+b^2\cos^2x\right)^m~dx$ , where $m$ and $n$ are any non-negative integers, it can expand to the polynomial of $\cos x$ , so the indefinte integral will have $x$ term and polynomial of $\sin x$ and $\cos x$ , substitution of $0$ and $\sin^{-1}\dfrac{a}{b}$ should be no problem.

For $\int_0^{\sin^{-1}\frac{a}{b}}\cos^{2n-2m+1}x\left(a^2-b^2\sin^2x\right)^{m-\frac{1}{2}}~dx$ ,

$\int\cos^{2n-2m+1}x\left(a^2-b^2\sin^2x\right)^{m-\frac{1}{2}}~dx$

$=\int\cos^{2n-2m}x\left(a^2-b^2\sin^2x\right)^{m-\frac{1}{2}}~d(\sin x)$

$=\int(1-\sin^2x)^{n-m}\left(a^2-b^2\sin^2x\right)^{m-\frac{1}{2}}~d(\sin x)$

According to http://en.wikipedia.org/wiki/List_of_integrals_of_irrational_functions, the indefinte integral will have polynomial of $\sin x$ and $\sqrt{a^2-b^2\sin^2x}$ and $\sin^{-1}\dfrac{b\sin x}{a}$ term, substitution of $0$ and $\sin^{-1}\dfrac{a}{b}$ should be no problem.

How you get the $\tan^{-1}\dfrac{b\sin(x)}{\sqrt{a^2-b^2\sin^2x}}$ term? It should be not contained!
When you substitute the very last arctan with arcsin, you should remember:

$\sin^2(\arcsin(a/b))=(\sin(\arcsin(a/b)))^2=(a/b)^2$ 

So, $a/0$ appears as the following:

$\frac{b \sin(\arcsin(\frac{a}{b}))}{\sqrt{a^2-b^2 \sin^2(\arcsin(\frac{a}{b}))}}$=$\frac{b(\frac{a}{b})}{\sqrt{a^2-b^2(\frac{a}{b})^2}}$=$\frac{a}{0}$