# Zeros of the Hankel function with complex parameter

I'm trying to find the zeros of the Hankel function (the first few will do) of the first kind $H^{(1)}_\nu(z) = J_\nu(z) + i Y_\nu(z)$ for complex argument $z$ but I'm not sure what is the best function for this in mathematica.

EDIT: Per suggestion I have tried to implement the function FindAllCrossings2D

Options[FindAllCrossings2D] =
Sort[Join[
Options[FindRoot], {MaxRecursion -> Automatic,
PerformanceGoal :> $PerformanceGoal, PlotPoints -> Automatic}]]; FindAllCrossings2D[funcs_, {x_, xmin_, xmax_}, {y_, ymin_, ymax_}, opts___] := Module[{contourData, seeds, tt, fy = Compile[{x, y}, Evaluate[funcs[[2]]]]}, contourData = Map[First, Cases[Normal[ ContourPlot[funcs[[1]], {x, xmin, xmax}, {y, ymin, ymax}, Contours -> {0}, ContourShading -> False, PlotRange -> {Full, Full, Automatic}, Evaluate[ Sequence @@ FilterRules[Join[{opts}, Options[FindAllCrossings2D]], DeleteCases[Options[ContourPlot], Method -> _]]]]], _Line, Infinity]]; seeds = Flatten[Map[#[[1 + Flatten[Position[ Rest[tt = Sign[Apply[fy, #, 2]]] Most[tt], -1]]]] &, contourData], 1]; If[seeds == {}, seeds, Select[Union[ Map[{x, y} /. FindRoot[{funcs[[1]] == 0, funcs[[2]] == 0}, {x, #[[1]]}, {y, #[[2]]}, Evaluate[ Sequence @@ FilterRules[Join[{opts}, Options[FindAllCrossings2D]], Options[FindRoot]]]] &, seeds]], (xmin < #[[1]] < xmax && ymin < #[[2]] < ymax) &]]] sols = FindAllCrossings2D[{Re[HankelH1[0, x + I y]], Im[HankelH1[0, x + I y]]}, {x, -2, 2}, {y, -2, 2}]  But I receive this error "FindRoot::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations." I also looked at the contour plot and we can clearly see nontrivial zeros periodically for z =$x + i y$and$x < 0$and$y < 0\$. I also attempted the get coordinate and then FindRoot[], but this failed to converge and appeared to be going away from the root.

• You might want to adapt the solution here or here. – J. M. will be back soon May 10 '17 at 23:40
• I tried this @J.M. and neither work, I will update with code I took from the first solution – Gregory May 11 '17 at 16:23

You can use Solve for this purpose, as long as you restrict the domain:

zeros = z /. Solve[HankelH1[0, z] == 0 && -10 < Re[z] < 10 && -10 < Im[z] < 10, z]


Solve::incs: Warning: Solve was unable to prove that the solution set found is complete.

{Root[{HankelH1[ 0, #1] &, -8.65370576584112448841350498548699240993120635923782334125675 - 0.34600819276767292735146122876446089332681742821336233794111 I}], Root[{HankelH1[ 0, #1] &, -5.519997520841832519785940731628753302839051099087900948702 - 0.345225028545679355074185641966127944569911027495087086248 I}], Root[{HankelH1[ 0, #1] &, -2.4040911771553443579757061017638843409511660145346662653424 - 0.3405021529561410696628419946032815758353900295131219830737 I}]}

Unfortunately, Solve doesn't always find the complete solution set. Let's check whether the above roots are actually zeros:

HankelH1[0, N[zeros, 100]]


{0.*10^-101 + 0.*10^-101 I, 0.*10^-98 + 0.*10^-98 I, 0.*10^-99 + 0.*10^-99 I}