Posts

Rindler space

Image
We proved the hyperbolic motion viewed in the lab frame of a relativistic particle with constant proper acceleration as in this post : \begin{equation}t(\tau) = \frac{c}{a}\sinh\left(\frac{a\tau}{c}\right)\,,\quad x(\tau) = \frac{c^2}{a}\cosh\left(\frac{a\tau}{c}\right)\,,\tag{1} \end{equation} where $\tau$ is the proper time of the particle. The next question is: What is the time and space coordinates transformation between the lab frame $(t, x)$ and the particle frame? The time in the particle frame is just the proper time $\tau$ and we denote the space coordinate in the particle frame by $\xi$. The transformation between $(t, x)$ and $(\tau, \xi)$ is obviously not Lorentz transformation since the particle frame is not an inertial frame because of the acceleration. Instead, Eq. (1) is a special case of the transformation at $\xi=0$. The key insight is that although the particle frame is not an inertial frame, there exists a series of instantaneous co-moving inertial frames at each ti...

Constant proper acceleration in special relativity

Considering special relativity, what is the world line of a moving particle with constant proper acceleration $a$ observed in the still world frame? The proper acceleration is defined as the acceleration measured by the inertial observer to which the particle looks rest during the measurement. Lorentz transformation of acceleration The problem is about the Lorentz transformation of acceleration. For this purpose, we start by the Lorentz transformations in special relativity between a still frame $(t, x)$ and a moving frame $(t', x')$ with constant speed $v$ relative to the still frame: \begin{eqnarray} x'&=&\frac{x-vt}{\sqrt{1-{v^2}/{c^2}}}\,,\tag{1}\\ t'&=& \frac{t-vx/c^2}{\sqrt{1-{v^2}/{c^2}}}\,.\tag{2}\end{eqnarray} A motion with speeds $u_x\equiv \frac{dx}{dt}$ in the still frame and $u'_x\equiv \frac{dx'}{dt'}$ in the moving frame has the transformation: \begin{eqnarray} u'_x = \frac{u_x - v}{1-{vu_x}/{c^2}}\,,\tag{3} \end{eqnarray} ...

Monthly mortgage payment

 The formula of the monthly mortgage payments for a fixed-rate loan can be found online as \begin{equation} M = P\frac{r(1+r)^n}{(1+r)^n-1}\,,\tag{1}\end{equation} where  $M$ is the mortgage payment.   $P$ is the principal, i.e., the initial amount borrowed.  $r$ is the monthly interest rate. For annual interest rate $2.5\%$, $r=2.5\% / 12$. $n$ is the number of payments. For 30-years fixed rate mortgage, $n=30 * 12 = 360$. Here we provide a derivation of the above formula. Let $b_i$ be the owned balance in the $i$-th month. Initially, $b_0=P$ and we choose the constant monthly payment $M$ such that $b_n=0$. We then have the recursion relation between two consecutive month as \begin{equation}b_{i+1}=b_i(1+r) - M\,.\tag{2}\end{equation} A trick to solve (2) is to write Eq. (2) into the following form \begin{equation}b_{i+1}+C = \left(b_i+C\right)(1+r)\,,\tag{3}\end{equation} so that $b_i+C$ is a geometric sequence: \begin{equation}b_i + C = (b_0 + C) (1+r)^i\,.\end{eq...

Euler Angles

Before talking about the Euler angles and the rigid body motion, we first briefly review the rotations of a point in a single fixed world frame. Given a point $\mathbf{V}\equiv [x, y, z]^T$, if we rotate it along the z-axis by an angle $\theta$ to a new position $\mathbf{V'}\equiv [x', y', z']^T$, then we have the relation \begin{equation} \mathbf{V'}= R_Z(\theta)\mathbf{V}\,,\quad R_Z(\theta)\equiv\left[\begin{array}[ccc]& \cos(\theta) & -\sin(\theta) & 0 \\ \sin(\theta) & \cos(\theta) & 0 \\ 0 & 0 & 1 \end{array}\right]\,.\tag{1}\end{equation} If we continue to rotate $\mathbf{V'}$ along the x-axis by another angle $\phi$, the point ends with the coordinates $\mathbf{V''}\equiv [x'', y'', z'']^T$ with relation \begin{equation} \mathbf{V''}= R_X(\phi)\mathbf{V'}\,,\quad R_X(\phi)\equiv\left[\begin{array}[ccc]& 1 & 0 & 0 \\ 0 & \cos(\phi) & -\sin(\phi) \\ 0 & \sin(\...

Interview problem: Union Find

 Leetcode 684 class Solution : def findRedundantConnection ( self , edges : List [ List [ int ]]) -> List [ int ]: n = len ( edges ) parent = list ( range ( n + 1 )) rank = [ 0 ] * ( n + 1 ) def _find ( x ): if parent [ x ] == x : return x parent [ x ] = _find ( parent [ x ]) return parent [ x ] def _union ( x , y ): x = _find ( x ) y = _find ( y ) if rank [ x ] > rank [ y ]: x , y = y , x if rank [ x ] == rank [ y ]: rank [ y ] += 1 parent [ x ] = y return y for x , y in edges : if _find ( x ) == _find ( y ): return [ x , y ] _union ( x , y )

A Zee's books are fantastic

Prof.  J. Pochinski wrote in the preface of his famous string theory textbook that "one of the greatest pleasures was finding a text that made a difficult subject accessible". To me, Prof. A. Zee 's new textbook " Group Theory in a Nutshell for Physicists " is such a great text that explains a lot of concepts in group theory clearly and patiently. On one night in the last week, I opened this book for some random reading to save myself temporarily out of the recent boring daily work. It turns out I sit there for one hour and read 70 pages (page 185-255) in one go, with no awareness of the elapsed time. I took a undergraduate course of group theory before, and thus are familiar with the technical parts like $J_{\pm}, J_{z}$ or $|j, m\rangle$. But still, this is the first book I've read that explains the concepts of (irreducible) tensor representations of SO(N) and SU(N) clearly. For example, the author devoted a lot of space to convince his readers that why ...

Interview problem: Segment Tree

I heard the name of segment tree several times before and never had an opportunity to learn what it is. Today I finally understand the concepts of segment tree by watching these seven short youtube videos 9.1-9.7 . These lectures are highly recommended to those who are new to the topics of segment tree like me. Here is my python solution to the Leetcode 307  using the segment tree: class TreeNode : def __init__ ( self , start , end , total , left = None , right = None ): self . start = start self . end = end self . total = total self . left = left self . right = right class NumArray : def __init__ ( self , nums : List [ int ]): def _create ( start , end ): if start == end : return TreeNode ( start , end , nums [ start ]) mid = start + ( end - start ) // 2 left = _create ( start , mid ) right = _create ( mi...