When to apply complex integration for integral resolutions

complex-analysiscontour-integrationdefinite integralsintegrationsoft-question

Is there a criterion, a clue that makes me think that certain integrals can also be solved through complex integration and how to solve them?


When I can't solve an integral for my students of a high school, I use the numerical methods.

If I have these integrals how are they solved used the complex integrations?

First integral: $${\displaystyle\int_0^{2\pi}}\dfrac1{2\cos\left(x\right)+5}\,\mathrm{d}x={\displaystyle\int_0^{2\pi}}\dfrac{\sec^2\left(\frac{x}2\right)}{3\tan^2\left(\frac{x}2\right)+7}\,\mathrm{d}x \tag 1$$
I remember that $-2\leq 2\cos x\leq 2 \to 0<3\leq 2\cos x+5\leq 7$. Hence $2\cos x+5\neq 0, \forall x\in\Bbb R$.

Using the substitution $t=\dfrac{\sqrt{3}\tan\left(\frac{x}2\right)}{\sqrt{7}}$
I will have

$$\mathrm{d}x=\dfrac{2\sqrt{7}}{\sqrt{3}\sec^2\left(\frac{x}2\right)}\,\mathrm{d}t$$

Starting from the $(1)$ I will have $$(1)={\displaystyle\int_0^{2\pi}}\dfrac{2\sqrt{7}}{\sqrt{3}\left(7t^2+7\right)}\,\mathrm{d}t$$

and with easy steps I have:

$$=\left[\dfrac{2\arctan\left(\frac{\sqrt{3}\tan\left(\frac{x}2\right)}{\sqrt{7}}\right)}{\sqrt{21}}\right]_0^{2\pi}=\dfrac{2{\pi}}{\sqrt{21}}$$

Second integral: remember that $(x^2+1)^2\ne 0, \forall x\in\Bbb R$.
$$\displaystyle\int\limits^{+\infty}_{-\infty} \dfrac{\mathrm{d}x}{\left(x^2+1\right)^2}$$
Apply reduction formula:
$$\small{{\displaystyle\int}\dfrac1{\left(\mathtt{a}x^2+\mathtt{b}\right)^{\mathtt{n}}}\,\mathrm{d}x=\class{steps-node}{\cssId{steps-node-1}{\dfrac{2\mathtt{n}-3}{2\mathtt{b}\left(\mathtt{n}-1\right)}}}{\displaystyle\int}\dfrac1{\left(\mathtt{a}x^2+\mathtt{b}\right)^{\class{steps-node}{\cssId{steps-node-2}{\mathtt{n}-1}}}}\,\mathrm{d}x+\dfrac{x}{2\mathtt{b}\left(\mathtt{n}-1\right)\left(\mathtt{a}x^2+\mathtt{b}\right)^{\class{steps-node}{\cssId{steps-node-3}{\mathtt{n}-1}}}}}$$

I have:

$$\begin{aligned}&=\dfrac{x}{2\left(x^2+1\right)}+\dfrac12\int_{-\infty}^{+\infty}\frac1{x^2+1}\,\mathrm{d}x\\&=\lim_{p\to+\infty}\left[\dfrac{\arctan\left(x\right)}2+\dfrac{x}{2\left(x^2+1\right)}\right]_{-p}^p=\frac \pi2\end{aligned}$$

Third example: Obviously it must be $\sqrt{x}\left(x+1\right) \neq 0 \iff x>0$

$${\displaystyle\int_0^{+\infty}}\dfrac1{\sqrt{x}\left(x+1\right)}\,\mathrm{d}x$$

If I take $t=\sqrt{x} \to \mathrm{d}x=2\sqrt{x}\,\mathrm{d}t$. When with simple steps I will find

$$=\lim_{p\to+\infty}\left[2\arctan\left(\sqrt{x}\right)\right]_0^p=\pi$$

Thank you all very much and I hope always the best for all users.

Best Answer

One suggestive principle is this. To evaluate the integral $\int_a^b f(x)\;dx$ by complex contour integral methods, it is (usually) required that $a$ and $b$ are "special" points for the function $f$: for example, poles or branch points.

For example, $$ \int_{-1}^1\frac{dx}{\sqrt{1-x^2}} \tag1$$ is a good candidate, since $\pm1$ are branch points for the integrand. But $$ \int_{1/2}^1 \frac{dx}{\sqrt{1-x^2}} \tag2$$ is not a good candidate, since the point $x=1/2$ is nothing special for that integrand. Probably evaluating $(2)$ is no easier than evaluating the indefinite integral $$ \int_{a}^1 \frac{dx}{\sqrt{1-x^2}} \tag2 $$ for all $a$ with $-1 < a < 1$.