Reputation
60,895
Next tag badge:
121/100 score
19/20 answers
Badges
2 94 232
Newest
 Good Answer
Impact
~816k people reached

Jul
9
comment Constrain Fit to make a fit that remains positive over the range of my independent variable
@user16104 Whenever you do data fitting, you have to have some model that agrees with your underlying understanding of the data. In your case this is positivity. But there are infinitely many different models one could choose, and I think it should be up to you modify Alexei's answer to accommodate any other expectations you might have.
Jul
9
answered How to add texture to solid Graphics3D object such as cylinder?
Jul
9
comment How to find all data points within closed curve
Also related: How to compile Heike's winding number function?
Jul
9
comment How to find all data points within closed curve
But that would have cost me precious extra seconds...
Jul
9
comment How to find all data points within closed curve
You're probably right, but I wanted to be as short as possible - that's what Algohi asked for, right? I guess it depends on whether the plot was considered to be already given or not...
Jul
9
comment How to find all data points within closed curve
@Mr.Wizard Strange that we both waited exactly 48 minutes before answering and then did so simultaneously!
Jul
9
comment How to find all data points within closed curve
+1 for almost beating me...
Jul
9
answered How to find all data points within closed curve
Jul
8
revised Defining the Moyal Product in Mathematica
Re-arranged edits to make it easier to follow
Jul
8
awarded  Nice Answer
Jul
8
comment Defining the Moyal Product in Mathematica
@Karan I think if what you really want is for the star product to keep its defining properties, then either your limiting approach in the earlier comment or brute-force ignoring of the conditional expression should be permitted. The last update to my answer should also do the trick.
Jul
8
revised Defining the Moyal Product in Mathematica
Deal with pathological cases
Jul
8
comment Defining the Moyal Product in Mathematica
@Karan OK - ConditionalExpressions are of course also a warning for you to stop and think about the validity of what you're doing... basically the order of integrations seems to matter, and boundary terms could be cropping up in partial integrations. I think that goes beyond what the question asked for. But I could post a brute-force fix for this issue anyway.
Jul
8
revised Defining the Moyal Product in Mathematica
Omitted discussion of possible bug because it may not be one. Added reference.
Jul
8
comment Defining the Moyal Product in Mathematica
@Karan Yes, I think you're right - I checked again and 9.0.1 isn't working for the star[1/x^2,p] case because it can't do the FT. But in any case, that's a very pathological kind of function, so I'm not totally sure it's a real bug. Are you perhaps doing something in polar coordinates? Then the phase space integral has to be done differently, including the proper Jacobian. So the naive star product definition may not be what you need anyway.
Jul
8
comment Using NDSolve to solve Equation of Motion in cylindrical coordinates
If you're not sure what the correct expression for the canonically conjugate momentum is, write down the Lagrangian in Cartesian coordinates, make the coordinate transformation, and then obtain the momentum from $p_r \equiv \partial{L}/\partial{\dot r}$.
Jul
8
comment Defining the Moyal Product in Mathematica
@RahulNarain Oh, I didn't even notice that the definition of the star product in the question is wrong. The textbook definition is the exponential I wrote down. If you believe my version (which you can find in the literature), then the definition in the question is missing a factor 1/n! under the sum. Also, I of course set h=1. So the discrepancy won't show up unless higher terms n>1 are involved in the sum. I can add some references, but I haven't heard from the OP at all so I don't know if it's worth it. Thanks for checking!
Jul
8
comment Defining the Moyal Product in Mathematica
@RahulNarain The code by belisarius was an example, not intended to be the exact result. He only added up the first 10 terms of an infinite sum, in order to show that the problem lies in the limit of infinitely many terms. So you cannot do my last example with the code in the question or in the comment.
Jul
8
revised Defining the Moyal Product in Mathematica
Addressed possible bug
Jul
8
comment Defining the Moyal Product in Mathematica
@Karan Indeed, I checked and your observation is a bug in Mathematica version 9.0.0 which has been fixed in version 9.0.1.