# How can I plot this Hurwitz Zeta-based function at negative arguments?

Here is the code:

pw[y_, x_] := -HurwitzZeta[1 - x, 1/2 + y] x
Plot3D[pw[b, p], {b, -3, 3}, {p, -3, 3}, Mesh -> {6, 5},
ClippingStyle -> None,
PlotStyle -> Directive[Orange, Opacity[.8], Specularity[White, 20]],
PlotPoints -> 100, AxesLabel -> Automatic]


Here is what I get:

How can I plot this function at $b<-1$? Numerically it evaluates well.

• I get a nice plot with PlotPoints -> Automatic Imo it's not a good idea to use  ClippingStyle -> None here
– eldo
Nov 29, 2015 at 22:47
• @eldo I used the both of your pieces of advice, added PlotPoints -> Automatic and removed ClippingStyle -> None and still it cannot plot anything at b<-1 Nov 29, 2015 at 22:50
• b must be >= 0. With negative b-values there are branch cuts and singularities (see doc). You can plot f.e Plot3D[pw[b, p], {b, 0, 3}, {p, -6, 6}]
– eldo
Nov 29, 2015 at 23:04
• @eldo numerically it evaluates well. Nov 29, 2015 at 23:34
• No, it doesn't. Try Table[pw[b, p], {b, -3, 3, 1.}, {p, -3, 3, 1.}]. Error messages and indeterminate values!
– eldo
Nov 29, 2015 at 23:44

Clear@pw

pw[x_, y_] := -HurwitzZeta[1 - y, 1/2 + x] y


With negative x-values you get many complex numbers and indeterminate values. For example:

pw[-3., -2.5] // N


29.052 + 28.9903 I

pw[-3., 0.] // N


Indeterminate

Avoiding negative x-values gives the following plot

Plot3D[pw[x, y], {x, 0, 3}, {y, -3, 3}]


If you want to plot negative x-values you must skip the 0 by choosing a plot range of f.e. {-3.01, 3.01} and you can convert the complex numbers with Abs

Plot3D[Abs @ pw[b, p], {b, -3.01, 3.01}, {p, -3.01, 3.01}]


From the documentation:

Unlike Zeta, HurwitzZeta has singularities at a==-n for non-negative integers n ... HurwitzZeta has branch cut discontinuities in the complex a plane running from 0 to -Infinity.