Message Boards Message Boards

0
|
6471 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

[?] Simplify this general rectangular equation?

Posted 7 years ago

I trying to make a general rectangular equation in (x,y) into a polar equation in (r,theta). ReplaceAll[] gets the first part of the job done (i.e. replacing X and Y.

But I cannot figure out how to make Mathematica simplify the result. I have tried the following so far:

Simplify[]
FullSimplify[]
ToPolarCoordinates[]
TrigReduce[]
Factor[]
Collect[]

I need an equation like r=[yada][yada] that I want to feed to PolarPlot[].

The sample I have been testing on looks like this:

y=3x+2 ===> r=2/(Sin[theta]-3Cos[theta])

This works:

ReplaceAll[
 y == 3 x + 2 , {x :>  r Cos[\[Theta]], y :>  r Sin[\[Theta]]}]

which emits:

r Sin[\[Theta]] == 2 + 3 r Cos[\[Theta]]

I cannot figure out how to automatically perform the remaining simplification.

Any/all help is greatly appreciated.

Regards..

POSTED BY: Aeyoss Antelope
2 Replies
Posted 7 years ago

Perhaps

Solve[ReplaceAll[y==3 x+2, {x :> r Cos[?], y :> r Sin[?]}], r][[1, 1]] /. Rule[p_, q_] -> Equal[p, q]

But I am not certain that is always going to provide the result in the form you want.

POSTED BY: Bill Simpson

Thank you Bill...

Indeed after running the command you suggested, PolarPlot[] likes %[[2]].

POSTED BY: Aeyoss Antelope
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