MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Polar coordinates - ReplaceAll issue

  • To: mathgroup at
  • Subject: [mg107479] Polar coordinates - ReplaceAll issue
  • From: Andrej <andrej.kastrin at>
  • Date: Sun, 14 Feb 2010 05:58:09 -0500 (EST)


this is my first post to this group. Yes, I'm a newbie in Mathematica.
I'm trying to compute the probability of circular disc (in R^2).
Suppose that vertical and horizontal deviations from the center of the
disc follows bivariate normal distribution. I hope that the code below
is self explained. The main issue is the transformation from Cartesian
to polar coordinates as follows:

# First I set up the appropriate bivariate normal distribution:
X = {x1, x2};
mu = {0, 0};
Sigma = sigma^2 ({{1,rho}, {rho,1}});
dist = MultinormalDistribution[mu, Sigma];
cond = {sigma > 0, -1 < rho < 1, r > 0, 0 < theta < 2 \[Pi]};
f = Simplify[PDF[dist, X], cond]
domain[f] = {{x1, -\[Infinity], \[Infinity]}, {x2, -\[Infinity], \
[Infinity]}} && cond;

# Transformation to polar coordinates:
Omega = {x1 \[RightArrow] r Cos[theta], x2 \[RightArrow] r
g = Simplify[(f /. Omega) Jacob[X /. Omega, {r, theta}], cond]

And the message I get:

ReplaceAll::reps: {x1\[RightArrow]r Cos[theta],x2\[RightArrow]r
Sin[theta]} is neither a list of replacement rules nor a valid
dispatch table, and so cannot be used for replacing. >>

Thanks in advance for any suggestions or pointers.

Best, Andrej

  • Prev by Date: Re: Exception message from java: MathLink connection was lost.
  • Next by Date: Re: Park's and Bergstrom's packages
  • Previous by thread: Re: .eps file in MATHEMATICA
  • Next by thread: Re: Polar coordinates - ReplaceAll issue