# How to numerically verify that principal value?

Mathematica finds

Integrate[Exp[I*s]/(1 + s/(s^2 - 1)^2), {s, -Infinity, Infinity}, PrincipalValue -> True] // ToRadicals
(*A huge closed-form expression which is omitted here.*)
N[%]
(*-1.414 + 0.192275 I*)


The use of the principal value is grounded by the plots

Plot[{Cos[s]/(1 + s/(s^2 - 1)^2),Sin[s]/(1 + s/(s^2 - 1)^2)},{s,-5,5},WorkingPrecision->30,PlotPoints -> 50]


It's clear that the integrand has its real singularities at the real roots of the denominator, so

sol = Reduce[1 + s/(s^2 - 1)^2 == 0, s, Reals] // ToRadicals;
sol[[1]][[2]]
(*-(1/(2 Sqrt[3/(4 + (155/2 - (3 Sqrt[849])/2)^(1/3) + (1/2 (155 + 3 Sqrt[849]))^(1/3))]))
-  1/2 Sqrt[8/3 - 1/3 (155/2 - (3 Sqrt[849])/2)^(1/3) -  1/3 (1/2 (155 + 3 Sqrt[849]))^(1/3) +
2 Sqrt[3/( 4 + (155/2 - (3 Sqrt[849])/2)^(1/3) + (1/2 (155 + 3 Sqrt[849]))^(  1/3))]]*)
N[%]
(*-1.49022*)
sol[[2]][[2]]
(*-(1/(2 Sqrt[3/(4 + (155/2 - (3 Sqrt[849])/2)^(1/3) + (1/2 (155 + 3 Sqrt[849]))^(1/3))])) +
1/2 Sqrt[8/3 - 1/3 (155/2 - (3 Sqrt[849])/2)^(1/3) -
1/3 (1/2 (155 + 3 Sqrt[849]))^(1/3) + 2 Sqrt[3/( 4 + (155/2 - (3 Sqrt[849])/2)^(1/3)+(1/2 (155 + 3 Sqrt[849]))^( 1/3))]]*)


However, I have doubts concerning the obtained principal value because the integrand asymptotically equals $$\exp(is)$$ as $$s\to \infty$$ and $$s\to -\infty$$ and $$PV\int_{-\infty}^\infty \exp(is)\,ds$$ does not exist.

In view of it I try to verify it numerically through

NIntegrate[Exp[I*s]/(1+s/(s^2-1)^2),{s,-Infinity,
-(1/(2 Sqrt[3/(4+(155/2-(3 Sqrt[849])/2)^(1/3)+(1/2 (155+3 Sqrt[849]))^(1/3))]))-
1/2 Sqrt[8/3-1/3 (155/2-(3 Sqrt[849])/2)^(1/3)-1/3 (1/2 (155+3 Sqrt[849]))^(1/3)+
2 Sqrt[3/(4+(155/2-(3 Sqrt[849])/2)^(1/3)+(1/2 (155+3 Sqrt[849]))^(1/3))]],
-(1/(2 Sqrt[3/(4+(155/2-(3 Sqrt[849])/2)^(1/3)+(1/2 (155+3 Sqrt[849]))^(1/3))]))+
1/2 Sqrt[8/3-1/3 (155/2-(3 Sqrt[849])/2)^(1/3)-1/3 (1/2 (155+3 Sqrt[849]))^(1/3)+
2 Sqrt[3/(4+(155/2-(3 Sqrt[849])/2)^(1/3)+(1/2 (155+3 Sqrt[849]))^(1/3))]],Infinity},
Method->"PrincipalValue",AccuracyGoal->3,PrecisionGoal->3,WorkingPrecision->50]


which results in the error message

NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in s near {s} = {3.7749613270651398879039428756113970426387939277790*10^28}. NIntegrate obtained 8.8211977939280824575415993952100374290963331174834*10^47 I and 9.194032783290130686998715991388359408878977362628350.*^47 for the integral and error estimates.

and

 (*-2.6098684408162971553635553440779848277629513026488*10^49 +
8.8211977939280824575415993952100374290963331174789*10^47 I*)


Constructive suggestions are welcome.

Addition. @b.gates.you.know.what in her/his answer suggests to use FourierTransform to this end. This is not it. Here is an example:

Limit[Integrate[Exp[I*t], {t, -a, a}], a -> Infinity]
(*Indeterminate*)


but

FourierTransform[1, y, t] /. t -> 1

(*0*)


-

• Maple 2020 give me a symbolic solution or using numerics: -0.998307 - 0.313707 I.Using FourierTransform in Mathematica 12.1- FourierTransform[1/(1 + s/(s^2 - 1)^2), s, t, FourierParameters -> {1, -1}] /. t -> -1 // ToRadicals give me also the same output:-0.998307 - 0.313707 I.Probably looks like a bug in MMA? Jun 12, 2020 at 9:30
• @Mariusz Iwaniuk: Thank you for your reply. However, neither Maple 2020 nor FourierTransform are reliable in this field. BTW, why t->-1? Jun 12, 2020 at 9:36
• @Mariusz Iwaniuk:Also the multiplier $\sqrt{2\pi}$ in FourierTransform should be taken into account. Jun 12, 2020 at 9:46
• Oh yes it should be: t=1,but in this case imaginary part is positive.That is strange in Maple is negative.I am confused. Jun 12, 2020 at 9:47

As noted by the user Mariusz Iwaniuk one could use:

den[s_] = 1 + s/(s^2 - 1)^2;
f[s_] = Exp[I s] / den[s];
integ = Sqrt[2 Pi] Limit[FourierTransform[1/den[s], s, k], k -> 1];
integ // N
(* -0.998307 - 0.313707 I *)


As a check one could try using residues:

zeros = Solve[den[s] == 0 + I 0, s];
residues = Residue[f[s], {s, #}] & /@ zeros[[All, 1, 2]];

2 Pi I (1/2 residues[[1]] + 1/2 residues[[2]] + residues[[4]]) // N
(* -0.998307 - 0.313707 I *)

• Thank you for your work. BTW, your f[s] is not defined at all. Do I correctly understand that you suggest a different approach to the integral under consideration? Jun 12, 2020 at 10:06
• @user64494 Added the missing definition, thank you. I was just trying to understand how the result via Fourier transform might be obtained. Jun 12, 2020 at 10:15
• I changed my mind and deleted -1. You wrote " I was just trying to understand how the result via Fourier transform might be obtained.". BTW, how can your result be confirmed by numeric integration? Jun 12, 2020 at 10:19
• I changed my mind again. The question is whether does this Fourier transform exist at all? It certainly does not exist in classical sense since the integrand is not absolutely integrable over the reals. Of course, one may formally count residues, but does it make any sense? Jun 12, 2020 at 10:35
• Here is a simpler version of the problem: Limit[Integrate[Exp[I*t], {t, -a, a}], a -> Infinity] in undeterminated, but FourierTransform[1, y, t] /. t -> 1 produces 0. Jun 12, 2020 at 10:47

Following the advice by @b3m2a1, I present my answer. Let us substract Exp[I*s] from the integrand. Then

a = Integrate[Exp[I*s]/(1 + s/(s^2 - 1)^2) - Exp[I*s], {s, -Infinity, Infinity},
N[a,30]
(*-1.41400018802696985500835186883 + 0.19227531358741820427339218093 I*)


is in discordance with

NIntegrate[Exp[I*s]/(1 + s/(s^2 - 1)^2) - Exp[I*s],{s, -Infinity,
-(1/(2 Sqrt[3/( 4 + (155/2 - (3 Sqrt[849])/2)^(1/3) + (1/2 (155 + 3 Sqrt[849]))^(1/3))])) -
1/2 \[Sqrt](8/3 - 1/3 (155/2 - (3 Sqrt[849])/2)^(1/3) -
1/3 (1/2 (155 + 3 Sqrt[849]))^(1/3) +
2 Sqrt[3/(      4 + (155/2 - (3 Sqrt[849])/2)^(
1/3) + (1/2 (155 + 3 Sqrt[849]))^(1/3))]),
-(1/(2 Sqrt[3/(   4 + (155/2 - (3 Sqrt[849])/2)^(1/3) + (1/2 (155 + 3 Sqrt[849]))^(
1/3))])) + 1/2 \[Sqrt](8/3 - 1/3 (155/2 - (3 Sqrt[849])/2)^(1/3) -
1/3 (1/2 (155 + 3 Sqrt[849]))^(1/3) +
2 Sqrt[3/(4 + (155/2 - (3 Sqrt[849])/2)^(
1/3) + (1/2 (155 + 3 Sqrt[849]))^(1/3))]),Infinity},
Method -> "PrincipalValue", WorkingPrecision -> 40, AccuracyGoal -> 7, PrecisionGoal -> 7]
(*-0.9983073697207267431817361195580732660872 - .313706787296245329692113892146598026371 I*)


Therefore, at least one of the above results in not correct. However, the latter result is in accordance with the modified approach by @b.gates.you.know.what :

den[s_] = 1 + s/(s^2 - 1)^2;
f[s_] = Exp[I s]/den[s] - Exp[I*s];
integ = Sqrt[2 Pi] Limit[FourierTransform[1/den[s] - 1, s, k], k -> 1];
integ // N
(*-0.998307 - 0.313707 I*)


The above result can be grounded by the calculation with the residues (Here the Jordan's lemma is applicable: pay your attention to -Exp[I*s] in the definition of f[s_].).

Conclusion: (i) Because $$PV\int_{-\infty}^\infty \exp(is)\,ds$$ does not exist, the principal value of the integral under consideration in the question does not exist too. (ii) The symbolic result produced by the Integrate command with the PrincipalValue->True` option is not correct.