42,689 reputation
163174
bio website uoregon.edu/~noeckel
location
age
visits member for 2 years, 6 months
seen 19 mins ago

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
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
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.
Jul
8
comment Using NDSolve to solve Equation of Motion in cylindrical coordinates
@acl Good idea. I'll do it soon...
Jul
7
comment Defining the Moyal Product in Mathematica
@Karan must be a problem with version 9. In v. 8 this doesn't happen...
Jul
7
comment Defining the Moyal Product in Mathematica
I can't reproduce this (what version of MMA are you using?). Setting $Assumptions={x>0} before doing the tests, both orders of the star work fine and give consistent results, no left-over FT or deltas.
Jul
6
comment How to use multiple pure functions correctly?
Yes, that's all possible, but it's very hard to read - perhaps more difficult to read than it is to write it... And (#&) is basically just shorthand for Function anyway.
Jul
6
comment How to use multiple pure functions correctly?
In this case it would be a little clumsy to go with functional style all the way. How about making it simpler with Table[Select[{1, 2, 3, 4, 5}, IntervalMemberQ[Interval[i], #] &], {i, {{0, 1}, {1, 4}, {3, 4}}}]?
Jul
4
comment How to make the animation rate lower in an exported GIF
Also, "DisplayDurations" can be a list of time values, one for each individual frame. Ironically, this is a feature that GIF export offers whereas you can't do it easily for standard movie formats: see this question.
Jul
3
comment Gateaux (directional) derivatives and higher order differentials of a functional
@A.S. I see - so the question is really about defining the higher-order derivative operators in a more automatic way, if I understand correctly.
Jul
3
comment Gateaux (directional) derivatives and higher order differentials of a functional
I think your question will be answered by the VariationalMethods package. An example of how to use it in practice are the the Euler equation for a classical Lagrangian. Maybe your main point are higher variational derivatives. Then perhaps one can point to the question Can we teach Mathematica about functional differentiation?
Jul
2
comment Upon PDF export, edgeless rectangles do not tile perfectly, and corners may be cut. Is this a bug?
As an alternative answer, you could try the function rasterTrick in my answer here. The output of Export["file.pdf",graphics//rasterTrick] looks fine to me using version 9.0.1 on OS X (where graphics is the original example in your question)
Jul
2
comment What's the differences between the shift-enter and MakeBoxes running?
My short answer would be: to get the expected notebook display, you have to feed the boxes to DisplayForm.
Jul
2
comment Generic Matrices
Related quation: 3N-dimensional integral
Jul
1
comment PlotLegends question
(+1) Strange that the legend for the plot with a line and marker contains only the marker and not the line, isn't it? But you do get both in the second example using ListLinePlot if PlotMarkers is added there...
Jul
1
comment Answer when integrating by partial fractions
Related question
Jun
30
comment Saving graphics in Adobe Illustrator .ai format
If you look at the header of an AI file, it's actually just a PDF file with some additions. That's why it can for example be viewed in Preview on OS X without having to install Illustrator. AI format used to be based on EPS, but that's no longer the case.