# Possible bug in asymptotic expansion of CoshIntegral and SinhIntegral at infinity

Edit
Thanks to all contributors. I have filed a bug report under the ID [CASE:4876478]

Original OP

Consider this expansion

Series[CoshIntegral[z], {z, \[Infinity], 0}, Assumptions -> z > 0]// Normal


(* -((I [Pi])/2) + Cosh[z]/z^2 + Sinh[z]/z *)

Here a spurious imaginary part appears. The same goes for SinhIntegral.

A numerical comparision yields

{CoshIntegral[z], -((I \[Pi])/2) + Cosh[z]/z^2 + Sinh[z]/
z} /. z -> 100.


(* {1.3577810^41, 1.357510^41 - 1.5708 I} *)

The real parts almost coincide.

I would consider this as a bug. What is your opinion?

• Thanks for your comment. Your sentence "This is a weakness, not a bug." is nice and worth remembering. But seriously, I would accept the appearance of a spurious imaginary part when the funcion has a branch cut. But this is not the case here, as the dcumentaiton reads "SinhIntegral[z] is an entire function of z with no branch cut discontinuities. " Nov 14 '21 at 17:41
• I changed my mind and deleted my comment. Nov 14 '21 at 17:44
• @chris Thank you for editing my question. I was absent here for too long obviously, and have forgotten how to write source code. Nov 14 '21 at 17:53
• The same issue with AsymptoticIntegrate[(Cosh[t] - 1)/t, {t, 0, z}, {z, Infinity, 1}] which outputs 1/2 (-2 EulerGamma - I \[Pi] - 2 Log[z]) + Sinh[z]/z. Nov 14 '21 at 18:31
• @Dr.WolfgangHintze, my answer does not give a consistent explanation for SinhIntegral. It was just a trial for discussion. I deleted it. Nov 16 '21 at 11:11

Re-expressing CoshIntegral[] in terms of ExpIntegralEi[] seems to give a better result:

Series[(ExpIntegralEi[-z] + ExpIntegralEi[z])/ 2 +
(Log[-(1/z)] + Log[1/z] - Log[-z] + 3 Log[z])/ 4, {z, Infinity, 2},
Assumptions -> z > 0] // Normal // FullSimplify
(Cosh[z] + z Sinh[z])/z^2


but this should definitely be reported to Support.

• J. M., Thank you. See my EDIT. Dec 11 '21 at 22:16

Asymptotic gives you the expected answer

Asymptotic[CoshIntegral[z], {z, Infinity, 1}]
(*Sinh[z]/z*)


The Series-result might get more understandable if you try

zw = Series[CoshIntegral[z]/(Sinh[z]/z),{z, Infinity, 1}] // Normal
(*1 + Coth[z]/z - 1/2 I \[Pi] z Csch[z]*)


Here the additional terms vanish as z->Infinity

Limit[{Coth[z]/z ,- 1/2 I \[Pi] z Csch[z]},z->Infinity}]
(*0,0*)


Hope it helps!

• Unfortunately, Asymptotic[CoshIntegral[z], {z, Infinity, 2}] results in -((I \[Pi])/2) + Cosh[z]/z^2 + Sinh[z]/z. Nov 14 '21 at 18:08
• And still the asymptotic expansion is dominated by the leading term Sinh[z]/z! Nov 14 '21 at 18:20
• Did you read the first comment to the question? For your convenience, I quote it "I would accept the appearance of a spurious imaginary part when the funcion has a branch cut. But this is not the case here, as the documentaiton reads "SinhIntegral[z] is an entire function of z with no branch cut discontinuities"". Nov 14 '21 at 18:23

Let me give my observations for discussion.

I think, Series first tries to give a general solution for complex z ==x + I y and takes limit y-> 0. But nevertheless there seems to be a bug, because it does not handle the branch cut in imaginary area correct.

The -I Pi/2 arises from CoshIntegral[-I Infinity] . Plot shows th branch cut.

Plot3D[Im[CoshIntegral[x + I y]], {x, 20, 50}, {y, -.1, .1}]

{ser = Series[CoshIntegral[x + I y], {x, Infinity, 0},
Assumptions -> x > 0 && y < 0], ser // Normal,
Limit[ser, y -> 0, Direction -> -1, Assumptions -> x > 0],
Limit[ser, y -> 0, Direction -> 1, Assumptions -> x > 0]}

(*   {(-I)*(Pi*Floor[Arg[-2*I*x*y + y^2]/(2*Pi)] +
Cosh[x + I*y]*SeriesData[x, Infinity, {I}, 2, 3,
1] + SeriesData[x, Infinity, {Pi/2}, 0, 1, 1] +
SeriesData[x, Infinity, {I}, 1, 2, 1]*
Sinh[x + I*y]),
(-I)*(Pi/2 + (I*Cosh[x + I*y])/x^2 +
Pi*Floor[Arg[-2*I*x*y + y^2]/(2*Pi)] +
(I*Sinh[x + I*y])/x), (I*Pi)/2 + Cosh[x]/x^2 +
Sinh[x]/x, -((I*Pi)/2) + Cosh[x]/x^2 + Sinh[x]/x}   *)


The term Floor[Arg[-2 I x y + y^2]/(2 \[Pi])] seems wrong. Substitute it by (Floor[Arg[-2 I x y + y^2]/(2 \[Pi])] - Ceiling[Arg[-2 I x y + y^2]/(2 \[Pi])])/2 to get real result.

 ser = (-I)*(Pi*((Floor[Arg[-2*I*x*y + y^2]/(2*Pi)] -
Ceiling[Arg[-2*I*x*y + y^2]/(2*Pi)])/2) +
Cosh[x + I*y]*SeriesData[x, Infinity, {I}, 2, 3,
1] + SeriesData[x, Infinity, {Pi/2}, 0, 1, 1] +
SeriesData[x, Infinity, {I}, 1, 2, 1]*
Sinh[x + I*y]);

{ser // Normal,
Limit[ser, y -> 0, Direction -> -1, Assumptions -> x > 0],
Limit[ser, y -> 0, Direction -> 1, Assumptions -> x > 0]} // Expand

(*   {-((I \[Pi])/2) + 1/2 I \[Pi] Ceiling[Arg[-2 I x y +  y^2]/(2 \[Pi])] +
Cosh[x + I y]/x^2 -
1/2 I \[Pi] Floor[Arg[-2 I x y + y^2]/(2 \[Pi])] + Sinh[x + I y]/x,
Cosh[x]/x^2 + Sinh[x]/x, Cosh[x]/x^2 + Sinh[x]/x}   *)

• @ Akku14 Thank you for your very interesting study. While looking for the onset of the branch cut in CoshIntegral (chi) I found out that according to the documentation this function has a logarithmic branch point at z=0 but that SinhIntegral (shi) has no branch cut at all. Hence the asymptotic expansion of chi and shi might well be different with respect to a spurious imaginary part. Nov 15 '21 at 23:29
• @ Akku14 How would your analysis look like for SinhIntegral which has no branch cut? Nov 16 '21 at 10:20
• For SinhIntegral substitution with (Floor[Arg[-2 I x y + y^2]/(2 \[Pi])] - Ceiling[Arg[-2 I x y + y^2]/(2 \[Pi])])/2  doesn't work to eliminate the constant term Pi/2. Seems not to be the right explanation. Have no further ideas. Nov 16 '21 at 11:28