Re: sorting list of roots af a transcendental function

*To*: mathgroup at smc.vnet.net*Subject*: [mg65262] Re: sorting list of roots af a transcendental function*From*: Roger Bagula <rlbagulatftn at yahoo.com>*Date*: Thu, 23 Mar 2006 06:58:20 -0500 (EST)*References*: <dvrcdq$a6i$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

This expant CoTangent as a polynomial to 50 powers: Normal[Series[Cot[x], {x, 0, 50}]] This converts them to normal input form and will give numerical solutions: Table[x /. NSolve[Normal[Series[Cot[ x], {x, 0, 50}]] - ( x/a - a/(4*x)) == 0, x][[i]], {i, 1, 50}] Unless you want to wait forever for your solutions I'd use 10 or 20 places which is usually enough for transcental functions as series. To drop the extra solutions that are the same use Union: Union[Table[x /. NSolve[Normal[Series[Cot[ x], {x, 0, 10}]] - ( x/a - a/(4*x)) == 0, x][[i]], {i, 1, 10}]] Dule wrote: > Dear group, > > for calculating a model i need values for x which are given by the > transcendental function Cot[x] == x/a - a/(4*x). a is a parameter 0<a<200. > i obtained the roots with Table and FindRoot: > Table[FindRoot[Cot[x] == x/a - a/(4*x), {x, i}], {i, 1, 50}]] > > I have two questions: > 1. Is there a better way to do this? > 2. How can i construct a list, where the values for x, which appear > multiple are dropped? > > Thanks! >