Processing math: 100%

Aug 30, 2012

VIM for Mathematica


The very first thing to do is a Mathematica Syntax File : Syntax highlighting file for Mathematica code and a Mathematica Indent File : Indentation file for Mathematica code.

There is one more trouble, both Mathematica and Matlab use .m file extensions, so if you are editing Mathematica .m files, you need to either manually :set ft=mma or edit your filetype.vim file.
au! BufRead,BufNewFile *.m set ft=mma sw=2

Aug 24, 2012

Why is the Lorentz transformation linear?


Today, in our General Relativity class, a student asked Dr. Anderson why Lorentz transformation must be linear. Dr. Anderson seemed unprepared for this question, and simply argued it does not have to, but proposed for simplicity. Especially, said him, linearity hold for infinitesimal transformation (first order). His answer isn't satisfactory to me.  

Lorentz transformation is defined for (between) inertial frames. (The coordinates transformation for general frames is the subject of general relativity.) The linearity of the Lorentz transformation comes from the property of the inertial frame and the equivalence principle (See for example: Weinberg, Gravitation and Cosmology: Principles and Applications of the General Theory of Relativity). Newton's first law defines inertial reference frame,
"In an inertial frame, every body persists in its state of being at rest or of moving uniformly straight forward, except insofar as it is compelled to change its state by force impressed." 
Therefore, if an object is not accelerating in one inertial frame, it musn't be accelerating in another. Now let's apply it to the Lorentz transformations.

Let K and K be two inertial frames, related by a constant velocity V. We denote the coordinates in the two frames as xμ,yμ. Let xμ=Xμ(t) and yμ=Yμ(t) be the trajectories of a particle  in K and K respectively. Note that t=x0=X0(t),t=y0=Y0(t), thus X0 and Y0 are unit identity functions. The velocities ddtXμ˙Xμ,ddtYμ˙Yμ. We note that all the derivatives are ultimately taken respect to t (or t). The relation between t and t: dtdt=˙Xμy0xμ. So,
[ equation 1 ] d2Yκdt2=y0xρ˙Xρ2yκxμxν˙Xμ˙Xν+y0xρ˙Xρyκxμ¨Xμyκxρ˙Xρ2y0xμxν˙Xμ˙Xνyκxρ˙Xρy0xμ¨Xμ(y0xλ˙Xλ)3
Suppose the particle has uniform velocity in frame K, ¨X=a=0,¨X0(t)=d2tdt2=0 (i.e. ¨Xμ=0). According to the property of the inertial frame, it has 0 acceleration in K, too, ¨Y=a=0,¨Y0(t)=d2tdt2=0 (i.e. ¨Yμ=0). Hence for all constant velocities ˙Xμ ( with subject to the constraint ˙X01  - yet does not affect the conclusion ),
[ equation 2 ] ¨Yκ=0(y0xρ2yκxμxνyκxρ2y0xμxν)˙Xμ˙Xν˙Xρ=0y0xρ2yκxμxν=yκxρ2y0xμxν. Obviously, the expression holds trivially when κ=0.

Now, according to Special Relativity (SR), the coordinates in the new and old frame satisfy [ equation 3, the equivalence principle ] gμνdxμdxν=gμνdyμdyνgμνyμxρyνxσ=gρσ,gρσyμxρyνxσ=gμν where gμν=gμν=diag{1,+1,+1,+1} is the metric tensor. By using this relation and equation 2, we get,
[ equation 4 ] gρσy0xσy0xρ2yκxμxν=gρσy0xσyκxρ2y0xμxν2yκxμxν=g0κ2y0xμxν Now, g0κ=δ0κ. That means, if κ=1,2,3, then 2yκxμxν=0. Substitute this result back to equation 2, and take we can see  2y0xμxν=0. Therefore, we conclude
[ equation 5 ] 2yκxμxν=0, namely the Lorentz transformation is linear with respect to coordinates xμ.

Due to the linearity, We can write the Lorentz transformation as yμ=Λμνxν+aμ, where Λμν and aμ do no depend on the coordinates  xμ. Apparently, Λμν satisfy gμνΛμρΛνσ=gρσ. This constraint reduces the number of free parameters of Λμν from 4×4=16 to 6 (3 angles and 3 rapidities). These are also the solutions of equation 2 & equation 3. These solutions, as we know form a group, the Poincare group.


update:
edit the wording and notations.

supplement the derivation with d2tdt2 part (red texts). It was omitted in the previous derivation as d2tdt2=0 (or I forgot).

rederive the linearity from the equivalence principle

Aug 20, 2012

Incorrect Printing Top Margin in Ubuntu 11.10


The driver hpcups 3.11.7 for some HP printers (model LaserJet P2055dn, LaserJet p4014dn, LaserJet P4015, LaserJet m1522nf MFP, LaserJet 1150, LaserJet 2035n, LaserJet 3030, LaserJet 4350dtn) has a bug that causes incorrect top margin in output. Specifically, the top margin is clipped. Choosing auto scale can only partly solve the issue, if the below update is not available.
in a terminal:
system-config-printer
right-click your printer and choose property > job options > toggle scale to fit
The 3.11.5 or 3.11.10 versions all fixed the bug. Unfortunately, hpcups 3.11.7 comes with Ubuntu 11.10. Many may have encountered it. Update HPLIPS can resolve the problem. It's in the recommended updates.