Re: Solving complex trigonometric equations

• To: mathgroup at smc.vnet.net
• Subject: [mg21003] Re: [mg20948] Solving complex trigonometric equations
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Thu, 2 Dec 1999 21:41:16 -0500 (EST)
• References: <199912010650.BAA07624@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Andrea Charleton wrote:
>
> Hi,
>
> using NSolve i can get 2 solutions for coshz = i.
>
> However is there a command that i can use to get all the solutions less than
> a particular absolute value.....i know there must be a way of finding it but
> i can't.
>
> thanx
>
> Andrea Charleton
>
> email: andreazc at bigfoot.com

I responded to a related question from last month. It may be found at
the URL:

http://library.wolfram.com/mathgroup/archives/wri-mathgroup/1999/Oct/msg00259.html

The methods therein (one of which I adapt below) rely on the fact that
the solutions are periodic and all can be generated from what is
returned by Solve.

bound = 20;
maxval = Max[Abs[z /.Solve[Cosh[z] == I, z]]];
newb = (bound+maxval)/(2*Pi);
gensol = z /.Solve[Cosh[z+2*I*Pi*kk] == I, z];

In[146]:= solns = Select[Union[Flatten[
Table[N[gensol], {kk,-newb,newb}]]], Abs[#]<=bound&]

Out[146]= {-0.881374 + 1.38082 I, -0.881374 - 4.90237 I,
-0.881374 + 7.66401 I, -0.881374 - 11.1856 I, -0.881374 + 13.9472 I,
-0.881374 - 17.4687 I, 0.881374 - 1.76077 I, 0.881374 + 4.52241 I,
0.881374 - 8.04396 I, 0.881374 + 10.8056 I, 0.881374 - 14.3271 I,
0.881374 + 17.0888 I}

More generally you may need to use FindRoot with many starting points in
your interval of interest. For reasonably well-behaved functions you
can  use contour integration to tell you how many solutions to expect,
as per the Cauchy formula. In this example:

z[t_] = bound*Exp[I*t];

In[148]:= Chop[NIntegrate[Evaluate[f'[z[t]]/(2*Pi*I*f[z[t]])*z'[t]],
{t,0,2*Pi}], 10^(-6)]

NIntegrate::slwcon:
Numerical integration converging too slowly; suspect one of the
following:
singularity, value of the integration being 0, oscillatory
integrand, or
insufficient WorkingPrecision. If your integrand is oscillatory try
using
the option Method->Oscillatory in NIntegrate.

NIntegrate::ncvb:
NIntegrate failed to converge to prescribed accuracy after 7
recursive bisections in t near t = 4.68785.

Out[148]= 12.

Ignoring the messages, this agrees with the length of solns as given
above, which is a useful independent check.

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Re: Abs[a] Sin[Abs[a]]
• Next by Date: Re: date/time ListPlot
• Previous by thread: Solving complex trigonometric equations
• Next by thread: Re: Solving complex trigonometric equations