2
$\begingroup$

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:

enter image description here

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

$\endgroup$
6
  • $\begingroup$ I get a nice plot with PlotPoints -> Automatic Imo it's not a good idea to use ` ClippingStyle -> None` here $\endgroup$
    – eldo
    Commented Nov 29, 2015 at 22:47
  • $\begingroup$ @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 $\endgroup$
    – Anixx
    Commented Nov 29, 2015 at 22:50
  • $\begingroup$ 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}] $\endgroup$
    – eldo
    Commented Nov 29, 2015 at 23:04
  • $\begingroup$ @eldo numerically it evaluates well. $\endgroup$
    – Anixx
    Commented Nov 29, 2015 at 23:34
  • $\begingroup$ No, it doesn't. Try Table[pw[b, p], {b, -3, 3, 1.}, {p, -3, 3, 1.}]. Error messages and indeterminate values! $\endgroup$
    – eldo
    Commented Nov 29, 2015 at 23:44

1 Answer 1

2
$\begingroup$
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}]

enter image description here

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}]

enter image description here

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.