"start: "<>ToString@Chop[start[[1]]+I start[[2]]]<>
"\nfirst iterate: "<>ToString@Chop@First@sol<>
"\nvalue of first iterate: "<>ToString@Chop@Tan@First@sol<>
"\nlast iterate: "<>ToString@Chop@Last@sol<>
"\nvalue of last iterate: "<>ToString@Chop@Tan@Last@sol<>
"\nvalue: "<>ToString[value[[1]]+I value[[2]]],

I notice that value and value of last iterate are always identical in the real part and always different in the imaginary part (sometimes "extreme", like 3.9I vs. -2.7I). I can't see how I would be treating real and imaginary parts differently in my code. Is that a bug in FindRoot, or do I have a bug in my code?

  • if you see only a red dot in the middle it means that the FindRoot iteration got stuck (FindRoot::lstol). Can you help me get it unstuck and actually converge?
  • is there a way to give the 2dim sliders some GridLines too?

There is a bug in the imaginary part in the equation:

Tan@z-(value[[1]]+I start[[2]])

Change this and it will work, except when FindRoot does not converge.

| improve this answer | |
  • $\begingroup$ Duh! Thank you. $\endgroup$ – Andreas Lauschke Oct 14 '19 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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