Archive for the 'Physics' Category

Random Facts

Posted in Physics 3 years, 1 month ago

Some random math facts that I came across last week.

Poincaré group

The Special Euclidean group combines rotations and translations in Euclidean space. The SE group is an isometry, which means it preserves angles and distances.

In special relativity, the 4-vectors are three space variables and one time variable. Rotations in this space can be generalized to the Poincaré group. Instead of having sines and cosines in the rotation part as in SE, they have hyperbolic sines and cosines.

The norm of a vector is defined through its inner product:

 ||x|| = \sqrt {\langle x,x \rangle}

which in special relativity is

 \langle (x,y,z,t), (x,y,z,t) \rangle = x^2 + y^2 + z^2 – t^2

A friend pointed out that the Lorentz transformation was only recently proved to be linear.

Geodesics and Metrics

One of the most beautiful things I learnt in the last few weeks is the connection between geodesics (shortest paths) and metrics in that space. If g(t) is a geodesic path and v(t) is the velocity of the path:

v(t) = \frac{d g(t)}{dt}

then the metric is defined by

d^2 = \int ||v(t)||^2 dt

Moreover, the path satisfies the Euler-Lagrange equation. This was first shown by Arnold in a hydrodynamical context, and subsequently borrowed by control systems and computer vision folks.

A Poor Joke

Two functions e^x and x^2 were going in a car. x^2 looked ahead and said, “Oh shit! There comes a differential operator.” e^x says with a smirk, “It can’t do nothing to me!” On approaching the differential operator, it says “Haha! I’m d/dy.”

As narrated to me by a random math major last week…

Best of CiSE

Posted in Physics 3 years, 3 months ago

Computing in Science & Engineering highlights the top 5 articles in honor of their 75th anniversary:

  • The Fast Fourier Transform for Experimentalists – Part I
  • Physlets for Quantum Mechanics
  • The Physical Basis of Computability
  • Ten Good Practices in Scientific Programming
  • The Metropolis Algorithm

Pseudospectral Methods

Posted in Physics 3 years, 4 months ago

poster.jpg

One of the many things I learnt from my nonlinear physics project is the pseudospectral method. I’m going to try explaining this method the way I understand it.

Any function can be expressed as an infinite sum of the set of basis functions:

f(x) = \sum c_n \phi_n(x)

For the purpose of an example, if we take the polynomial basis of order 2, then the function can be approximated as

f(x) \approx p(x) = c_0  + c_1 x + c_2 x^2

The coefficients can be solved for by building a system of equations. The three unknowns require three points on the interval where we know the exact value of the function. Let these three points be x0, x1 and x2 and the value of the function at these points be b0, b1 and b3.

b_i = f(x_i)

The system of equations is now,

eqnarray.jpg

written compactly as \small{b = Ax}

The system can be solved by inverting the matrix A, which is of complexity \small{\mathcal{O}(N^3)}. The function p(x) is an interpolating polynomial in the interval of interest. As you can see, using a higher order polynomial quickly becomes prohibitively expensive.

Instead of picking the polynomial basis, you can pick any other basis. The Chebyshev basis is commonly used. A friend of mine picked the Fourier-Bessel basis. Depends on the application.

Fourier basis

The Fourier basis is fundamental to linear systems theory. Linear operators become diagonal in the Fourier basis. This fact comes handy in numerical schemes such as exponential integrators, where you’ll have to take the exponential of a matrix.

The second advantage falls out of the uncertainty principle. Increasing the number of modes in the Fourier domain is equivalent to shrinking the spacing between steps in the space domain. This leads to an exponential convergence in the number of points required as opposed to the usual polynomial convergence with finite differences.

The third key point in the use of the Fourier basis is that the FFT lets us do the equivalent of a matrix inversion in \small{\mathcal{O}(N \log N)}. This is very fast.

Summary

In summary, three random facts come together to form a beautiful theory:

  • The FFT is much faster than a matrix inversion.
  • Linear operators are diagonal in the Fourier basis.
  • Exponential convergence of spectral methods.

Hope you enjoyed reading this post as much as I enjoyed writing it.