Special Improper Integral

Say is a real polynomial with with no real zeros.
Say we want to find,.
Here are the steps:
1)Find the zeros (which are complex) of .
2)Disregard (throw away) the zeros that lie in the lower half plane (so for example, ignore ).
3)Compute the multiplicity of each zero.
4)If is a zero of with multiplicity compute: evaluated at .
5)Sum up all the values in step #4.
6)Multiply the total sum from #5 by .
7)The value of the integral is equal to the value in #6.

Here is an example.

Say you want to find, where .
Now do the steps.
1)The zeros of are .
2)We disregard because it is a lower half of plane.
3)The multiplicity of is . Thus and
4)Compute thus
5)There is only one value so the total sum is just
6)Multiply by to get .
7)The value of the integral is .

A real timesaver

Suppose has zeros of multiplicity . Then doing the ugly step in #4 is really easy because you are computing the -th derivative (which is just doing the derivative 0 times, i.e. not doing anything). Let be its complex zeros. Since 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...

Suppose has zeros of multiplicity . Then doing the ugly step in #4 is really easy because you are computing the -th derivative (which is just doing the derivative 0 times, i.e. not doing anything). Let be its complex zeros. Since 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 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 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 are in the upper plane. Now the polynomial can be written as . By step #4 in the above post we have so we need to compute and evaluate that expression (after it is simplified) at for . Thus, we need to find, . That can seem like it is hard to compute but note that by applying the generalized product rule. Thus, the value for in step #4 is . Thus, by step #5 the total sum is .
And we therefore have that: .