0
$\begingroup$

For example, define

test[z_] := Cosh[0.5132928614530164 z] + 0.5934823341977118 Sinh[0.5132928614530164 z]

And

FindRoot[test[z], {z, 0.3 I}]

The reslut is {z -> -1.33067 + 9.1807 I} .

But if

FindRoot[test[z], {z, 0.5 I}]

The result is {z -> -1.33067 + 3.06023 I}

Why a larger start point in FindRoot gives a smaller root? (larger or smaller are both refer to the imaginary part)

How can I get the root with the minimum positive imaginary part? (Actually there are infinite roots for test[z] with different imaginary part.)

In this example, how can I make sure my result is 3.06023I? What if test[z] takes other forms and parameters?

$\endgroup$
5
$\begingroup$

To find an appropriate range we first try:

test[x_, y_] :=  Cosh[0.5132928614530164 (x + I y)] + 
                 0.5934823341977118 Sinh[0.5132928614530164 (x + I y)]

ContourPlot[Abs@test[x, y], {x, -6, 3}, {y, -10, 10}]

Mathematica graphics

and we see that the first minima is between I and 5 I

So we try next:

nm = NMinimize[{y, Abs@test[x, y] == 0 && y > 1}, {x, y}]
(* {3.06023, {x -> -1.33067, y -> 3.06023}} *)

Check:

Plot[Abs@test[x /. nm[[2]], y], {y, 2, 10}, AxesOrigin -> {0, 0}]

Mathematica graphics

$\endgroup$
  • 1
    $\begingroup$ That's supposed to be test[x + I y], right? (In which case, we replace Norm[] with Abs[].) $\endgroup$ – J. M. will be back soon Jun 2 '15 at 6:59
  • $\begingroup$ @Guesswhoitis. It was late at night, you know :) $\endgroup$ – Dr. belisarius Jun 2 '15 at 12:57
  • $\begingroup$ Excused. :D Previously I've also goofed by posting when I should be sleeping, too. $\endgroup$ – J. M. will be back soon Jun 2 '15 at 13:02

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.