How to calculate that integral without any error messages?

My attempts

 NIntegrate[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I), {w, -Infinity, Infinity},
WorkingPrecision -> 15, AccuracyGoal -> 3, PrecisionGoal -> 3]


and

NIntegrate[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I), {w, -Infinity, Infinity},
Method -> "ExtrapolatingOscillatory", WorkingPrecision -> 15, AccuracyGoal -> 3, PrecisionGoal -> 3]


and

NIntegrate[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I), {w, -Infinity, Infinity},
Method -> "GlobalAdaptive", WorkingPrecision -> 15, AccuracyGoal -> 3, PrecisionGoal -> 3]


perform

(*112.397602019569 - 0.0476573486479931 I*)


and the error communication

NIntegrate::ncvb:NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in w near {w}={169.666666666667}.NIntegrate obtained 112.397602019569-0.0476573486479931 I and 3.5357927689181715. for the integral and error estimates.

as a bonus.

In order to get rid of error messages, the Quiet command is not taken into account.

• Integrate  says, this integral does not converge. Commented Apr 22, 2020 at 12:13
• Most likely, you are using WorkingPrecision wrong. Why do you set the working precision to be 15? Commented Apr 22, 2020 at 12:21
• @Akku: Thank you. Can that statement be based? Every command has its limitations. Commented Apr 22, 2020 at 12:29
• @Anton Antonov: Can you kindly suggest a better option? Commented Apr 22, 2020 at 12:30
• @Akku 14: The command Integrate[ Evaluate[ComplexExpand[ Re[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I)]]], {w, -Infinity, Infinity}] is running for long time without any error communication. Commented Apr 22, 2020 at 13:02

First note that the result of the Integral must be real since

$$(\int_{-\infty}^{\infty} \frac{8^{2+i w}}{2+i w}\zeta (i w+2)^2 \, dw)^\ast = \int_{-\infty}^{\infty} \frac{8^{2-i w}}{2-i w}\zeta (-i w+2)^2 \, dw = \int_{-\infty}^{\infty} \frac{8^{2+i w'}}{2+i w'}\zeta (i w'+2)^2 \, dw'$$

where $$w' = -w$$. The integrand is highly oscillatory and decreases fast so there is not much to gain by specifying the limits at $$\infty$$. You can do it without errors by increasing the working precision and specifying a finite numerical integration limit as follow:

Int[W_] :=
NIntegrate[Re[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I)], {w, -W, W},
WorkingPrecision -> 30, AccuracyGoal -> 3, PrecisionGoal -> 3];
Table[{W, Int[W]}, {W, 0, 200, 10}]
ListLinePlot[%, Mesh -> Full, PlotRange -> Full]


which yields the following results without error messages

{{0, 0}, {10, 117.644687513319946046802879277}, {20,
114.575303504772377060321078067}, ...
113.956032525809081682569215295}, {180,
112.921219819275271019140358492}, {190,
112.131832550130353341971791461}, {200,
112.536621410476756643360381626}}


• Thank you for your work. This is not it. Commented Apr 22, 2020 at 12:22
• "the Integral must be real" - by this reasoning, it means that we can consider the integrand (32 (2^(-3 I w) (2 + I w) Zeta[2 - I w]^2 + 2^(3 I w) (2 - I w) Zeta[2 + I w]^2))/(4 + w^2). Commented Apr 22, 2020 at 12:26
• @J.M. : Thank you. Can you suggest what I should do next? Commented Apr 22, 2020 at 12:43
• @user, you haven't "based" your (implied) claim that this is a convergent integral, so I haven't done anything further. Commented Apr 22, 2020 at 12:47
• @Omrie Ovdat: Your statement "the result of the Integral must be real since... " assumes the integral is convergent (That may not be correct.) ot its principal value. Commented Apr 22, 2020 at 12:58

I find the answer on my own (It seems the integral of the real part of the integrand converges.)

NIntegrate[Evaluate[ComplexExpand[ Re[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I)]]],
{w, -Infinity,Infinity}, WorkingPrecision -> 15, AccuracyGoal -> 3, PrecisionGoal -> 3]
(*110.677985578146*)


NIntegrate[Evaluate[ComplexExpand[Im[Zeta[2 + w*I]^2*8^(2 + w*I)/(2 + w*I)]]],
`