Re: sorting list of roots af a transcendental function
- To: mathgroup at smc.vnet.net
- Subject: [mg65278] Re: [mg65260] sorting list of roots af a transcendental function
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 23 Mar 2006 06:58:46 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Try using Ted Ersek's RootSearch from MathSource.
Needs["Ersek`RootSearch`"]
func[a_] := Cot[x] == x/a - a/(4*x)
plotf[a_] := Cot[x] - (x/a - a/(4*x))
RootSearch[func[100], {x, 0.1, 50}]
{{x -> 3.0209}, {x -> 6.04265}, {x -> 9.06603}, {x -> 12.0918}, {x ->
15.1206}, {x -> 18.153}, {x -> 21.1895}, {x -> 24.2302}, {x ->
27.2756}, {x -> 30.3255}, {x -> 33.3802}, {x -> 36.4395}, {x ->
39.5034}, {x -> 42.5716}, {x -> 45.6441}, {x -> 48.7206}}
Plot[plotf[100], {x, 0.1, 50},
ImageSize -> 500]
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: Dule [mailto:dule23 at gmx.de]
To: mathgroup at smc.vnet.net
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!