## During a astrophysics lecture…

Prof: You can attend a colloquium ; sleep through the entire session but if you wanted to ask a really intelligent sounding question at the end go with ‘Excuse me, what about the magnetic fields?’ … Works like a charm ! 😀 😀

## Prof.Ghrist at his best!

To understand why this is true, we must start with the Fundamental Theorem of Vector calculus. If $F$ is a conservative field ( i.e $F = \nabla \phi$ ), then

$\int\limits_{A}^{B} F.dr = \int\limits_{A}^{B} \nabla\phi .dr = \phi_{A} - \phi_{B}$

What this means is that the value is dependent only on the initial and final positions. The path that you take to get from A to B is not important.

Now if the path of integration is a closed loop, then points A and B are the same, and therefore:

$\int\limits_{A}^{A} F.dr = \int\limits_{A}^{A} \nabla\phi .dr = \phi_{1} - \phi_{1} = 0$

Now that we are clear about this, according to Stokes theorem the same integral for a closed region can be represented in another form:

$\int_{C} F.dr = \int\int_{A} (\nabla X F) .\vec{n} dA = 0$

From this we get that Curl = $\nabla X F = 0$ for a conservative field (i.e $F = \nabla \phi$). Therefore when a conservative field is operated on by a curl operator ($\nabla X$), it yields 0.

Bravo Prof.Ghrist! Beautifully said 😀

## How to visualize Flux ?

Sometime ago I was asked how to visualize Flux in the context of Gauss law.

$\int\int_{S} {\bf E. \vec{n}} dS = \frac{q}{\epsilon}$

I believe one of the primary reasons why people get thrown away by this idea of flux is due to that double integral sign. And when explained what that integral meant, a lot of people felt at ease.

### What is Flux ?

Flux is a measure of how much stuff is entering or leaving a surface.

### What does the Integral mean ?

$\int\int_{S} {\bf E. \vec{n}} dS$

Why is the above integral a representation of Flux?

To understand why let’s take the example where you know the electric field and want to find the flux across a sphere. How would you go about finding that ?

Well lets start with a cube and wrap it around the charge and calculate the stuff coming in and out of each surface of this cube. This won’t give the actual value but an approximate.

$Flux \approx Flux_{face-1} + Flux_{face-2} + \hdots + Flux_{face-6}$

$Flux \approx E_{1} \Delta S + E_{2} \Delta S + \hdots + E_{6} \Delta S$

$Flux \approx \sum\limits_{i=1}^{6} {\bf E.\vec{n}} \Delta S$

where $\Delta S$ is the area of the surface.

Now to find a better approximate, you can move from a cube to higher dimensions. And as a result we will get better and better approximates for the Flux.

$Flux \approx \sum\limits_{i=1}^{N} {\bf E.\vec{n}} \Delta S$

where N is the number of surface elements.

But is imperial to note that as we increase the number of surface elements, the surface area must also decrease for better approximation.

And this approximation for the flux becomes the actual value when the area of the surface elements tends to $0$ i.e

$Flux = \sum\limits_{i=1}^{N} {\bf E.\vec{n}} \Delta S$ as $\Delta S \to 0$ $N \to \infty$

This is what is written out as an Integral as :

$Flux = \int\int_{S} {\bf E. \vec{n}} dS$

Now although in this post we have laid emphasis on the surface being a sphere, in theory it can be closed or even open. This analysis would be valid at all times.

## Tricks that I wish I knew in High School : Trigonometry (#1)

I really wish that in High School the math curriculum would dig a little deeper into Complex Numbers because frankly Algebra in the Real Domain is not that elegant as it is in the Complex Domain.

To illustrate this let’s consider this dreaded formula that is often asked to be proved/ used in some other problems:

$cos(nx)cos(mx) =$ ?

Now in the complex domain:

$cos(x) = \frac{e^{ix} + e^{-ix}}{2}$

And therefore:

$cos(mx) = \frac{e^{imx} + e^{-imx}}{2}$

$cos(nx) = \frac{e^{inx} + e^{-inx}}{2}$

$cos(mx)cos(nx) = \left( \frac{e^{imx} + e^{-imx}}{2} \right) \left( \frac{e^{inx} + e^{-inx}}{2} \right)$

$cos(mx)cos(nx) = \frac{1}{4} \left( e^{i(m+n)x} + e^{-i(m+n)x} + e^{i(m-n)x} + e^{-i(m-n)x} \right)$

$cos(mx)cos(nx) = \frac{1}{2} \left( \left( \frac{e^{i(m+n)x} + e^{-i(m+n)x}}{2} \right) + \left( \frac{e^{i(m-n)x} + e^{-i(m-n)x}}{2} \right) \right)$

$cos(mx)cos(nx) = \frac{1}{2} \left( cos(m+n)x + cos(m-n)x \right)$
And similarly for its variants like $cos(mx)sin(nx)$ and $sin(mx)sin(nx)$ as well.

****

Now if you are in High School, that’s probably all that you will see. But if you have college friends and you took a peak what they rambled about in their notebooks, then you might this expression (for $m \neq n$):

$I = \int\limits_{-\pi}^{\pi} cos(mx)cos(nx) dx \\$

But you as a high schooler already know a formula for this expression:

$I = \int\limits_{-\pi}^{\pi} \left( cos(m+n)x + cos(m-n)x \right)dx \\$

$I = \int\limits_{-\pi}^{\pi} cos(\lambda_1 x) dx + \int\limits_{-\pi}^{\pi} cos(\lambda_2 x) dx \\$

where $\lambda_1$, $\lambda_2$ are merely some numbers. Now you plot some of these values for lambda i.e ($\lambda = 1,2, \hdots$) and notice that since integration is the area under the curve, the areas cancel out for any real number.

and so on….. Therefore:

$I = \int\limits_{-\pi}^{\pi} cos(mx)cos(nx)dx = 0$

This is an important result from the view point of Fourier Series!

## On the direction of the cross product of vectors

One of my math professors always told me:

Understand the concept and not the definition

A lot of times I have fallen into this pitfall where I seem to completely understand how to methodically do something without actually comprehending what it means. And only after several years after I first encountered the notion of cross products did I actually understand what they really meant. When I did, it was purely ecstatic!

## Why on earth is the direction of cross product orthogonal ? Like seriously…

I mean this is one of the burning questions regarding the cross product and yet for some reason, textbooks don’t get to the bottom of this. One way to think about this is :

It is modeling a real life scenario!!

The scenario being :

When you try to twist a screw (clockwise screws being the convention) inside a block in the clockwise direction like so, the nail moves down and vice versa.

i.e When you move from the screw from u to v, then the direction of the cross product denotes the direction the screw will move.

That’s why the direction of the cross product is orthogonal. It’s really that simple!

## Another perspective

Now that you get a physical feel for the direction of the cross product, there is another way of looking at the direction too:

Displacement is a vector. Velocity is a vector. Acceleration is a vector. As you might expect, angular displacement, angular velocity, and angular acceleration are all vectors, too.

But which way do they point ?

Let’s take a rolling tire. The velocity vector of every point in the tire is pointed in every other direction. BUT every point on a rolling tire has to have the same angular velocity – Magnitude and Direction.

How can we possibly assign a direction to the angular velocity ?

Well, the only way to ensure that the direction of the angular velocity is the same for every point is to make the direction of the angular velocity perpendicular to the plane of the tire.
Problem solved!

## Solving the Laplacian in Spherical Coordinates (#1)

In this post, let’s derive a general solution for the Laplacian in Spherical Coordinates. In future posts, we shall look at the application of this equation in the context of Fluids and Quantum Mechanics.

$x = rsin\theta cos\phi$
$y = rsin\theta cos\phi$
$z = rcos\theta$

where

$0 \leq r < \infty$
$0 \leq \theta \leq \pi$
$0 \leq \phi < 2\pi$

The Laplacian in Spherical coordinates in its ultimate glory is written as follows:

$\nabla ^{2}f ={\frac {1}{r^{2}}}{\frac {\partial }{\partial r}}\left(r^{2}{\frac {\partial f}{\partial r}}\right)+{\frac {1}{r^{2}\sin \theta }}{\frac {\partial }{\partial \theta }}\left(\sin \theta {\frac {\partial f}{\partial \theta }}\right)+{\frac {1}{r^{2}\sin ^{2}\theta }}{\frac {\partial ^{2}f}{\partial \phi ^{2}}} = 0$

To solve it we use the method of separation of variables.

$f = R(r)\Theta(\theta)\Phi(\phi)$

Plugging in the value of $f$ into the Laplacian, we get that :

$\frac{\Theta \Phi}{r^2} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right) + \frac{R \Phi}{r^2 sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{\Theta R}{r^2 sin^2 \theta} \frac{d^2 \Phi}{d\phi^2} = 0$

Dividing throughout by $R\Theta\Phi$ and multiplying throughout by $r^2$, further simplifies into:

$\underbrace{ \frac{1}{R} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right)}_{h(r)} + \underbrace{\frac{1}{\Theta sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{1}{\Phi sin^2 \theta} \frac{d^2 \Phi}{d\phi^2}}_{g(\theta,\phi)} = 0$

It can be observed that the first expression in the differential equation is merely a function of $r$ and the remaining a function of $\theta$ and $\phi$ only. Therefore, we equate the first expression to be $\lambda = l(l+1)$ and the second to be $-\lambda = -l(l+1)$. The reason for choosing the peculiar value of $l(l+1)$ is explained in another post.

$\underbrace{ \frac{1}{R} \frac{d}{dr} \left( r^2\frac{dR}{dr} \right)}_{l(l+1)} + \underbrace{\frac{1}{\Theta sin \theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{d\theta} \right) + \frac{1}{\Phi sin^2 \theta} \frac{d^2 \Phi}{d\phi^2}}_{-l(l+1)} = 0$ (1)

The first expression in (1) the Euler-Cauchy equation in $r$.

$\frac{d}{dr} \left( r^2\frac{dR}{dr} \right) = l(l+1)R$

The general solution of this has been in discussed in a previous post and it can be written as:

$R(r) = C_1 r^l + \frac{C_2}{r^{l+1}}$

The second expression in (1) takes the form as follows:

$\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta + \frac{1}{\Phi} \frac{d^2 \Phi}{d\phi^2} = 0$

The following observation can be made similar to the previous analysis

$\underbrace{\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta }_{m^2} + \underbrace{\frac{1}{\Phi} \frac{d^2 \Phi}{d\phi^2}}_{-m^2} = 0$ (2)

The first expression in the above equation (2) is the Associated Legendre Differential equation.

$\frac{sin \theta}{\Theta} \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ l(l+1)sin^2 \theta = m^2$

$sin \theta \frac{d}{d \theta} \left( sin \theta \frac{d\Theta}{dr} \right)+ \Theta \left( l(l+1)sin^2 \theta - m^2 \right) = 0$

The general solution to this differential equation can be given as:
$\Theta(\theta) = C_3 P_l^m(cos\theta) + C_4 Q_l^m(cos\theta)$

The solution to the second term in the equation (2) is a trivial one:

$\frac{d^2 \Phi}{d\phi^2} = m^2 \Phi$
$\Phi(\phi) = C_5 e^{im\phi} + C_6 e^{-im\phi}$

Therefore the general solution to the Laplacian in Spherical coordinates is given by:

$R\Theta\Phi = \left(C_1 r^l + \frac{C_2}{r^{l+1}} \right) \left(C_3 P_l^m(cos\theta) + C_4 Q_l^m(cos\theta \right) \left(C_5 e^{im\phi} + C_6 e^{-im\phi}\right)$

## Matrix Multiplication and Heisenberg Uncertainty Principle

We now understand that Matrix multiplication is not commutative (Why?). What has this have to do anything with Quantum Mechanics ?

Behold the commutator operator:
$[\hat{A}, \hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A}$

where $\hat{A},\hat{B}$ are operators that are acting on the wavefunction $\psi$. This is equal to 0 if they commute and something else if they don’t.

One of the most important formulations in Quantum mechanics is the Heisenberg’s Uncertainty principle and it can be written as the commutation of the momentum operator (p) and the position operator (x):

$[\hat{p}, \hat{x}] = \hat{p}\hat{x} - \hat{x}\hat{p} = i\hbar$

If you think of p and x as some Linear transformations. (just for the sake of simplicity).

This means that measuring distance and then momentum is not the same thing as measuring momentum and then distance. Those two operators do not commute! You can sort of visualize them in the same way as in the post.

But in Quantum Mechanics, the matrices that are associated with $\hat{p}$ and $\hat{x}$ are infinite dimensional. ( The harmonic oscillator being the simple example to this )

$\hat{x} = \sqrt{\frac{\hbar}{2m \omega}} \begin{bmatrix} 0 & \sqrt{1} & 0 & 0 & \hdots \\ \sqrt{1} & 0 &\sqrt{2} & 0 & \hdots \\ 0 & \sqrt{2} & 0 &\sqrt{3} & \hdots \\ 0 & 0 & \sqrt{3} & 0 & \hdots \\ \vdots & \vdots & \vdots & \vdots \end{bmatrix}$

$\hat{p} = \sqrt{\frac{\hbar m \omega}{2}} \begin{bmatrix} 0 & -i & 0 & 0 & \hdots \\ i & 0 & -i \sqrt{2} & 0 & \hdots \\ 0 & i\sqrt{2} & 0 &\-i \sqrt{3} & \hdots \\ 0 & 0 & i\sqrt{3} & 0 & \hdots \\ \vdots & \vdots & \vdots & \vdots \end{bmatrix}$