Message Boards Message Boards

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

[✓] Using Solve to invert polar to cartesian

Posted 4 years ago

I realise that there are specific functions for this, but can anyone explain why Mathematica doesn't return the obvious solutions here:

Solve[ {x == r * Cos[theta], y == r* Sin[theta]}, {r, theta}]

I just get {{}}.

POSTED BY: William Stewart
2 Replies

Very interesting - i was using 11. I have 12 on another machine so will try - thanks.

POSTED BY: William Stewart

With version 12 I get a full, if complicated, solution:

In[1]:= Solve[{x == r*Cos[theta], y == r*Sin[theta]}, {r, theta}]

Out[1]= {{r -> -(x^2/Sqrt[x^2 + y^2]) - y^2/Sqrt[x^2 + y^2], 
  theta -> ConditionalExpression[
    ArcTan[-(x/Sqrt[x^2 + y^2]), -(y/Sqrt[x^2 + y^2])] + 2 \[Pi] C[1],
     C[1] \[Element] Integers]}, {r -> 
   x^2/Sqrt[x^2 + y^2] + y^2/Sqrt[x^2 + y^2], 
  theta -> ConditionalExpression[
    ArcTan[x/Sqrt[x^2 + y^2], y/Sqrt[x^2 + y^2]] + 2 \[Pi] C[1], 
    C[1] \[Element] Integers]}}
POSTED BY: Gianluca Gorni
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