Re: Convert function from polar to Cartesian

*To*: mathgroup at smc.vnet.net*Subject*: [mg112793] Re: Convert function from polar to Cartesian*From*: Bob Hanlon <hanlonr at cox.net>*Date*: Thu, 30 Sep 2010 04:54:06 -0400 (EDT)*Reply-to*: hanlonr at cox.net

$Version "7.0 for Mac OS X x86 (64-bit) (February 19, 2009)" fPolar[r_, a_] = r^2 Cos[2 a]; fCart[x_, y_] = fPolar[Sqrt[x^2 + y^2], ArcTan[x, y]]; fCart[x, y] // FullSimplify (x - y) (x + y) Bob Hanlon ---- Sam Takoy <sam.takoy at yahoo.com> wrote: ============= Hi, I've stumbled onto an unexpected problem. I have a function in polar coordinate and I need to convert it to Cartesian coordinates: fPolar[r_, a_] = r^2 Cos[2 a]; fCart[x_, y_] = fPolar[Sqrt[x^2 + y^2], ArcTan[x, y]]; fCart[x, y] I get: (x^2 + y^2) Cos[2 ArcTan[x, y]]. But how to get rid of the ArcTan[x, y]? I've tried this: fCart[x, y] // TrigExpand /. {Cos[ArcTan[x, y]] -> x/Sqrt[x^2 + y^2], Sin[ArcTan[x, y]] -> y/Sqrt[x^2 + y^2]} but it does not do the substitution I need it to do. So what's the proper way to get rid of the ArcTan[x, y] and for the simple example above, to obtain x^2 - y^2? Many thanks in advance, Sam