Message Boards Message Boards

0
|
8015 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
Share this post:

FindRoot and two Parametric Functions

Posted 10 years ago

I am trying to find the three intersection points of r1[t] = {2 Cos[t], 2 Sin[t]} and r2[t] = {3 Cos[t], Sin[t] - 1} using FindRoot but keep getting various error messages no matter what I do. Any help is appreciated. Also, I would like to designate them both as the same variable but give them different colors using PlotStyle. Currently I am only able to do so by designating them as two separate variables. I am new to mathematica so please be as basic as possible. Code is attached.

Attachments:
POSTED BY: Derek Smith
5 Replies

The value of t in r1 is not the same as the value of t in r2 when the curves intersect. Here's one way to find the intersections:

In[1]:= r1[t_] = {2 Cos[t], 2 Sin[t]};

In[2]:= r2[t_] = {3 Cos[t], Sin[t] - 1};

In[17]:= r = 
 Reduce[{r1[t1] == r2[t2], 0 <= t1 <= 2 \[Pi], 
   0 <= t2 <= 2 \[Pi]}, {t1, t2}]

Out[17]= (t1 == (3 \[Pi])/2 && 
   t2 == (3 \[Pi])/2) || (t1 == 2 \[Pi] - 2 ArcTan[8 - 3 Sqrt[7]] && 
   t2 == 2 ArcTan[(-53 + 20 Sqrt[7])/(3 (-8 + 3 Sqrt[7]))]) || (t1 == 
    2 \[Pi] - 2 ArcTan[8 + 3 Sqrt[7]] && 
   t2 == 2 ArcTan[(53 + 20 Sqrt[7])/(3 (8 + 3 Sqrt[7]))])

In[23]:= r1[t1] /. {ToRules[r]}

Out[23]= {{0, -2}, {2 Cos[2 ArcTan[8 - 3 Sqrt[7]]], -2 Sin[
    2 ArcTan[8 - 3 Sqrt[7]]]}, {2 Cos[
    2 ArcTan[8 + 3 Sqrt[7]]], -2 Sin[2 ArcTan[8 + 3 Sqrt[7]]]}}

In[24]:= N[%]

Out[24]= {{0., -2.}, {1.98431, -0.25}, {-1.98431, -0.25}}
POSTED BY: Frank Kampas
Posted 10 years ago
POSTED BY: David Keith
Posted 10 years ago

Apparently neither one of us has much to do on a Friday night. ;-)

POSTED BY: David Keith

I suppose we're confirming the stereotypes put forth on "The Big Bang Theory" about physicists.

POSTED BY: Frank Kampas
Posted 10 years ago

Thanks guys!

POSTED BY: Derek Smith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract