Re: Re: Re: Solve or Reduce?

• To: mathgroup at smc.vnet.net
• Subject: [mg64449] Re: [mg64412] Re: [mg64398] Re: Solve or Reduce?
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Fri, 17 Feb 2006 04:12:12 -0500 (EST)
• References: <20060216171642.74864.qmail@web37011.mail.mud.yahoo.com>
• Sender: owner-wri-mathgroup at wolfram.com

Math Novice wrote:
> I tried to graph the angle of rotation, b, of the smaller circle as a
> function of the angle of rotation, a, of the larger circle. Consider
> that the points on the circumferences of the two circles are connected
> by a link of length 7 that can pivot at the two points on the
> circumferences and as the point (13,0) on the larger circle sweeps out
> an angle in the counterclockwise direction (starting from a=0 degrees)
> the point (13,7) on the smaller circle (that corresponds to b=0) will be
> forced to sweep out an angle in the counterclockwise direction.
>
> The relationship between the two points on the circumferences of the
> circles is given by
>
> (13 Cos[a]-(5+8 Cos[b]))^2+(13 Sin[a]-(7+8 Sin[b]))^2==49
>
> and this is the equation that I used to try to solve for b as a function
> of a. I didn't impose any restrictions on the solution in Mathematica
> only because I don't kno! w how but I am initially interested only in
> finding b as a function of a where both a and b are in the first
> quadrant. In the solutions I have tried, b increases as a increases up
> to ~ a= 32 degrees and then b starts to decrease when my measurements on
> the printouts of the graph of the two circles doesn't indicate any
> reason why b wouldn't still increase with a at that point. Any help you
> can give me would be appreciated.
>
> */Daniel Lichtblau <danl at wolfram.com>/* wrote:
>
> Geometrically, think of taking a circle of radius 7 centered at any
> given point in the first quadrant lying on your larger circle. It will
> intersect your smaller circle twice. If you restrict to solutions this
> intersection is also in the first quadrant then degrees (0.53 radians)
> is where you begin to have two such solutions; prior to that one
> intersection was in the fourth quadrant.
>
> Without having an idea of what exactly you! did to get solutions, or
> what restrictions you are using, it is not possible to say much more.
>
>
> Daniel Lichtblau
> Wolfram Research

I had a minor typo in that I omitted the degree amount. It was about
30.5. But this turns out to be irrelevant. What you are seeing is
parasite roots changing branches.

We start by evaluating with explicit values plugged in for a.

eqn = (13*Cos[a]-(5+8*Cos[b]))^2+(13*Sin[a]-(7+8*Sin[b]))^2==49;

Off[Solve::ifun]

In[5]:= b32 = N[b /. Solve[eqn /. a->32*Degree, b]]
Out[5]= {-1.02804, 0.991183}

In[6]:= b33 = N[b /. Solve[eqn /. a->33*Degree, b]]
Out[6]= {1.02843, -1.00123}

Notice that we obtain two solutions, of opposite sign, and both are
around 1 in magnitude. If instead we try to solve with symbolic a, and
later plug in a value, we get four solutions. For a given value of a two
of them will actually be parasites, but which two will depend on that
particular value.

To see that there are parasites lurking in the background even with
numeric values for a, and possibly recover the bad solution you saw, you
can do as below.

In[7]:= N[b /. Solve[eqn /. a->32*Degree, b, VerifySolutions->False]]
Out[7]= {-1.02804, 1.02804, -0.991183, 0.991183}

In[8]:= N[b /. Solve[eqn /. a->33*Degree, b, VerifySolutions->False]]
Out[8]= {-1.02843, 1.02843, -1.00123, 1.00123}

We see that the solutions come in opposite sign pairs and clearly at or
near b=1 and b=-1 we hit double roots where the parasite and correct
symbolic solutions get swapped. As you note, this occurs somewhere near
a=32 degrees. Also observe that one bad solution is negative (as is a
good solution), and the bad positive solution has b beginning to decrease.

It might be better just to solve for the {x,y} coordinates of the point
on the smaller circle that lie at distance 7 from the larger circle.
Then you can recover the angle b from the two argument form of ArcTan.
The advantage to this approach is that it creates no parasite solutions.

In[9]:= soln = Solve[{(x-13*Cos[a])^2+(y-13*Sin[a])^2==49,
(x-5)^2 + (y-7)^2==64}, {x,y}];

We check that there are in fact only two solutions.

In[10]:= Length[soln]
Out[10]= 2

We check a few values to see that the angle b is sensible.

In[11]:= Table[{a,ArcTan[x,y]/.soln}, {a,0.,Pi/2.,Pi/10.}]
Out[11]= {{0., {0.493941, -0.152101}},
{0.314159, {0.745182, -0.0964141}},
{0.628319, {1.04395, 0.067562}},
{0.942478, {1.44839, 0.430011}},
{1.25664, {0.839275, 1.82018}},
{1.5708, {1.14221, 1.9925}}}

Daniel Lichtblau
Wolfram Research

• Prev by Date: Re: Re: Formatted Output (Exporting Data)
• Next by Date: Re: How to hide mathematica code?
• Previous by thread: Re: Re: Re: Solve or Reduce?
• Next by thread: Polygons