Oct 18, 2012

Coulomb's Law in $d$-Dimension

In 3+1 dimension, Coulomb's law and Newton's law of gravity takes the form of distance inverse-squared,
\[ f = \frac{1}{r^2} \] with proper definition of the source and distance. What is Coulomb's law and Newton's law look like in high dimensions?

To answer this question, we have to make assumptions. We assume the Lagrangian stays the same form in $d+1$ dimension. It means, the Maxwell equations hold; or equivalently, Poisson equation holds \[ \nabla^2 \varphi(\mathbf{x}) = 0. \]
Solving $\varphi$ in free space will produce the potential hence the force. By doing Fourier transform, \[ \varphi(\mathbf{x}) = \int \frac{\mathrm{d}^d k}{(2\pi)^d} \frac{ e^{i \mathbf{k}\cdot \mathbf{x}}}{k^2}. \]

Solving $\varphi(r)$

\[\varphi = \frac{1}{(2\pi)^d}\int \mathrm{d} k \; k^{d-3} \mathrm{d}^{d-1}\Omega {e^{i k r \cos \theta_1}} \], where $\mathrm{d}^{d-1} \Omega $ is the $(d-1)$-D angular element. Now this integral involves the integral of one azimuthal angle $\theta$. We can parametrize the coordinate in $d$-D spherical coordinate as: \[ x_1 = r \cos\theta_1; x_2 = r \sin\theta_1 \cos\theta_2; \cdots; x_d = r \sin\theta_1 \sin\theta_2\cdots \sin\theta_{d-2}\cos\phi; \] Then the surface element becomes: $\mathrm{d}^{d-1} \Omega = \sin^{d-2}\theta_1 \sin^{d-3}\theta_2 \cdots \sin \theta_{d-2} \mathrm{d}\theta_1 \mathrm{d}\theta_2 \cdots \mathrm{d}\theta_{d-2} \mathrm{d} \phi $. The integral over angles except $\theta_1$ is just the surface area of a $(d-2)$-D hypersphere (See appendix for a derivation) \[ S_{d-2} = \frac{2 \pi^{\frac{d-1}{2}}}{\Gamma\left( \frac{d-1}{2} \right) } \]

So $\varphi = \frac{ S_{d-2}}{ (2\pi)^d r^{d-2}} I_{d} $, where \[ I_d = \int_0^\infty \mathrm{d}\xi \; \int_0 ^\pi \mathrm{d}\theta \; \xi^{d-3} \sin^{d-2}\theta \exp\left[ i \xi \cos\theta \right]. \]
It's tempted to do the $\xi$ integral first, because it gives gamma function and leaves the rest a integral over $\tan\theta$: $ \int_0^{\pi/2} \mathrm{d}\theta \tan^{d-2}\theta + (-1)^{d-2}\int^{\pi/2}_\pi \mathrm{d}\theta \tan^{d-2}\theta$. The problem is that integral of $\tan$ function at $\pi/2$ is singular . We can do the $\theta$ integral first, which yields (using mathematica):\[ I_d = \int_0^\infty \mathrm{d}\xi \; \sqrt{\pi} \Gamma\left( \frac{d-1}{2} \right) \frac{{ }_0F_1\left( \frac{d}{2}, -\frac{\xi^2}{4} \right)}{\Gamma\left( \frac{d}{2} \right)} \xi^{d-3} = 2^{d-3} \sqrt{\pi} \Gamma\left( \frac{d-2}{2} \right) \Gamma\left( \frac{d-1}{2} \right). \]
Therefore, \[ \varphi = \frac{ S_{d-2}}{ (2\pi)^d r^{d-2}} 2^{d-3} \sqrt{\pi} \Gamma\left( \frac{d-2}{2} \right) \Gamma\left( \frac{d-1}{2} \right) = \frac{\Gamma\left( \frac{d-2}{2}\right)}{4 \pi^\frac{d}{2} }\frac{1}{r^{d-2}} \]
Coulomb potential in higher dimensions

Gauss Law

There is a much easier method to solve this problem. We note that Gauss theorem (in mathematics) hence Gauss law (in physics) still holds. \[ E(r) \cdot S_{d-1} = 1 \] where $S_{d-1}$ is the area of a $d-1$ D hypersphere. So we get Coulomb's law in $d+1$ dimension as:\[ f = \frac{\Gamma\left( \frac{d}{2} \right) }{2 \pi^\frac{d}{2}} \frac{1}{r^{d-1}}. \]

It can be checked, $-\frac{\partial}{\partial r} \varphi(r) = E(r)$, Just as we expected. Of course, the direct integration can be used in where Gauss law does not hold.

Coulomb's law for massive boson exchange

Another interesting result is the Coulomb's law for classical theories with massive intermediate boson in higher dimentions. The Poisson equation becomes \[ (\nabla^2 - m^2) \varphi(\mathbf{x}) = 0. \]
By doing Fourier transform, \[ \varphi(\mathbf{x}) = \int \frac{\mathrm{d}^d k}{(2\pi)^d} \frac{ e^{i \mathbf{k}\cdot \mathbf{x}}}{k^2+m^2}. \] Apply the same technique again (except the Gauss Law), \[
\varphi(r) = \frac{ (m r)^{\frac{d}{2}-1} K_{\frac{d}{2}-1} (mr)}{(2 \pi)^\frac{d}{2}}\frac{1}{ r^{d-2}} \] where $K_n(x)$ is the Bessel function of the second kind.
Comparison of field potential of massless and massive boson exchange in higher dimensions
Comparison of field potential of massless and massive boson exchange in higher dimensions at large $r$

Appendix: the surface area of a $(d-1)$-D hypersphere

Consider the following Gaussian integeral: \[ \int \mathrm{d}^n x \exp\left( - \mathbf{x}^2 \right) = \left( \int \mathrm{d}x \exp\left[ - x^2 \right] \right)^n = \pi ^{\frac{n}{2}} \]
The left hand side can be written as $ \int \mathrm{d}r \; r^{n-1} \exp\left[ -r^2 \right] S_{n-1}$. So $ \frac{1}{2} \Gamma\left(\frac{n}{2}\right) S_{n-1} = \pi^\frac{n}{2} $. \[ S_{n-1} = \frac{2 \pi^\frac{n}{2} }{\Gamma\left(\frac{n}{2}\right)}. \]

See also: 

http://naturalunits.blogspot.com/2013/01/a-remark-on-high-dimension-propagators.html

update, March 21, 2014:

  • I was solving the Green's function with free space boundary condition. The Poisson equation should have been    

\[ \nabla^2 \varphi(\mathbf{x}) = \delta(\mathbf{x}) \]

  • This is not a the only generalization. It may not even be the natural generalization, from the point view the Newtonian approximation in general relativity. In GR, one should write down the Einstein equation in $d+1$ D and do the linearization there, as our commentator explained. (That means one fix G, which is not always appreciated.)

Oct 4, 2012

ubuntu/linux 无法启动问题


今天开机启动linux, 又一次遇到了无法启动进入busybox的问题. 上次是在中国, 搜寻多次未果, 最后用liveCD导出了数据重新安装的linux. 这次在Sasha的帮助下解决了问题.
问题如下: 开机启动, grub 选择系统(ubuntu 9.10+ vista)登录. 一切顺利. 然后ubuntu的logo还能闪亮. 到这里为止一切正常. 接下来就不能继续了. 大约过了20s, 进入了busybox 如下:
-------------------------------------
Gave up waiting for boot device. Common problems:
-Boot args (cat /proc/cmdline)
-check rootdelay
-check root
-Missing modules(cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/d286688a-8587-4977-99b9-1414cf09c374 does not exist. Dropping to a shell!

BusyBox v1.1.3 (Debian 1:1.1.3-5ubuntu12) Built-in shell (ash)
Enter 'help' for build in commands.

(initramfs)|
----------------------------------
这个界面里可以键入命令, 但是很有限. 不能成为管理员, 甚至无法重启(用ctrl+alt+delete)可以. 也无法访问自己的/home/

解决的办法: Sasha使用USB制作的liveCD (在BIOS里选择USB启动)进入系统, 挂载原磁盘, 然后找到grub.d/ 文件夹里的 grub.cfg 文件. 把
linux /boot/vmlinuz-2.6.31-17-generic root=UUID=a026ae5a-4c0b-42cd-8b46-b57bfb433ac7 ro quiet splash
替换成:
linux /boot/vmlinuz-2.6.31-17-generic root=/dev/sda1 ro quiet splash
注意是要把root=UUID=(UUID) 替换成 root=/dev/sda(x). 其中sda(x)是你的根目录所在的磁盘.

这个问题是, linux 内核似乎有时候无法按照 UUID 识别磁盘. 所以改成用绝对文件路径来查找.

参考: 1.https://bugs.launchpad.net/ubuntu/+source/linux/+bug/360378
2. http://ubuntuforums.org/showthread.php?t=891378&page=2
3. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/442679

c++ notes: I/O


  1. 记得包含 <iomanip> <fstream>
  2. 少用 std::cin >> ...; 处理字符和字符串. 如果使用记得加一个 std::cin.ignore(); 来吃掉回车. std::cin.sync(); 来清空buffer
  3. 使用std::cin.getline( const char* str, size_t n, char ch );   /*对于文件流也一样适用*/ ch设置为 '\n'
  4. 对于使用string 类型的操作, 使用相应的版本: getline( iostream std::cin, string str);
  5. 使用GNU C的系统库函数来实现系统相关的操作, 比如文件操作. 比较有用的一个函数是 int scandir(const char* directory, struct ***dirent namelist, int (*selector)(void * ), alphasort) ; 来扫描文件. 其中 返回文件个数, directory 是目标文件夹(路径), namelist 存储扫描得到的文件(夹) 一般定义为: struct ** storagelist 并使用 &storagelist 作为参量. 不用担心其大小. 因为它只是一个指针, 指向的部分是由malloc 分配的. 使用完之后最好加以free.; selector 是一个自定义的比较函数. 返回值为非零的文件将会被选择; alphasort 也本应该是一个自定义的文件, 表示返回文件的排列方法. 不过系统提供了几个函数. alphasort就是一个常用的.
  6. 使用 定义在 <cstdlib.h> 中的库函数来读取环境变量: system(const char* str);来执行shell命令. getenv(const char* str) 来获得环境变量.
  7. 使用系统预编译宏: __TIME__ __DATE__ ; __LINE__ 等等