       Re: Help with find root needed

• To: mathgroup at smc.vnet.net
• Subject: [mg88968] Re: [mg88910] Help with find root needed
• From: "W_Craig Carter" <ccarter at mit.edu>
• Date: Thu, 22 May 2008 02:39:13 -0400 (EDT)
• References: <200805211849.OAA10350@smc.vnet.net>

```Hello Aaron,
The singularity appears to be only a function of gamma; so its
position can be precalculated. Perhaps, this will work for you:

Kother[h_, \[Gamma]_] :=
z /. Module[{singularity = Re[ Sqrt[\[Gamma]^2 - 1]]},
FindRoot[
f[z, h, \[Gamma]] == 0, {z,
singularity + \$MachineEpsilon, \$MaxMachineNumber }]]

(*for example*)

Kother[1, 2]

(*returns 2.00483*)

I haven't tested it for the the full range of parameters
On Wed, May 21, 2008 at 2:49 PM, Aaron Fude <aaronfude at gmail.com> wrote:
> Hi,
>
> In what follows, I'm looking for the largest root of a function, that
> is also a function of two parameters. The Manipulate command shows me
> that the root is consistently there (albeit near a singularity which
> might be what's causing problems). However, FindRoot doesn't find it
> as the plot shows. I get one error, but my guess is that it's
> referring to one particular point on the plot.
>
> f[z_, h_, \[Gamma]_] :=
>  Tanh[h*z] + (\[Gamma]^2 + 1 - z^2)/(\[Gamma]^2 - 1 - z^2) *
>    z/\[Gamma];
> Manipulate[
>  Plot[f[z, h, \[Gamma]], {z, 0, 10}], {h, .1, 10}, {\[Gamma], .1,
>  10}]
> K[h_, \[Gamma]_] :=
>  z /. FindRoot[f[z, h, \[Gamma]] == 0, {z, 10, 1, 10}];
> Plot3D[K[h, \[Gamma]], {h, .1, 10}, {\[Gamma], .1, 10}]
>
>
> Aaron
>
>

--
W. Craig Carter

```

• Prev by Date: Re: intersecting a hypercube and a hyperplane
• Next by Date: Re: Cannot NSolve a system of equations
• Previous by thread: Re: Help with find root needed
• Next by thread: Re: Help with find root needed