Analytically evaluate an integral in quadratic and higher powers?

Assuming that p1, p4 > 0, are there any substitutions which could get the integration evaluated analytically?

$Assumptions = {p1 > 0 && p4 > 0}
Integrate[1/((p1 + p4)^2*(1 + p4^2)^2), {p4, -Infinity, Infinity}]

If the expression is split up, only one of the three groups evaluates to an analytic result, but the others won’t.

Apart[1/((p1 + p4)^2*(1 + p4^2)^2)]
(* (3*p1^2 - 4*p1*p4 - 1)/((p1^2 + 1)^3*(p4^2 + 1)) + (p1^2 - 2*p1*p4 - 1)/((p1^2 + 1)^2*(p4^2 + 1)^2) + 
  (4*p1)/((p1^2 + 1)^3*(p1 + p4)) + 1/((p1^2 + 1)^2*(p1 + p4)^2)*)

Integrate[(-1 + p1^2 - 2*p1*p4)/((1 + p1^2)^2*(1 + p4^2)^2), {p4, -Infinity, Infinity}]
(* (\[Pi] (p1^2-1))/(2 (p1^2+1)^2) *)

If p1>0

then integral does not converge and value is \infty

if \Im(\text{p1})<0

52812.png

Reagards,MI

Hi Mariusz Iwaniuk, Thanks for your reply. Note however, that both p1>0, p4 >0.
The integral is clearly convergent over p4. For e.g. if p1=2,

NIntegrate[1/((2 + p4)^2*(1 + p4^2)^2), {p4, -Infinity, Infinity}]
(*491.433 *)

There is a singularity when p1==-p4, if p1, p4 are only reals, and not necessarily >0. But it’s that which is tractable?

If assume as an example p1=2 then:

f[x_] := 1/((2 + x)^2 (1 + x^2)^2);
g[e_] := NIntegrate[f[x], {x, -e, e}, Method -> "Trapezoidal"];
Table[{10^e, g[10^e]}, {e, 1, 20}] // Quiet // MatrixForm

and what are the conclusions ?

The high power of p4 in the denominator must confirm that the integral is convergent with p4>0.

Maple seems to be able to do it with the following commands (assume p1=q1, p4=q4, Maple output converted to LaTeX format)

interface(showassumed=0); assume(q1>0,q4>0);

A:= simplify(int(1/((q4^2 + 1)^2 *(q1+q4)^2),q1,q4));

A := \frac{1}{2}\,\frac{(q4^2\,+\,1) \, ln(q4^2\,+\,1)\,+\,(-2 \, q4^2\,-\,2) \, ln(q1\,+\,q4)\,-\,q1\, (q4^2\,+\,1)\,(q1^2+3)\,arctan(q4)\,-\,(q1^2\,+\,1)\,(q1\,q4\,+\,1))}{((q1^2\,+\,1)^2\,(q4^2\,+\,1))}

Maple says:

x.png

Maple 2017, Maple 7 and Maple 9 all appear to yield the same answer, if you use the commands shown.

The Maple command in Mathematica would be the following, which also works:

Integrate[1/((q4^2 + 1)^2*(q1 + q4)^2), q1, q4]
(*
-(1/(2 (1 + q1^2)^2 (1 + q4^2)))(1 + q1^2 + q1 q4 + q1^3 q4 + 
   q1 (3 + q1^2) (1 + q4^2) ArcTan[q4] + 2 (1 + q4^2) Log[q1 + q4] - 
   Log[1 + q4^2] - q4^2 Log[1 + q4^2])
*)

On the other hand, your example

NIntegrate[1/((2 + p4)^2*(1 + p4^2)^2), {p4, -Infinity, Infinity}]

gives an error that suggests to me it doesn’t think it’s found the right answer (“NIntegrate::ncvb: NIntegrate failed to converge…”).

I think that @Mariusz Iwaniuk gave you the right answer (thrice!): that integral doesn’t converge over -\infty to \infty. Taking the example where p1 = 2, there is the following plot of the integrand:

Plot[1/((2 + p4)^2*(1 + p4^2)^2), {p4, -3, 3}, PlotRange → {All, {0, 2}}]

So we see that the integrand (speaking loosely) goes off to infinity at p4 = -2. If we break the integral into two parts where we come close to -2 but not include -2, we have the “upper” and “lower” integrals:

upper = FullSimplify[Integrate[1/((2 + p4)^2*(1 + p4^2)^2), {p4, -2 + 1/10^k, \[Infinity]}, Assumptions -> k > 1]]
lower = FullSimplify[Integrate[1/((2 + p4)^2*(1 + p4^2)^2), {p4, -\[Infinity], -2 - 1/10^k}, Assumptions -> k > 1]]
\frac{1}{500} \left(2 \left(-\frac{7\ 10^k+2}{-2^{k+2} 5^k+4^k 5^{2 k+1}+1}+10^{k+1}+16 k \log (10)+2\right)+16 \log \left(-2^{2-k} 5^{-k}+10^{-2 k}+5\right)+74 \tan ^{-1}\left(2-10^{-k}\right)+37 \pi \right)
\frac{1}{500} \left(2 \left(\frac{2-7\ 10^k}{2^{k+2} 5^k+4^k 5^{2 k+1}+1}+10^{k+1}-16 k \log (10)-2\right)-16 \log \left(2^{2-k} 5^{-k}+10^{-2 k}+5\right)-74 \tan ^{-1}\left(10^{-k}+2\right)+37 \pi \right)

If we let k = 8 then we have

N[upper /. k -> 8]
(* 4.`*^6 *)
N[lower /. k -> 8]
(* 4.`*^6 *)

And for k > 7 we have both upper and lower being approximately 4 * 10^(k-2). The limit as k\rightarrow \infty is \infty for both upper and lower.

Thanks for your reply Jim Baldwin.
Not that for the function 1/x, at x=0, the plot of the function would show that the value of 1/x goes to infinity when approached from both sides. That does not imply that the function 1/x is not integrable!! Similarly, it was pointed out in one of the posts that there is a singularity at p1==-p4, as reflected in your plot (where p1=2).

Your understanding of Jim Baldwin’s argument appears to be incomplete. His argument is taken directly from the definition of an improper integral, and the plot was merely for illustrative purposes and is not central to the argument. The argument shows your integral diverges to positive infinity.

In first-year calculus, it is shown that the integral of a function over an interval containing a pole of order p \ge 1 diverges. Your function has a pole of order 2 at p4 == -p2. Hence it diverges.

Even if you were to consider the Cauchy principal value, your function is positive. Hence the integral diverges to +\infty.