Re: Calculating Sums Of Roots For Trans. Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg5532] Re: [mg5498] Calculating Sums Of Roots For Trans. Functions
- From: "w.meeussen" <w.meeussen at solair4b.eunet.be>
- Date: Thu, 19 Dec 1996 01:02:31 -0500
- Sender: owner-wri-mathgroup at wolfram.com
At 19:26 14-12-96 -0500, you wrote: >Can anyone help? > >How do i calculate the first n roots of tan(z) = -z, and then sum them in >one command. > >I think i need the right combinations of Findroot, Table and N/Sum commands. > >Findroot and Table give me a non-unique and non-ordered set of roots e.g. > > RootTable = Table[{FindRoot[Tan[z]==-z, {z,i}, > MaxIterations ->50],i},{i,0,EndRange,Pi}] > // TableForm > > >In short, i'd like a procedure/command that essentially sums the first n >(unique and ordered) roots > of tan(z) = - z with no user intervention > > Any ideas?? > >thanks frank > >-------------------------------------------------------------------------- >Dr Frank Stagnitti >School of Computing and Mathematics, Deakin University, >P.O. Box 423, Warrnambool, Vic. 3280 AUSTRALIA >Email: frankst at deakin.edu.au >Voice: +61 (0)55 633 535 >WWW: http://www.cm.deakin.edu.au/~frankst > >"Imagination is more important than knowledge." (Albert Einstein) >-------------------------------------------------------------------------- > > > does this help (partially) to get you going ? EndRange=24 RootTable =Table[{i, FindRoot[Tan[z]==-z,{z, i Pi,(i-1/2)Pi,(i+1/2) Pi}, MaxIterations->50]},{i,1,EndRange,2}]//InputForm EndRange=24 RootTable =Table[{i, FindRoot[Tan[z]==-z,{z, i Pi,(i-1/2)Pi,(i+1/2) Pi}, MaxIterations->50]},{i,1,EndRange,2}]//InputForm 24 FindRoot::regex: Reached the point {4.71239} which is outside the region {{7.85398, 10.9956}}. FindRoot::regex: Reached the point {7.85398} which is outside the region {{14.1372, 17.2788}}. FindRoot::regex: Reached the point {10.9956} which is outside the region {{20.4204, 23.5619}}. General::stop: Further output of FindRoot::regex will be suppressed during this calculation. {{1, {z -> 2.028757838110434}}, {3, {z -> 4.71238898038469}}, {5, {z -> 7.853981633974483}}, {7, {z -> 10.99557428756428}}, {9, {z -> 14.13716694115407}}, {11, {z -> 17.27875959474386}}, {13, {z -> 20.42035224833366}}, {15, {z -> 23.56194490192345}}, {17, {z -> 26.70353755551325}}, {19, {z -> 29.84513020910304}}, {21, {z -> 32.98672286269283}}, {23, {z -> 36.12831551628262}}} Tan[z]+z/.#& /@(Flatten[Rest/@%])//InputForm {-(8.88178419700125*10^-16), 5.443926242794622*10^15, 3.266355745676778*10^15, 2.333111246911989*10^15, 1.814642080931553*10^15, -(9.06763539887886*10^14), -(1.020030638044137*10^15), -(1.165634202629249*10^15), -(1.359727569653867*10^15), -(1.631372458431061*10^15), -(2.038652160436455*10^15), 3.140058399004482*10^14} Wouter. Dr. Wouter L. J. MEEUSSEN w.meeussen at solair4b.eunet.be