Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Find many Roots

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32103] Re: Find many Roots
  • From: Tom Burton <tburton at cts.com>
  • Date: Mon, 24 Dec 2001 23:44:34 -0500 (EST)
  • References: <a06p90$fb1$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello,

On Mon, 24 Dec 2001 08:33:36 +0000 (UTC), in comp.soft-sys.math.mathematica you wrote:

>Tan[x]==1/x, {x,0,12}]

For this particular problem, I would select:

Step 1: Find the approximate roots visually:

p1 = Plot[Tan[x]-1/x, {x,0,12}, PlotRange -> {-1,1}];

approx = {1, 3, 6, 10};

Step 2: Refine these approximations:

answers = FindRoot[Tan[x] == 1/x, {x,#}] & /@ approx

Step 3: Verify solutions

(Tan[x] - 1/x) /. answers

Step 4: Check for missing solutions

Show[ p1, Graphics[{Hue[0], PointSize[0.03], Point[{x,0}] /. answers}] ]

I higly recommend a visual method, but iff you need a more automated method, I would suggest something like

answers = FindRoot[Tan[x] == 1/x, {x,#}] & /@ Range[1,12]

xx = Select[
         Union[ x /. answers, SameTest -> (Abs[#1-#2]<10^-6 &) ],
         0 <= # <= 12 &]

Tom Burton


  • Prev by Date: remicing the mesh in ParamtericPlot3D
  • Next by Date: Re: Find many Roots
  • Previous by thread: Find many Roots
  • Next by thread: Re: Find many Roots