# SeriesCoefficient is broken in Mathematica 11.1, but works in 11.0

Consider the following implementation of the complex square root:

f[z_]:=Sqrt[(z - I)/(z + I)]*(z + I);


This implementation has branch points at $\lambda=\pm i$ and a (vertical) branch cut connecting them.

Then

g[z_]:=Sinc[f[z]];


(recalling $\mathrm{sinc}(x)=\sin(x)/x$ ) has no branch cut and it is analytic on the entire complex plane, and admits power series expansions at $\lambda=\pm i$.

Indeed, using Mathematica 11.0.0 (Mac OS 10.10.5) gives:

Series[Sinc[f[z]], {z, I, 4}]


$1-\frac{1}{3} i (z-i)-\frac{1}{5} (z-i)^2+\frac{11}{315} i (z-i)^3+\frac{61 (z-i)^4}{5670}+O\left((z-i)^5\right)$

and

SeriesCoefficient[Sinc[f[z]], {z, I, 4}]


gives $\frac{61}{5670}$.

Now, using Mathematica 11.1.1 (both on Mac OS 10.12 Sierra and Linux Ubuntu 16 LTS)

Series[Sinc[f[z]], {z, I, 4}]


returns

Series[Sinc[f[z]], {z, I, 4}]


and

SeriesCoefficient[Sinc[f[z]], {z, I, 4}]


returns

SeriesCoefficient[Sinc[f[z]], {z, I, 4}].


So neither of these stock functions work in properly in Mathematica 11.1.1. Does anyone know what is going on? Will this be fixed? They worked properly even in Mathematica 9 and also in Mathematica 11.0.0

Besides any information, I'd also appreciate if anyone has a workaround for this.

• What is rhofun[z]? – m_goldberg Nov 18 '17 at 8:27
• @m_goldberg Sorry, f[z]. I updated the text. – bilman Nov 18 '17 at 8:42
• I have reported the lack of expansion as a bug. Per my response, the handling of the branch point will not go away, and I am not optimistic about getting a nicely simplified result for this case.. – Daniel Lichtblau Nov 21 '17 at 17:16

I think it's worth reporting this issue to support. A workaround is to use something like:

fSeries[e_, {z_,p_,n_}] := Series[
e /. z->z+p,
{z, 0, n}
] /. Verbatim[SeriesData][x_, 0, r__] :> SeriesData[x, p, r]


fSeries[Sinc[f[z]], {z, I, 4}] //TeXForm


$1-\frac{1}{3} i (z-i)-\frac{1}{5} (z-i)^2+\frac{11}{315} i (z-i)^3+\frac{61 (z-i)^4}{5670}+O\left((z-i)^5\right)$

It is a problematic result to be sure. In the version under development there is modest improvement to the Series, and no change of note for SeriesCoefficient. The underlying issue I think is an inability to deduce a needed simplification.

f[z_] := Sqrt[(z - I)/(z + I)]*(z + I);
v1 = Sinc[f[z]];
InputForm[v2 = Normal[Series[v1, {z, I, 4}]]]

(* Out//InputForm=
Sinc[I*Sqrt*Sqrt[-1 - I*z] + (Sqrt[-1 - I*z]*(-I + z))/(2*Sqrt) +
((I/16)*Sqrt[-1 - I*z]*(-I + z)^2)/Sqrt - (Sqrt[-1 - I*z]*(-I + z)^3)/
(64*Sqrt) - (((5*I)/1024)*Sqrt[-1 - I*z]*(-I + z)^4)/Sqrt] *)


The above is not exactly wrong but also not the desired bona fide SeriesData result. Numerically the evaluations work out though.

Transpose[Chop[v1/v2 /. z->I+.01*Exp[2*I*Pi*Range[0,7]/8]]

(* Out= {1., 1., 1., 1., 1., 1., 1., 1.} *)


If instead of using Sinc we have Sin then it becomes a different matter. Version 11.0 still delivers the "nice" form and the current version does not...

w1 = Sin[f[z]];

InputForm[w2 = Normal[Series[w1, {z, I, 4}]]]

(* Out//InputForm=
I*Sinh[Sqrt*Sqrt[-1 - I*z] - ((I/2)*Sqrt[-1 - I*z]*(-I + z))/Sqrt +
(Sqrt[-1 - I*z]*(-I + z)^2)/(16*Sqrt) +
((I/64)*Sqrt[-1 - I*z]*(-I + z)^3)/Sqrt - (5*Sqrt[-1 - I*z]*(-I + z)^4)/
(1024*Sqrt)] *)

Chop[w1/w2 /. z->I+.01*Exp[2*I*Pi*Range[0,7]/8]]

(* Out= {1., 1., 1., 1., 1., 1., 1., 1.} *)


...but versions 11.0 and prior simply got this wrong, due to branch point issues. That numerical check has some results being the negative of what they should be (result below is from 11.0).

(* Out= {1., 1., 1., 1., 1., -1., -1., 1.} *)


I'll give some thought into how to improve in the case where an improvement exists. I will say this does not look promising though.

You can try with:

Series[PowerExpand@g[z], {z, I, 4}]


$1-\frac{1}{3} i (z-i)-\frac{1}{5} (z-i)^2+\frac{11}{315} i (z-i)^3+\frac{61 (z-i)^4}{5670}+O\left((z-i)^5\right)$

and

SeriesCoefficients[PowerExpand@g[z], {z, I, 4}]

(* 61/5670 *)

• @billman Oh, I am working with 11.2 in macOS 10.13.1, maybe in your MMA ver still would not work with this, Just check – José Antonio Díaz Navas Nov 18 '17 at 14:31
• Yes, that won't work I'm afraid. Wolfram team reached me about this. Hopefully it gets fixed. I ended-up downgraded in all my 3 machines. – bilman Jan 3 '18 at 18:07