How to integrate this guy:
$$\int_0^\infty \frac{(x^2+a)^n}{(x^2+b)^m} \>\text{d}x,$$
where $a,b,n,m$ are positive integers, and $n Thank you in advance. :)
How to integrate $\int_0^\infty \frac{(x^2+a)^n}{(x^2+b)^m} \>\text{d}x$?
-
1I do not understand why my comment has been removed. That integral can, indeed, be computed through a binomial expansion and Euler's beta function. – 2017-02-04
-
0you can also try to solve the recurrence equation $I_{m-1,n}=(b-a)I_{m,n}+I_{m,n+1}$ – 2017-02-04
-
0@tired that sounds interesting. how do you define the recurrence equation? could you show in details? – 2017-02-05
4 Answers
In a first step, we perform the substitution $y=x^2$. Then you integral reads $$ I=\int_0^\infty \!dy \frac{(y+a)^n}{2\sqrt{y}(y+b)^m}.\tag{1}$$
It is easy to show, the this integral is given by $$I = \oint_C\!dz \frac{(z+a)^n}{4i\sqrt{-z} (z+b)^m} ,\tag{2}$$ where $C$ is the keyhole contour; the branch cut of $\sqrt{z}$ is along the negative real axis.
The keyhole contour is chose such that the large semicircle ($for m \geq n+1/2$) and the small semicircle (around $z=0$) vanish. The remaining integral is along the real axis. Slightly below the real axis (along which you integrate to the left), we have that $1/\sqrt{-z} = -i/\sqrt{z}$. Slightly above the real axis (along which you integrate to the right), we have that $1/\sqrt{-z} = i/\sqrt{z}$. Together, these two contours give $2i/\sqrt{z}$. So in (2) you have to divide by an additional $2i$ with respect to (1).
The integral can thus be solved by the residue theorem. As the only pole is at $z=-b$, we obtain $$I = 2\pi i \mathop{\rm Res}_{z=-b} \frac{(z+a)^n}{4i\sqrt{-z} (z+b)^m}.$$
As there is an $m$-th order pole at $z=-b$, the result reads $$I = \frac{\pi}{2} \frac{1}{(m-1)!} \lim_{z \to -b} \frac{d^{m-1}}{dz^{m-1}}\left( \frac{(z+a)^n}{\sqrt{-z}} \right).$$
So now we need to evaluate the $m-1$-derivative. You can show by induction that $$\frac{d^{m-1}}{dz^{m-1}}\left( \frac{(z+a)^n}{\sqrt{-z}}\right)= (m-1)!\sum_{k=0}^{m-1}\binom{n}{k} \frac{ (2 m - 3 - 2 k)!! (a+z)^{n-k}}{(m-1-k)! 2^{m-1-k} (-z)^{m-1/2-k}}.$$
Thus, we obtain the result $$I= \frac{\pi}{2}\sum_{k=0}^{m-1}\binom{n}{k} \frac{ (2 m - 3 - 2 k)!! (a+z)^{n-k}}{(m-1-k)! 2^{m-1-k} (b)^{m-1/2-k}}$$
-
0That is very interesting. Can you tell me how you step from $\sqrt{y}$ to $2i\sqrt{-z}$ please? (+1 in the meantime). – 2017-02-04
-
1I prefer to call the keyhole contour "Pacman" for fun. – 2017-02-04
-
0Also, here is a possibly better image of the path: https://i.stack.imgur.com/UIBMS.png – 2017-02-04
-
2@AlanTuring: thanks. I added some lines explaining the factor $2i$. Also I have evaluated the final result explicitly. – 2017-02-04
-
0Awesome! $~~~~~$ – 2017-02-04
-
0@Fabian Or have you found the final result? ;) – 2017-02-04
-
0Thank you very much. Your answer helps me remind what complex variables can do. To be honest, I totally forgot this technique. Such a bad student! btw, thank you again. – 2017-02-04
Assuming $b>0$ and $k
-
0I sorry but may I ask you a question? I'm just wondering why the integrand can be reduced to \frac{x^{2k}}{(x^2+b)^m}. – 2017-02-04
-
1@PakhapoomSarapat: because $$(x^2+a)^n=\sum_{k=0}^{n}\binom{n}{k}\color{red}{x^{2k}}a^{n-k}.$$ – 2017-02-04
-
1oh wooowwww!!! I love this approach!!!!!!!!!!! thank you so much :) – 2017-02-04
-
0Why the downvote? – 2017-02-04
Assuming that $m>n+1/2$ so that the integral converges and $m\in\mathbb N$ for simplicity, it's easy enough to apply a semicircle contour, and by Jordan's lemma one can see the circular part of the integral goes to $0$ as $R\to\infty$. By symmetry, all that remains is twice the integral in interest, and by Cauchy's residue formula, we have
$$\oint_C\frac{(x^2+a)^n}{(x^2+b)^m}\ dx=2\pi i\frac1{(m-1)!}\lim_{x\to bi}\frac{d^{m-1}}{dx^{m-1}}\frac{(x^2+a)^n}{(x+bi)^m}$$
Which finally gives us
$$\int_0^\infty\frac{(x^2+a)^n}{(x^2+b)^m}\ dx=\pi i\frac1{(m-1)!}\lim_{x\to bi}\frac{d^{m-1}}{dx^{m-1}}\frac{(x^2+a)^n}{(x+bi)^m}$$
-
0This method is exactly as same as what I learned in complex variables course. Thank you very much for your help! – 2017-02-04
-
0:D Your welcome! – 2017-02-04
-
0I'm curious - can't you give an explicit expression instead of the limit? – 2017-02-04
-
1@nbubis I'm unsure how to tackle that request. I mean, I can brute force evaluate the $n$th derivative with general leibnize rule and all that, but the result doesn't look good. The best hope is to evaluate the Laurent series and then do the residue, but I can't see how to do so simply – 2017-02-04
$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
With $\ds{\quad a, b, m, n \in \mathbb{N}_{> 0}\quad}$ and $\ds{\quad \color{#f00}{m > n + {1 \over 2}}}$, note that: $$ \int_{0}^{\infty}{\pars{x^{2} + a}^{n} \over \pars{x^{2} + b}^{m}}\,\dd x = {1 \over b^{m - n - 1/2}} \int_{0}^{\infty}{\pars{x^{2} + \mu}^{n} \over \pars{x^{2} + 1}^{m}}\,\dd x\,, \qquad \mu \equiv {a \over b} $$
\begin{align} \int_{0}^{\infty}{\pars{x^{2} + a}^{n} \over \pars{x^{2} + b}^{m}}\,\dd x & = {1 \over b^{m - n - 1/2}} \int_{0}^{\infty}{\pars{x^{2} + \mu}^{n} \over \pars{x^{2} + 1}^{m}}\,\dd x \,\,\,\stackrel{x^{2}\ \mapsto\ x}{=}\,\,\, {1 \over 2b^{m - n - 1/2}} \int_{0}^{\infty}{\pars{x + \mu}^{n} \over \pars{x + 1}^{m}}\,x^{-1/2}\,\dd x \\[5mm] & \stackrel{x + 1\ \mapsto\ x}{=}\,\,\, {1 \over 2b^{m - n - 1/2}} \int_{1}^{\infty}x^{-m}\,\pars{x - 1}^{-1/2}\,\pars{x - 1 + \mu}^{n}\,\dd x \\[5mm] & \stackrel{x\ \mapsto\ 1/x}{=}\,\,\, {1 \over 2b^{m - n - 1/2}} \int_{1}^{0}x^{m}\pars{{1 \over x} - 1}^{-1/2}\pars{{1 \over x} - 1 + \mu}^{n} \,{\dd x \over -x^{2}} \\[5mm] & \stackrel{x\ \mapsto\ 1/x}{=}\,\,\, {1 \over 2b^{m - n - 1/2}} \int_{0}^{1}x^{m - n - 3/2}\,\pars{1 - x}^{-1/2}\, \bracks{1 - \pars{1 - \mu}x}^{\,n}\,\dd x\label{1}\tag{1} \\[5mm] & = {1 \over 2b^{m - n - 1/2}}\, {{}_{2}\mrm{F}_{1}\pars{-n,m - n -1/2;m - n;1 - \mu} \over \mrm{B}\pars{m - n - 1/2,1/2}} \end{align}
${}_{2}\mrm{F}_{1}$ is the 'Euler type' Hypergeometric Function and $\ds{\,\mrm{B}}$ is the Beta Function.
$$\bbx{\ds{% \int_{0}^{\infty}{\pars{x^{2} + a}^{n} \over \pars{x^{2} + b}^{m}}\,\dd x = {1 \over 2b^{m - n - 1/2}}\, {{}_{2}\mrm{F}_{1}\pars{-n,m - n -1/2;m - n;\bracks{b - a}/a} \over \mrm{B}\pars{m - n - 1/2,1/2}}}} $$ As explained in the above link, the result requires $\ds{\verts{1 - \mu} \leq 1\ \mbox{and/or}\ 1 \leq {b \over a} \leq 2}$. Otherwise, we can modify the factor $\ds{\bracks{1 - \pars{1 - \mu}}^{\,n}}$, in expression \eqref{1}, in a trivial way.
-
0I saw all comments mention the condition that $m>n+1/2$. Could you tell me how necessary of this condition? Btw, thank you very much! :) – 2017-02-05
-
0@PakhapoomSarapat Note that $\left(x^{2} + a\right)^{n}/\left(x^{2} + b\right)^{m} \sim x^{2n - 2m}\ \mbox{as}\ x \to \infty$. Also, $\int x^{2n - 2m}\,\mathrm{d}x \propto x^{2n - 2m + 1}$. The integral converges whenever $2n - 2m + 1 \color{#f00}{< 0} \implies m > n + 1/2$. – 2017-02-05
-
0oh gosh!!! I definitely cannot come up with this by myself. Thank you again :) – 2017-02-05
-
0@PakhapoomSarapat You're welcome. – 2017-02-05