d37073cefff848a3aebe829a46d859e3db96c28d — Jack Halford 1 year, 3 months ago 9242517
commit before sed
M .gitignore => .gitignore +1 -1
@@ 1,3 1,3 @@

M Makefile => Makefile +13 -13
@@ 5,35 5,35 @@ SHELL := bash

MD	=	$(shell ls -1 md/*.md)
GRAPH	=	$(subst md/,graph/,$(MD:.md=))
SEEALSO	=	$(subst md/,see_also/,$(MD))
HTML	=	$(subst md/,html/,$(MD:.md=.html))
SVG	=	$(subst md/,www-data/,$(MD:.md=.svg))
HTML	=	$(subst md/,www-data/,$(MD:.md=.html))

all: $(HTML) html/graph.svg $(SEEALSO)
all: $(HTML) $(SVG) www-data/graph.svg

html/%.html: md/%.md see_also/%.md | html/colors.css html
www-data/%.html: md/%.md | www-data/colors.css www-data
> @pandoc	--filter tools/pf-filter.py \
		-H tools/header.html \
		--template tools/template.html \
		--mathjax -f markdown \
		tools/latex-includes.yaml \
		$^ -o $@ &
		$^ <(tools/get see_also $<) \
		-o $@ &
> @printf '$@\n'
html/graph.svg: $(GRAPH) | html
> dot -Tsvg -o $@ <(./tools/generate-graph.sh)
html/colors.css: | html
www-data/colors.css: | www-data
> ./tools/get bg_css >$@

see_also/%.md: graph/% | see_also
> @tools/get see_also $(^F)>$@
www-data/%.svg: graph/% | www-data
> dot -Tsvg -o $@ <(./tools/generate-local-graph.sh $<)
www-data/graph.svg: $(GRAPH) | www-data
> dot -Tsvg -o $@ <(./tools/generate-graph.sh)

graph/%: md/%.md | graph
> @tools/get graph $(^F)>$@

html see_also graph:
www-data graph:
> @mkdir -p $@

> rm -rf html graph see_also
> rm -rf www-data graph

re: clean all

A md/ammonia-maser.md => md/ammonia-maser.md +66 -0
@@ 0,0 1,66 @@
title: the ammonia maser
type: model
sources: FLP3.9

![two base states of the ammonia molecule (source: FLP 3, fig 9-1)](../img/flp3-9-1.svg)

### Experimental data

In order to excite an electron inside an atom, it requires photons in the optical to ultraviolet range. In order to excite the vibrations on the molecules, it involves photons in the infrared. As for exciting rotations, it involves light in the far infrared. But the energy split $2A$ is much lower, we find experimentally that we can trigger this energy gap with microwave radiation, $2A\approx 10^{-4}\text{eV}$.

### Model

The geometry of the ammonia molecule $NH3$ is a tetrahedron, in this configuration, the hydrogen triangle can be either side of the nitrogren atom. Because of the tunnel effect, we can model the ammonia molecule as a two state system $\ket{\Psi}=C_L\ket{L}+C_R\ket{R}$.

Because of the symmetry of the system, we can write the [Hamiltonian](hamiltonian-operator.md) in the $L,R$ basis

$$ \qop{H}=\begin{pmatrix} E& -A\\ -A& E \end{pmatrix} $$

where $A$ represent the probability for the molecule to flip between the two states. If the potential barrier between the two sides were infinite, we would have $A=0$, no chance for the molecule to flip states.

## The states of the ammonia molecule

To find the eigenvalues (energies) we diagonalize the Hamiltonian matrix.

\lambda_\pm&=E\pm A

We find that the 2 energy levels of our model are $E\pm A$, i.e. they are seperated by an energy $2A$.

Let us now find the first eigenfunction $\ket{+}$ corresponding to energy $E_+=E+A$. We note $\ket{+}=a\ket{L}+b\ket{R}$

\begin{pmatrix} E& -A\\ -A& E \end{pmatrix}

Because the $+$ state has to be normalized we have

$$ \ket{+}=\mfrac{1}{\sqrt{2}}(\ket{L}+\ket{R}) $$

Because $+$ and $-$ are orthogonal states, we must have

$$ \ket{-}=\mfrac{1}{\sqrt{2}}(\ket{L}-\ket{R}) $$

In the diagonal basis, the wave equation $i\hbar\frac{\partial\ket{\Psi}}{\partial t}=\qop{H}\ket{\Psi}$ is trivial to solve

+\bk{-}{\Psi(0)}e^{iAt/\hbar} \ket{-}

The wave function $\Psi$ depends on the initial state of the system $\Psi(0)$. The wave function includes a phase factor $e^{iEt/\hbar}$ which has no physical bearing on the isolated system. Appart from the 2 stationnary states we find that the probability to find the molecule in the $L$ state $\bke{L}{\Psi}{L}$ (or $R$) oscillates with frequency $2A/\hbar$

## TODO: The molecule in a static electric field

A md/central-field.md => md/central-field.md +40 -0
@@ 0,0 1,40 @@
title: central field
type: model

We saw that we can reduce a [two body problem](two-body-problem.md) into a system of one particle and a potential $U(r)$ that only depends on the distance $r$ from some fixed point. This is called a central field.

This potential generates a radial force $\mathbf{F}=-\frac{\partial U(r)}{\partial\mathbf{r}}=-\frac{\dd{U}}{\dd{r}}\frac{\mathbf{r}}{r}$

We have shown that the [angular-momentum](angular-momentum.md) $\mathbf{M}=\mathbf{r}\times\mathbf{p}$ of a system in a central field is conserved. Since $\mathbf{M}$ is perpendicular to $r$, the constancy of $\mathbf{M}$ show that the radius vector $\mathbf{r}$ must remain must remain in the plane perpendicular to $\mathbf{M}$.

We use polar coordinates $r,\phi$ to describe the Lagrangian in this plane

$$ \lltag{1}{14.1} L=\mfrac{1}{2}m(\dot{r}^2+r^2\dot{\phi^2})-U(r) $$

As this function does not have the co-ordinate $\phi$ explicitly (Lagrangian is cyclic in $\phi$), we can greatly simplify the problem by using Lagrange's equation $(\dd{}/\dd{t})\partial L/\partial \dot{\phi}=\partial L/\partial \phi=0$, thus we get the conservation of the angular momentum by differentiating $L$ with respect to $\dot{\phi}$.

$$ \lltag{1}{14.2} \frac{\partial L}{\partial \dot{\phi}}=mr^2\dot{\phi}=\text{constant} (=M_z=p_\phi)$$

We know from polar coordinates that $\dd{A}=\mfrac{1}{2}\mathbf{r}^2\dd{\phi}$ is the area element of the trajectory. We can write this as

$$ \lltag{1}{14.3} 2m\dd{A}=M\dd{t} $$

in other words, in equal times the radius vector of the particle sweeps out equal areas (Kepler's second law).

To find the laws of motion, we start from the conservation of energy

$$ \lltag{1}{14.4} E=\mfrac{1}{2}m(\dot{r}^2+r^2\dot{\phi^2})+U(r)=\mfrac{1}{2}m\dot{r}^2+\mfrac{1}{2}M^2/mr^2+U(r)$$

we rewrite this as

$$ \lltag{1}{14.5} \dot{\mathbf{r}}=\frac{\dd{r}}{\dd{t}}=\sqrt{\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}} $$

by integrating

$$ \lltag{1}{14.6} t=\int\dd{r}\left(\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}\right)^{-1/2}+\text{constant} $$

writing $(14.2)$ as $\dd{\phi}=\frac{M}{mr^2}\dd{t}$ we also find

$$ \lltag[LL1]{14.7} \phi=\int\frac{M\dd{r}/r^2}{\sqrt{\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}}}+\text{constant} $$

M md/hamiltonian-operator.md => md/hamiltonian-operator.md +4 -4
@@ 1,5 1,5 @@
title: the hamiltonian operator
title: the Hamiltonian operator
type: object

@@ 7,7 7,7 @@ The [wave function](wave-function.md) completely determines the system, and also

$$ i\partial\Psi/\partial t=\qop{L}\Psi $$

We can derive some properties for $\qop{L}$, since the integral $\int\Psi^*\Psi\dd{q}$ is a constant independant of time we have
We can derive some properties for $\qop{L}$, since the integral $\bk{\Psi}{\Psi}=\int\Psi^*\Psi\dd{q}$ is a constant independant of time we have

$$ \frac{\dd{}}{\dd{t}}\int|\Psi|^2\dd{q}=
\int\Psi\frac{\partial\Psi^*}{\partial t}\dd{q}+

@@ 31,8 31,8 @@ Comparing this to the definition $\partial\Psi/\partial t=-i\qop{L}\Psi$ we have

As we know from classical mechanics, the derivative $-\partial S/\partial t$ is just Hamilton's function $H$ for a mechanical system. In quantum mechanics we call this the Hamiltonian [operator](quantum-operator.md), or the Hamiltonian of a system.

$$ \lltag{3}{8.1} i\hbar\partial\Psi/\partial t=\qop{H}\Psi $$
$$ \lltag{3}{8.1} i\hbar\frac{\partial\Psi}{\partial t}=\qop{H}\Psi $$

If the form of the Hamiltonian is known, equatio $(8.1)$ determines the wave function of the physical system concerned. This fundamental equation of quantum mechanics is called the wave equation.
If the form of the Hamiltonian is known, equation $(8.1)$ determines the wave function of the physical system concerned. This fundamental equation of quantum mechanics is called the wave equation.

A md/keplers-problem.md => md/keplers-problem.md +7 -0
@@ 0,0 1,7 @@
title: Kepler's problem
type: model

hello [central field](central-field.md)
TODO LL1 p15

D md/lexicon.md => md/lexicon.md +0 -9
@@ 1,9 0,0 @@
title: lexicon

degrees of freedom: the number of co-ordinates needed to _completely_ define the position of a system.  
generalised co-ordinates: Any $s$ quantities $q_1, q_2, ..., q_s$ which completely define the system the position of a system are  
generalised velocities: The derivatives $\dot{q}_1, \dot{q}_2, ..., \dot{q}_s$ of the _generalised co-ordinates_   
particle: a body whose dimension is neglected.  
rigid body: system of [particles](particle.md) such that the distances between the particles does not vary.  

M md/mechanical-system.md => md/mechanical-system.md +0 -1
@@ 13,7 13,6 @@ $$ m\dot{\mathbf{v}}=-\partial U/\partial \mathbf{r} $$
$$ U=-\mathbf{F}\cdot\mathbf{r} $$

## Assumption
 - [The Principle of Least Action](principle-of-least-action.md)
 - [Galileo's Relativity](galileo-relativity.md)

## Model

A md/momentum-operator.md => md/momentum-operator.md +140 -0
@@ 0,0 1,140 @@
title: the momentum operator
type: object

Considering a system of particles not in an external field. The system should behave the same if we make an identical parallel displacement of each particle.

$$ \psi(r_1+\delta r,r_2+\delta r,...)=\psi(r_1,r_2,...)+\delta r\sum_a \nabla_a\psi $$

The expresion $\qop{O}=1+\delta r\sum_a\nabla_a$ can be regarded as the "infinitely small displacement" operator. This sdisplacement should not change the [Hamiltonian operator](hamiltonian-operator.md), by this we mean that the order of application doesn't matter

$$ \qop{H}\qop{O}-\qop{O}\qop{H}=0 $$

Since the unit operator and the multiplication by $\delta r$ both commute with $\qop{H}$ we are left with

$$ \lltag{3}{15.1} (\sum_a\nabla_a)\qop{H}-\qop{H}(\sum_a\nabla_a)=0 $$

As we know the commutation with $\qop{H}$ mean that the corresponding physical quantity is conserved. The conserved quantity that follows from the homogoneity of space is the momentum $p$.

The operator $\nabla_a$ must then be proportional to the momentum of the $a^{th}$ particle. We find the constatnt of proportionality by passing to the limit of classical mechanics and putting $\qop{p}=c\nabla$ and using $(6.1)$

$$ \qop{p}\Psi=(i/\hbar)cae^{(i/\hbar)S}\nabla S=c(i/\hbar)\Psi\nabla S $$

We know from classical mechanics that $p=\nabla S$. Therefore $c=-i\hbar$. Thus we have the momentum operator $\qop{p}=-i\hbar\nabla$, or in components

$$ \lltag{3}{15.2}
\qop{p}_x=i\hbar\partial/\partial x,\qquad
\qop{p}_y=i\hbar\partial/\partial y,\qquad
\qop{p}_z=i\hbar\partial/\partial z

We note that these operators are Hermitian, as they should be, as they represent real physical quantities. For arbitrary function $\psi(x)$ and $\phi(x)$ which vanish at inifity, we have

$$ \int\phi\qop{p}_x\psi\dd{x}=\int\phi\frac{\partial\psi}{\partial x}\dd{x}=\int\psi\frac{\partial\phi}{\partial x}\dd{x}=\int\psi\qop[*]{p}_x\phi\dd{x} $$

and this is the condition that the operator should be Hermitian.

Since differentiating with respect to two different variables is independant of order, it is clear that the operators commute with one another.

$$ \lltag{3}{15.3}

This means that all 3 components can have definite values simultaneously, which means the momentum $\v{p}$ can have a definite direction and amplitude.

To find the eigenfunctions and eigenvalues of the momentum operators we have to solve

$$ \lltag{3}{15.4}
-i\hbar\partial\psi/\partial x=p_x\psi,\qquad
-i\hbar\partial\psi/\partial y=p_y\psi,\qquad
-i\hbar\partial\psi/\partial z=p_z\psi

The solution to the first equation is 

$$ \psi=f(y,z)e^{(i/\hbar)p_xx} $$

Thus the eigenvalues form a continuous spectrum from $-\infty$ to $+\infty$.

There is a common solution to all three equations, which correspond to a state where the momentum $\v{p}$ is entirely defined.

$$ \lltag{3}{15.5} \psi=Ce^{(i/\hbar)\v{p}\cdot\v{r}} $$

This is a completely determined wave function, therefore the momentum $\v{p}=(p_x,p_y,p_z)$ forms a complete basis. Let us now find the normalization factor $C$. The rule for normalization is

$$ \lltag{3}{15.6} \int\Psi_{p'}^*\Psi_p\dd{v}=\delta(\v{p'}-\v{p}) $$

The integration can be effected with the formula

$$ \lltag{3}{15.7} \mfrac{1}{\tau}\int_{-\infty}^{+\infty}e^{i\alpha x}\dd{x}=\delta(\alpha) $$

We have

	\int\Psi_{p'}^*\Psi_p\dd{V}&=C^2\int e^{(i/\hbar)(\v{p'}-\v{p})\v{r}}\dd{V}\\

Therefore we mut have $C^2h^3=1$. Thus the normalized eigenfunction $\psi_p$ is

$$ \lltag{3}{15.8} \psi=h^{-3/2}e^{i\tau(\v{p}\cdot\v{r}/h)} $$

We can expand any wave function $\psi(\v{r})$ in terms of the eigenfunctions $\psi_\v{p}$, as a Fourier integral

$$ \lltag{3}{15.9} \psi(\v{r})=
\int a(\v{p})\psi_\v{p}(\v{r})\dd[3]{p}=
\int a(\v{p})e^{i\tau(\v{p}\cdot\v{r}/h)}\dd[3]{p}

(where $\dd[3]{p}=\dd{p_x}\dd{p_y}\dd{p_z}$). The expansion coefficients $a(\v{p})$ are, according to formula $(5.3)$

$$ \lltag{3}{15.10} a(\v{p})=
\int \psi(\v{r})\psi_\v{p}^*(\v{r})\dd{V}=

The function $a(\v{p})$ can be regarded as the wave function in the $\v{p}$ representation. $|a(\v{p})|^2\dd[3]{p}$ is the probability that the momentum $\v{p}$ has a value in the interval $\dd[3]{p}$.

## The position operator $\qop{\mathbf{r}}$

TODO 15.11 and 15.12

## Uncertainty relations

Let us now derive the commutation rules for the operators we have found. Since partial differentation of one cartesian variable doesn't affect the others, we have directly the commutation rule

$$ \lltag{3}{16.1}

For the commutation of $\qop{p}_x$ and $x$ we write

(\qop{p}_xx-x\qop{p}_x)\psi&=-i\hbar(\partial(x\psi)/\partial x)+i\hbar x\partial\psi/\partial x\\

We find that the commutator reduces to a multiplication by $-i\hbar$, the same is true for $y$ and $z$

$$ \lltag{3}{16.2}

or they can be rewritten in the form

$$ \lltag{3}{16.3} \qop{p}_ik-k\qop{p}_i=-i\hbar\delta_{ki}\qquad(i,k=x,y,z) $$

These relations show that the co-ordinate of a particle can have a definite value at the same time as the components of the momentum along the other two axes. However, the components of co-ordinate and momentum along th same axis cannot exists simultaneously. 

Let us suppose a particle has a definite momentum $\mathbf{p}_0$, mathematically, the wave function has the form $\psi=u(\mathbf{r})e^{(i/\hbar)\mathbf{r}\cdot\mathbf{p}_0}$, where $u(\mathbf{r}). Let us suppose that the particle is in a finite region of space, whose dimensions is of the order of magnitude $\Delta x, \Delta y, \Delta z$, so that $u(\mathbf{r})$ only differs significantly from 0 inside this volume.

TODO 16.6 -> 16.11

M md/two-body-problem.md => md/two-body-problem.md +1 -1
@@ 1,6 1,6 @@
type: model
title: two body problem
type: model

$$\tag{13.1} L=\frac{1}{2}m\dot{\mathbf{r}}_1+\frac{1}{2}m\dot{\mathbf{r}}_2-U(|\mathbf{r}_1-\mathbf{r}_2|) $$

M tools/generate-graph.sh => tools/generate-graph.sh +5 -3
@@ 6,17 6,19 @@ generate_one_node() {
    node=$(basename ${1%.md})
    [ "$($GET type $node)" == "problem" ] && return
    $GET link_to $node
    $GET graph_node $node
    title=$($GET title $node)
    [ -f graph/$node ] && for line in $(cat graph/$node); do
	printf  '    "%s" -> "%s"' "$($GET title $line)" "$title"
	printf  '    "%s" -> "%s"\n' "$($GET title $line)" "$title"

echo 'digraph {'
echo '    bgcolor="#ffffff00"'
echo '    node  [style="rounded,filled", shape=box]'
echo '    rankdir=LR'
echo '    rankdir=RL'

# for node in md/*.md; do generate_one_node $node& done; wait
for node in md/*.md; do generate_one_node $node& done; wait

echo "}"

A tools/generate-local-graph.sh => tools/generate-local-graph.sh +26 -0
@@ 0,0 1,26 @@


echo 'digraph {'
echo '    bgcolor="#ffffff00"'
echo '    node  [style="rounded,filled", shape=box]'
echo '    rankdir=LR'

node=$(basename ${1%.md})
$GET graph_node $node
centre_title=$($GET title $node)

[ -f graph/$node ] && for line in $(cat graph/$node); do
    title=$($GET title $line)
    $GET graph_node $line
    printf  '    "%s" -> "%s"\n' "$title" "$centre_title"

for line in $(grep -oP '\(\K[^ ]*(?=\.md\))' md/$node.md | sort | uniq); do
    title=$($GET title $line)
    $GET graph_node $line
    printf  '    "%s" -> "%s"\n' "$centre_title" "$title"

echo "}"

M tools/get => tools/get +8 -3
@@ 10,13 10,18 @@ _or_default() { grep ^ || echo DEFAULT; }
title() { awk -F': ' '/title: / {print $2}' md/$1.md | _or_default; }
type() { awk -F': ' '/type: / {print $2}' md/$1.md | _or_default; }
color() { printf "${colors[$(type $1)]}"; }
link_to() { printf '    "%s"[href="../html/%s.html", fillcolor="%s"]\n' "$(title $1)" "$1" "$(color $1)"; }
graph() { grep $1.md md/*.md | awk -F: '{print $1}' | uniq | sed s:md/::g | sed s:.md::g | grep -v lexicon || true; }
see_also() { [ -s graph/$1 ] && echo '## See also'; awk '{printf "- [%s](%s.html)\n", $1, $1;}' graph/$1; }
graph_node() { printf '    "%s"[href="%s.html", target="_parent", fillcolor="%s"]\n' "$(title $1)" "$1" "$(color $1)"; }
graph() { grep "($1.md)" md/*.md | awk -F: '{print $1}' | uniq | sed s:md/::g | sed s:.md::g | grep -v lexicon || true; }
bg_css() {
    for type in ${!colors[@]}; do
	    echo ".$type{ background-color: ${colors[$type]}; }"
see_also() {
    cat <<-EOF
<h3>See also</h3>
<center><object data=${1}.svg type=image/svg+xml></object></center>

$1 $(basename ${2%.md})

M tools/header.html => tools/header.html +0 -1
@@ 1,5 1,4 @@
<link rel="stylesheet" type="text/css" href="colors.css">
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
body {
  display: block;

M tools/latex-includes.yaml => tools/latex-includes.yaml +9 -3
@@ 1,11 1,17 @@
header-includes: |
  \newcommand{\bra}[1]{\left< #1 \right|}
  \newcommand{\ket}[1]{\left| #1 \right>}
  \newcommand{\bk}[2]{\left< #1 \middle| #2 \right>}
  \newcommand{\bke}[3]{\left< #1 \middle| #2 \middle| #3 \right>}

  \newcommand{\lltag}[2]{\tag*{LL#1 (#2)}}