Re: Re: Calculating Sums Of Roots For Trans. Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg5583] Re: [mg5536] Re: [mg5498] Calculating Sums Of Roots For Trans. Functions
- From: fransm at win.tue.nl (Frans Martens)
- Date: Fri, 27 Dec 1996 01:58:58 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Allan Hayes gave an answer on the question "How do i calculate the first n roots of tan(z) = -z, and then sum them in one command?" of Frank Stagnitti. The answer was the program Sum[ z/.FindRoot[Tan[z] == -z, {z,Pi/2 + n Pi + .02/(n+1)}, MaxIterations ->50 ], {n,0,49} ] Since tan(z) + z is not defined for pi/2 + n*Pi and the derivative of tan(z) + z will become very large in z equal to the zero close to pi/2 + n*pi for greater values of n, it is better to rewrite the equation tan(z) = - z. Two suggestions: Sum[ z/.FindRoot[Sin[z] == -z*Cos[z], {z,Pi/2 + n Pi} ], {n,0,49} ] Sum[ z/.FindRoot[z + n*Pi == ArcTan[-z], {z,Pi/2 + n Pi + .02/(n+1)}, MaxIterations ->50 ], {n,1,50} ] Frans Martens Eindhoven The Netherlands