Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

Re: Using FindRoot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83465] Re: Using FindRoot
  • From: "David W.Cantrell" <DWCantrell at sigmaxi.net>
  • Date: Wed, 21 Nov 2007 02:48:44 -0500 (EST)
  • References: <fhu7qo$7dv$1@smc.vnet.net>

tdude <stiletto at bigfoot.com> wrote:
> I am trying to find the root of the following equation
> FindRoot[.15*[Pi]*(R^2)==(2*R^2*ArcCos[45.9/(2*R)])-(.5*45.9*Sqrt[4*R^2-4
> 5.9^2]),{R,.1}, MaxIterations->100000]

You've already gotten two good answers. But instead of graphing in order to
find a good initial value for R, one could just think about a geometric
interpretation of the problem:

The distance between the centers of two circles of radius R is 45.9. Find
R such that the area of the lens-shaped region intersection of the circles
is .15 times the area of one of the circles.

>From this interpretation, it's obvious that R must be greater than 45.9/2;
otherwise, the circles would not intersect at all.

And BTW, in this problem, the initial value for R can actually be much
greater than the root and FindRoot will still work fine. For example,

In[6]:= FindRoot[.15*Pi*R^2 == 2*R^2*ArcCos[45.9/(2*R)] -
.5*45.9*Sqrt[4*R^2 - 45.9^2], {R, 1000}]

Out[6]= {R -> 30.8774}

> When I try this with two other systems, both give me an answer of
> 30.8773686.
>
> However, with Mathematica, the answer I get appears to be a complex root,
> along with this message: FindRoot::lstol: The line search decreased the
> step size to within tolerance specified by AccuracyGoal and PrecisionGoal
> but was unable to find a sufficient decrease in the merit function.  You
> may need more than MachinePrecision digits of working precision to meet
> these tolerances. {R -> 20.1137- 4.87774*10^-14 \[ImaginaryI]}
>
> Why would the answer be a complex root when using Mathematica, yet real
> when using the other two packages?

You might be interested to know that your equation actually does have two
other complex roots:

In[7]:= FindRoot[.15*Pi*R^2 == 2*R^2*ArcCos[45.9/(2*R)] -
.5*45.9*Sqrt[4*R^2 - 45.9^2],{R, -10+14I}]

Out[7]= {R -> -9.73876 + 13.5078 I}

and its conjugate. But of course I doubt that those are what you wanted.

David


  • Prev by Date: Re: RandomChoice does not accept null weights
  • Next by Date: Re: Using FindRoot
  • Previous by thread: Re: Using FindRoot
  • Next by thread: Re: Using FindRoot