1. ## Special Improper Integral

Say $f(x) = a_nx^n+...+a_1x+a_0$ is a real polynomial with $\deg f(x) \geq 2$ with no real zeros.
Say we want to find,
$\int_{-\infty}^{\infty} \frac{1}{f(x)} dx$.
Here are the steps:
1)Find the zeros (which are complex) of $f(x)$.
2)Disregard (throw away) the zeros that lie in the lower half plane (so for example, ignore $-i$).
3)Compute the multiplicity of each zero.
4)If $a$ is a zero of $f(x)$ with multiplicity $k$ compute: $\frac{1}{(k-1)!}\cdot \frac{d^{k-1}[(x-a)^{k-1}/f(x)]}{dx^k}$ evaluated at $a$.
5)Sum up all the values in step #4.
6)Multiply the total sum from #5 by $2\pi i$.
7)The value of the integral is equal to the value in #6.

Here is an example.

Say you want to find,
$\int_{-\infty}^{\infty} \frac{1}{f(x)} dx$ where $f(x)=x^2+1$.
Now do the steps.
1)The zeros of $f(x)$ are $+i,-i$.
2)We disregard $-i$ because it is a lower half of plane.
3)The multiplicity of $i$ is $1$. Thus $a=i$ and $k=1$
4)Compute $\frac{1}{(1-1)!}\cdot \frac{d^0[(x-i)/(x^2+1)]}{dx^0}$ thus $\frac{1}{x+i}\big|_{x=i}=\frac{1}{2i}$
5)There is only one value so the total sum is just $1/2i$
6)Multiply by $2\pi i$ to get $2\pi i (1/2i) = \pi$.
7)The value of the integral is $\pi$.

A real timesaver

Suppose $f(x)$ has zeros of multiplicity $1$. Then doing the ugly step in #4 is really easy because you are computing the $0$-th derivative (which is just doing the derivative 0 times, i.e. not doing anything). Let $a_1,a_2,...,a_n$ be its complex zeros. Since $f(x)\in \mathbb{R}[x]$ it means the complex values occur in complex conjugates pairs. Thus, half of these zeros are in the upper plane and half of these zeros are in the lower plane...

SORRY, I have to stop now. I will try to complete this post.

Have fun!

2. Originally Posted by ThePerfectHacker
A real timesaver

Suppose $f(x)$ has zeros of multiplicity $1$. Then doing the ugly step in #4 is really easy because you are computing the $0$-th derivative (which is just doing the derivative 0 times, i.e. not doing anything). Let $a_1,a_2,...,a_n$ be its complex zeros. Since $f(x)\in \mathbb{R}[x]$ it means the complex values occur in complex conjugates pairs. Thus, half of these zeros are in the upper plane and half of these zeros are in the lower plane...
Let me resume with this. Let $f(x)$ be at least a degree two polynomial with zeros of multiplicity 1 having no real zeros. Thus, it has to be a degree even polynomial because odd degree polynomials have real zeros. Let $a_1,a_2,...,a_n,a_{n+1},...,a_{2n}$ be its complex zeros. Since they occur in conjugate pairs half of them are in the upper plane and half of them in the lower plane. Rename these zeros so that $a_1,a_2,...,a_n$ are in the upper plane. Now the polynomial can be written as $f(x) = a(x-a_1)...(x-a_{2n})$. By step #4 in the above post we have $k=1$ so we need to compute $\frac{(x-a_j)}{f(x)}$ and evaluate that expression (after it is simplified) at $a_j$ for $1\leq j \leq n$. Thus, we need to find, $\frac{1}{a(a_j-a_1)...(a_j - a_{j-1})(a_j-a_{j+1})...(a_j-a_n)}$. That can seem like it is hard to compute but note that $a(a_j-a_1)...(a_j - a_{j-1})(a_j-a_{j+1})...(a_j-a_n) = af'(a_j)$ by applying the generalized product rule. Thus, the value for $a_j$ in step #4 is $1/f'(a_j)$. Thus, by step #5 the total sum is $1/f'(a_1)+...+1/f'(a_n)$.
And we therefore have that: $\boxed{ \int_{-\infty}^{\infty} \frac{dx}{f(x)} = 2\pi i \sum_{k=1}^n \frac{1}{f'(a_k)} }$.

Try for example: $f(x) = x^4+1$.

3. That's nice PH. May I ask a stupid question?. What is the d?

As in $d^{0}$. Is that a derivative?.

4. Originally Posted by galactus
That's nice PH. May I ask a stupid question?. What is the d?

As in $d^{0}$. Is that a derivative?.
d^0 just means take the derivative 0 times. That was how I defined it. So it just means leave the function alone.

5. That's what I thought, but I didn't want to presume. Thanks. This will come in handy.