~jzck/physics-notes

5b29759b7ac8740794270f53346cb9a4fb3b8654 — Jack Halford 1 year, 23 days ago 7c24751
equation loading in codeblocks
116 files changed, 564 insertions(+), 218 deletions(-)

M Makefile
A formularies/LL1/13.1.tex
A formularies/LL1/13.2.tex
A formularies/LL1/13.3.tex
A formularies/LL1/13.4.tex
A formularies/LL1/14.1.tex
A formularies/LL1/14.2.tex
A formularies/LL1/14.3.tex
A formularies/LL1/14.4.tex
A formularies/LL1/14.5.tex
A formularies/LL1/14.6.tex
A formularies/LL1/14.7.tex
A formularies/LL1/2.1.tex
A formularies/LL1/2.2.tex
A formularies/LL1/2.3.tex
A formularies/LL1/2.4.tex
A formularies/LL1/2.5.tex
A formularies/LL1/2.6.tex
A formularies/LL1/2.7.tex
A formularies/LL1/2.8.tex
A formularies/LL1/31.1.tex
A formularies/LL1/31.2.tex
A formularies/LL1/32.1.tex
A formularies/LL1/32.10.tex
A formularies/LL1/32.11.tex
A formularies/LL1/32.12.tex
A formularies/LL1/32.2.tex
A formularies/LL1/32.3.tex
A formularies/LL1/32.4.tex
A formularies/LL1/32.5.tex
A formularies/LL1/32.6.tex
A formularies/LL1/32.7.tex
A formularies/LL1/32.8.tex
A formularies/LL1/32.9.tex
A formularies/LL1/4.1.tex
A formularies/LL1/4.2.tex
A formularies/LL1/4.3.tex
A formularies/LL1/4.4.tex
A formularies/LL1/4.5.tex
A formularies/LL1/4.6.tex
A formularies/LL1/6.1.tex
A formularies/LL1/6.2.tex
A formularies/LL1/6.3.tex
A formularies/LL3/15.1.tex
A formularies/LL3/15.10.tex
A formularies/LL3/15.2.tex
A formularies/LL3/15.3.tex
A formularies/LL3/15.4.tex
A formularies/LL3/15.5.tex
A formularies/LL3/15.6.tex
A formularies/LL3/15.7.tex
A formularies/LL3/15.8.tex
A formularies/LL3/15.9.tex
A formularies/LL3/16.1.tex
A formularies/LL3/16.2.tex
A formularies/LL3/16.3.tex
A formularies/LL3/2.1.tex
A formularies/LL3/2.2.tex
A formularies/LL3/2.3.tex
A formularies/LL3/2.4.tex
A formularies/LL3/3.1.tex
A formularies/LL3/3.10.tex
A formularies/LL3/3.11.tex
A formularies/LL3/3.12.tex
A formularies/LL3/3.13.tex
A formularies/LL3/3.14.tex
A formularies/LL3/3.15.tex
A formularies/LL3/3.16.tex
A formularies/LL3/3.2.tex
A formularies/LL3/3.3.tex
A formularies/LL3/3.4.tex
A formularies/LL3/3.5.tex
A formularies/LL3/3.6.tex
A formularies/LL3/3.7.tex
A formularies/LL3/3.8.tex
A formularies/LL3/3.9.tex
A formularies/LL3/4.1.tex
A formularies/LL3/4.2.tex
A formularies/LL3/4.3.tex
A formularies/LL3/4.4.tex
A formularies/LL3/4.5.tex
A formularies/LL3/4.6.tex
A formularies/LL3/4.7.tex
A formularies/LL3/4.8.tex
A formularies/LL3/5.1.tex
A formularies/LL3/5.11.tex
A formularies/LL3/5.12.tex
A formularies/LL3/5.2.tex
A formularies/LL3/5.3.tex
A formularies/LL3/5.4.tex
A formularies/LL3/6.1.tex
A formularies/LL3/8.1.tex
A formularies/LL3/9.1.tex
A formularies/LL3/9.2.tex
A formularies/Makefile
M md/ammonia-maser.md
M md/central-field.md
M md/energy.md
M md/erf.md
M md/hamiltonian-operator.md
M md/inertia-tensor.md
M md/lagrangian.md
A md/lhopital.md
M md/momentum-operator.md
M md/particle.md
M md/quantum-operator.md
M md/rigid-body.md
M md/scattering.md
M md/two-body-problem.md
M md/wave-function.md
M tools/get
R tools/{latex-includes.yaml => math.tex}
M tools/pf-filter.py
M tools/style.css
M tools/template.html
A tools/tex_to_html.sh
M Makefile => Makefile +15 -8
@@ 6,27 6,34 @@ SHELL := bash
MD	=	$(shell ls -1 md/*.md)
GRAPH	=	$(subst md/,graph/,$(MD:.md=))
SVG	=	$(subst md/,www-data/,$(MD:.md=.svg))
TEX	=	$(subst md/,www-data/,$(MD:.md=.tex))
HTML	=	$(subst md/,www-data/,$(MD:.md=.html)) www-data/index.html www-data/style.css

all: $(HTML) $(SVG) www-data/graph.svg
form:
> $(MAKE) -f formularies/Makefile

www-data/%.html: md/%.md | www-data/colors.css www-data
> @pandoc	--filter tools/pf-filter.py \
www-data/%.html: md/%.md | www-data/colors.css www-data form
> @printf '$@\n'
> pandoc	-s --filter tools/pf-filter.py \
		-H tools/header.html \
		--template tools/template.html \
		--mathjax -f markdown \
		tools/latex-includes.yaml \
		$^ <(tools/get see_also $<) \
		--resource-path .:formularies \
		-V type:$(shell tools/get type $<) \
		-V slug:$(shell tools/get slug $<) \
		tools/math.tex \
		$< \
		-o $@ &
> @printf '$@\n'

www-data/index.html: | www-data
> cp tools/index.html $@
www-data/style.css: | www-data
www-data/style.css: tools/style.css | www-data
> cp tools/style.css $@
www-data/colors.css: | www-data
> ./tools/get bg_css >$@
www-data/%.svg: graph/% | www-data
> dot -Tsvg -o $@ <(./tools/generate-local-graph.sh $<)
> dot -Tsvg -o $@ <(./tools/generate-local-graph.sh $<) &
www-data/graph.svg: $(GRAPH) | www-data
> dot -Tsvg -o $@ <(./tools/generate-graph.sh)



@@ 41,4 48,4 @@ clean:

re: clean all

.PHONY: clean all re
.PHONY: clean all re form

A formularies/LL1/13.1.tex => formularies/LL1/13.1.tex +1 -0
@@ 0,0 1,1 @@
L=\frac{1}{2}m_1\dot{\mathbf{r}}_1+\frac{1}{2}m_2\dot{\mathbf{r}}_2-U(|\mathbf{r}_1-\mathbf{r}_2|)

A formularies/LL1/13.2.tex => formularies/LL1/13.2.tex +1 -0
@@ 0,0 1,1 @@
\mathbf{r}_1=m_2\mathbf{r}/(m_1+m_2),\qquad \mathbf{r}_2=-m_1\mathbf{r}/(m_1+m_2),\qquad

A formularies/LL1/13.3.tex => formularies/LL1/13.3.tex +1 -0
@@ 0,0 1,1 @@
L=\frac{1}{2}m\dot{\mathbf{r}}^2-U(r)

A formularies/LL1/13.4.tex => formularies/LL1/13.4.tex +1 -0
@@ 0,0 1,1 @@
m=m_1m_2/(m_1+m_2)

A formularies/LL1/14.1.tex => formularies/LL1/14.1.tex +1 -0
@@ 0,0 1,1 @@
L=\mfrac{1}{2}m(\dot{r}^2+r^2\dot{\phi^2})-U(r)

A formularies/LL1/14.2.tex => formularies/LL1/14.2.tex +1 -0
@@ 0,0 1,1 @@
\frac{\partial L}{\partial \dot{\phi}}=mr^2\dot{\phi}=\text{constant} (=M_z=p_\phi)

A formularies/LL1/14.3.tex => formularies/LL1/14.3.tex +1 -0
@@ 0,0 1,1 @@
2m\dd{A}=M\dd{t}

A formularies/LL1/14.4.tex => formularies/LL1/14.4.tex +1 -0
@@ 0,0 1,1 @@
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)

A formularies/LL1/14.5.tex => formularies/LL1/14.5.tex +1 -0
@@ 0,0 1,1 @@
\dot{\mathbf{r}}=\frac{\dd{r}}{\dd{t}}=\sqrt{\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}}

A formularies/LL1/14.6.tex => formularies/LL1/14.6.tex +1 -0
@@ 0,0 1,1 @@
t=\int\dd{r}\left(\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}\right)^{-1/2}+\text{constant}

A formularies/LL1/14.7.tex => formularies/LL1/14.7.tex +1 -0
@@ 0,0 1,1 @@
\phi=\int\frac{M\dd{r}/r^2}{\sqrt{\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}}}+\text{constant}

A formularies/LL1/2.1.tex => formularies/LL1/2.1.tex +1 -0
@@ 0,0 1,1 @@
S=\int_{t_1}^{t_2}L(q,\dot{q},t)\dd{t}

A formularies/LL1/2.2.tex => formularies/LL1/2.2.tex +1 -0
@@ 0,0 1,1 @@
q(t)+\delta q(t)

A formularies/LL1/2.3.tex => formularies/LL1/2.3.tex +1 -0
@@ 0,0 1,1 @@
\delta q(t_1)=\delta q(t_2) = 0

A formularies/LL1/2.4.tex => formularies/LL1/2.4.tex +1 -0
@@ 0,0 1,1 @@
\delta S=\delta \int_{t_1}^{t_2}L(q,\dot{q},t)\dd{t}=0

A formularies/LL1/2.5.tex => formularies/LL1/2.5.tex +1 -0
@@ 0,0 1,1 @@
\delta S=\left[\frac{\partial L}{\partial \dot{q}}\delta q\right]_{t_1}^{t_2}+\int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}-\frac{\dd{}}{\dd{t}}\frac{\partial L}{\partial \dot{q}}\right)\delta q \dd{t}=0

A formularies/LL1/2.6.tex => formularies/LL1/2.6.tex +1 -0
@@ 0,0 1,1 @@
\frac{\dd{}}{\dd{t}}\frac{\partial L}{\partial \dot{q_i}}-\frac{\partial L}{\partial q_i}=0\qquad(i=1,2,...,s)

A formularies/LL1/2.7.tex => formularies/LL1/2.7.tex +1 -0
@@ 0,0 1,1 @@
\lim L=L_A+L_B

A formularies/LL1/2.8.tex => formularies/LL1/2.8.tex +1 -0
@@ 0,0 1,1 @@
L'(q,\dot{q},t)=L(q,\dot{q},t)+\frac{\dd{}}{\dd{t}}f(q,t)

A formularies/LL1/31.1.tex => formularies/LL1/31.1.tex +3 -0
@@ 0,0 1,3 @@
\dd{\mathfrak{r}}/\dd{t}=\mathbf{v},\quad
\dd{\mathbf{R}}/\dd{t}=\mathbf{V},\quad
\dd{\mathbf{\phi}}/\dd{t}=\mathbf{\Omega}

A formularies/LL1/31.2.tex => formularies/LL1/31.2.tex +1 -0
@@ 0,0 1,1 @@
\mathbf{v}=\mathbf{V}+\mathbf{\Omega}\times\mathbf{r}

A formularies/LL1/32.1.tex => formularies/LL1/32.1.tex +1 -0
@@ 0,0 1,1 @@
T=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}\sum m\left[\Omega^2r^2-(\mathbf{\Omega}\cdot\mathbf{r})^2\right]

A formularies/LL1/32.10.tex => formularies/LL1/32.10.tex +1 -0
@@ 0,0 1,1 @@
I_3=I_1+I_2

A formularies/LL1/32.11.tex => formularies/LL1/32.11.tex +1 -0
@@ 0,0 1,1 @@
I_1=I_2=\sum m{x_3}^2,\quad I_3=0

A formularies/LL1/32.12.tex => formularies/LL1/32.12.tex +1 -0
@@ 0,0 1,1 @@
I'_{ik}=I_{ik}+\mu\left(a^2\delta_{ik}-a_ia_k\right)

A formularies/LL1/32.2.tex => formularies/LL1/32.2.tex +1 -0
@@ 0,0 1,1 @@
I_{ik}=\sum m\left(x_l^2\delta_{ik}-x_ix_k\right)

A formularies/LL1/32.3.tex => formularies/LL1/32.3.tex +1 -0
@@ 0,0 1,1 @@
T=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}I_{ik}\Omega_i\Omega_k

A formularies/LL1/32.4.tex => formularies/LL1/32.4.tex +1 -0
@@ 0,0 1,1 @@
L=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}I_{ik}\Omega_i\Omega_k-U

A formularies/LL1/32.5.tex => formularies/LL1/32.5.tex +1 -0
@@ 0,0 1,1 @@
I_{ik}=I_{ki}

A formularies/LL1/32.6.tex => formularies/LL1/32.6.tex +5 -0
@@ 0,0 1,5 @@
I_{ik}=\left[\begin{matrix}
	    \sum m(y^2+z^2) & -\sum mxy & -\sum mxz\\
	    -\sum mxy & \sum m(x^2+z^2) & -\sum myz\\
	    -\sum mxz & -\sum myz & \sum m(x^2+y^2)\\
\end{matrix}\right]

A formularies/LL1/32.7.tex => formularies/LL1/32.7.tex +1 -0
@@ 0,0 1,1 @@
I_{ik}=\int \rho\left(x_l^2\delta_{ik}-x_ix_k\right)\dd{V}

A formularies/LL1/32.8.tex => formularies/LL1/32.8.tex +1 -0
@@ 0,0 1,1 @@
T_\text{rot}=\mfrac{1}{2}\left(I_1\Omega_1^2+I_2\Omega_2^2+I_3\Omega_3^2\right)

A formularies/LL1/32.9.tex => formularies/LL1/32.9.tex +1 -0
@@ 0,0 1,1 @@
I_1+I_2=\sum m(x_1^2+x_2^2+2x_3^2) \geq \sum m(x_1^2+x_2^2)=I_3

A formularies/LL1/4.1.tex => formularies/LL1/4.1.tex +1 -0
@@ 0,0 1,1 @@
L=\frac{1}{2}mv^2

A formularies/LL1/4.2.tex => formularies/LL1/4.2.tex +1 -0
@@ 0,0 1,1 @@
L=\sum\frac{1}{2}m_av_a^2

A formularies/LL1/4.3.tex => formularies/LL1/4.3.tex +1 -0
@@ 0,0 1,1 @@
v=(\dd{l}/\dd{t})^2=(\dd{l})^2/(\dd{t})^2

A formularies/LL1/4.4.tex => formularies/LL1/4.4.tex +1 -0
@@ 0,0 1,1 @@
\dd{l}^2=\frac{1}{2}(\dot{x}^2+\dot{y}^2+\dot{z}^2)

A formularies/LL1/4.5.tex => formularies/LL1/4.5.tex +1 -0
@@ 0,0 1,1 @@
\dd{l}^2=\frac{1}{2}(\dot{r}^2+r^2\dot{\phi}^2+\dot{z}^2)

A formularies/LL1/4.6.tex => formularies/LL1/4.6.tex +1 -0
@@ 0,0 1,1 @@
\dd{l}^2=\frac{1}{2}(\dot{r}^2+r^2\dot{\theta}^2+r^2\dot{\phi}^2\sin^2\theta)

A formularies/LL1/6.1.tex => formularies/LL1/6.1.tex +1 -0
@@ 0,0 1,1 @@
E\equiv\sum_i\dot{q_i}\frac{\partial L}{\partial \dot{q_i}}-L

A formularies/LL1/6.2.tex => formularies/LL1/6.2.tex +1 -0
@@ 0,0 1,1 @@
E=T(q,\dot{q})+U(q)

A formularies/LL1/6.3.tex => formularies/LL1/6.3.tex +1 -0
@@ 0,0 1,1 @@
E=\sum_a\frac{1}{2}m_av_a^2+U(\mathbf{r}_1,\mathbf{r}_2,\ldots)

A formularies/LL3/15.1.tex => formularies/LL3/15.1.tex +1 -0
@@ 0,0 1,1 @@
(\sum_a\nabla_a)\qop{H}-\qop{H}(\sum_a\nabla_a)=0

A formularies/LL3/15.10.tex => formularies/LL3/15.10.tex +3 -0
@@ 0,0 1,3 @@
a(\v{p})=
\int \psi(\v{r})\psi_\v{p}^*(\v{r})\dd{V}=
h^{-3/2}\int\psi(\v{r})e^{i\tau(\v{p}\cdot\v{r}/h)}\dd{V}

A formularies/LL3/15.2.tex => formularies/LL3/15.2.tex +3 -0
@@ 0,0 1,3 @@
\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

A formularies/LL3/15.3.tex => formularies/LL3/15.3.tex +3 -0
@@ 0,0 1,3 @@
\qop{p}_x\qop{p}y-\qop{p}_y\qop{p}x=0,\qquad
\qop{p}_x\qop{p}z-\qop{p}_z\qop{p}x=0,\qquad
\qop{p}_y\qop{p}z-\qop{p}_z\qop{p}y=0

A formularies/LL3/15.4.tex => formularies/LL3/15.4.tex +3 -0
@@ 0,0 1,3 @@
-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

A formularies/LL3/15.5.tex => formularies/LL3/15.5.tex +1 -0
@@ 0,0 1,1 @@
\psi=Ce^{(i/\hbar)\v{p}\cdot\v{r}}

A formularies/LL3/15.6.tex => formularies/LL3/15.6.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi_{p'}^*\Psi_p\dd{v}=\delta(\v{p'}-\v{p})

A formularies/LL3/15.7.tex => formularies/LL3/15.7.tex +1 -0
@@ 0,0 1,1 @@
\mfrac{1}{\tau}\int_{-\infty}^{+\infty}e^{i\alpha x}\dd{x}=\delta(\alpha)

A formularies/LL3/15.8.tex => formularies/LL3/15.8.tex +1 -0
@@ 0,0 1,1 @@
\psi=h^{-3/2}e^{i\tau(\v{p}\cdot\v{r}/h)}

A formularies/LL3/15.9.tex => formularies/LL3/15.9.tex +3 -0
@@ 0,0 1,3 @@
\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}

A formularies/LL3/16.1.tex => formularies/LL3/16.1.tex +3 -0
@@ 0,0 1,3 @@
\qop{p}_xy-y\qop{p}_x=0,\qquad
\qop{p}_xz-z\qop{p}_x=0,\qquad
\qop{p}_yz-z\qop{p}_y=0

A formularies/LL3/16.2.tex => formularies/LL3/16.2.tex +4 -0
@@ 0,0 1,4 @@
\qop{p}_xx-x\qop{p}_x=
\qop{p}_yy-y\qop{p}_y=
\qop{p}_zz-z\qop{p}_z=
-i\hbar

A formularies/LL3/16.3.tex => formularies/LL3/16.3.tex +1 -0
@@ 0,0 1,1 @@
\qop{p}_ik-k\qop{p}_i=-i\hbar\delta_{ki}\qquad(i,k=x,y,z)

A formularies/LL3/2.1.tex => formularies/LL3/2.1.tex +1 -0
@@ 0,0 1,1 @@
\int\int\Psi(q)\Psi^*(q')\phi(q,q')\dd{q}\dd{q'}

A formularies/LL3/2.2.tex => formularies/LL3/2.2.tex +1 -0
@@ 0,0 1,1 @@
\int|\Psi|^2\dd{q}=1

A formularies/LL3/2.3.tex => formularies/LL3/2.3.tex +1 -0
@@ 0,0 1,1 @@
\Psi_{12}(q_1,q_2)=\Psi_1(q_1)\Psi_2(q_2)

A formularies/LL3/2.4.tex => formularies/LL3/2.4.tex +1 -0
@@ 0,0 1,1 @@
\Psi_{12}(q_1,q_2,t)=\Psi_1(q_1,t)\Psi_2(q_2,t)

A formularies/LL3/3.1.tex => formularies/LL3/3.1.tex +1 -0
@@ 0,0 1,1 @@
\int|\Psi_n|^2\dd{q}=1

A formularies/LL3/3.10.tex => formularies/LL3/3.10.tex +1 -0
@@ 0,0 1,1 @@
(\qop{f}\Psi)=\int K(q,q')\Psi(q')\dd{q}

A formularies/LL3/3.11.tex => formularies/LL3/3.11.tex +1 -0
@@ 0,0 1,1 @@
K(q,q')=\sum_n f_n\Psi_n^*(q')\Psi_n(q)

A formularies/LL3/3.12.tex => formularies/LL3/3.12.tex +1 -0
@@ 0,0 1,1 @@
\qop{f}\Psi=f_n\Psi_n

A formularies/LL3/3.13.tex => formularies/LL3/3.13.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi^*(\qop{f}\Psi)\dd{q}=\int\Psi(\qop[*]{f}\Psi^*)\dd{q}

A formularies/LL3/3.14.tex => formularies/LL3/3.14.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi(\qop{f}\Phi)\dd{q}\equiv\int\Phi(\qop[t]{f}\Psi)\dd{q}

A formularies/LL3/3.15.tex => formularies/LL3/3.15.tex +1 -0
@@ 0,0 1,1 @@
\qop[t]{f}=\qop[*]{f}

A formularies/LL3/3.16.tex => formularies/LL3/3.16.tex +1 -0
@@ 0,0 1,1 @@
\qop[+]{f}=\qop[*t]{f}

A formularies/LL3/3.2.tex => formularies/LL3/3.2.tex +1 -0
@@ 0,0 1,1 @@
\Psi=\sum a_n\Psi_n

A formularies/LL3/3.3.tex => formularies/LL3/3.3.tex +1 -0
@@ 0,0 1,1 @@
\sum_n|a_n|^2=1

A formularies/LL3/3.4.tex => formularies/LL3/3.4.tex +1 -0
@@ 0,0 1,1 @@
\sum_n a_na_n^*=\int\Psi\Psi^*\dd{q}

A formularies/LL3/3.5.tex => formularies/LL3/3.5.tex +1 -0
@@ 0,0 1,1 @@
a_n=\int\Psi\Psi_n^*\dd{q}

A formularies/LL3/3.6.tex => formularies/LL3/3.6.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi_m\Psi_n^*\dd{q}=\delta_{nm}

A formularies/LL3/3.7.tex => formularies/LL3/3.7.tex +1 -0
@@ 0,0 1,1 @@
\overline{f}=\sum_nf_n|a_n|^2

A formularies/LL3/3.8.tex => formularies/LL3/3.8.tex +1 -0
@@ 0,0 1,1 @@
\overline{f}=\int \Psi^*(\qop{f}\Psi)\dd{q}

A formularies/LL3/3.9.tex => formularies/LL3/3.9.tex +1 -0
@@ 0,0 1,1 @@
(\qop{f}\Psi)=\sum_nf_na_n\Psi_n

A formularies/LL3/4.1.tex => formularies/LL3/4.1.tex +1 -0
@@ 0,0 1,1 @@
\overline{f+g}=\overline{f}+\overline{g}

A formularies/LL3/4.2.tex => formularies/LL3/4.2.tex +1 -0
@@ 0,0 1,1 @@
(f+g)_0\geq f_0+g_0

A formularies/LL3/4.3.tex => formularies/LL3/4.3.tex +1 -0
@@ 0,0 1,1 @@
\qop{f}\qop{g}-\qop{g}\qop{f}=0

A formularies/LL3/4.4.tex => formularies/LL3/4.4.tex +1 -0
@@ 0,0 1,1 @@
(\qop{f}\qop{g})^t=\qop[t]{g}\qop[t]{f}

A formularies/LL3/4.5.tex => formularies/LL3/4.5.tex +1 -0
@@ 0,0 1,1 @@
(\qop{f}\qop{g})^+=\qop[+]{g}\qop[+]{f}

A formularies/LL3/4.6.tex => formularies/LL3/4.6.tex +1 -0
@@ 0,0 1,1 @@
\mfrac{1}{2}(\qop{f}\qop{g}+\qop{g}\qop{f})

A formularies/LL3/4.7.tex => formularies/LL3/4.7.tex +1 -0
@@ 0,0 1,1 @@
\{\qop{f},\qop{g}\}=\qop{f}\qop{g}-\qop{g}\qop{f}

A formularies/LL3/4.8.tex => formularies/LL3/4.8.tex +1 -0
@@ 0,0 1,1 @@
\{\qop{f}\qop{g},\qop{h}\}=\{\qop{f},\qop{h}\}\qop{g}-\qop{f}\{\qop{g},\qop{h}\}

A formularies/LL3/5.1.tex => formularies/LL3/5.1.tex +1 -0
@@ 0,0 1,1 @@
\Psi(q)=\int a_f\Psi_f(q)\dd{f}

A formularies/LL3/5.11.tex => formularies/LL3/5.11.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi_f^*(q')\Psi_f(q)\dd{f}=\delta(q-q')

A formularies/LL3/5.12.tex => formularies/LL3/5.12.tex +1 -0
@@ 0,0 1,1 @@
\sum_n\Psi_n^*(q')\Psi_n(q)\dd{f}=\delta(q-q')

A formularies/LL3/5.2.tex => formularies/LL3/5.2.tex +1 -0
@@ 0,0 1,1 @@
\int|a_f|^2\dd{f}=1

A formularies/LL3/5.3.tex => formularies/LL3/5.3.tex +1 -0
@@ 0,0 1,1 @@
a_f=\int\Psi(q)\Psi_f^*(q)\dd{q}

A formularies/LL3/5.4.tex => formularies/LL3/5.4.tex +1 -0
@@ 0,0 1,1 @@
\int\Psi_{f'}\Psi_f^*\dd{q}=\delta(f'-f)

A formularies/LL3/6.1.tex => formularies/LL3/6.1.tex +1 -0
@@ 0,0 1,1 @@
$$ \ptag[LL3]{6.1} \Psi=ae^{iS/\hbar} $$

A formularies/LL3/8.1.tex => formularies/LL3/8.1.tex +1 -0
@@ 0,0 1,1 @@
i\hbar\frac{\partial\Psi}{\partial t}=\qop{H}\Psi

A formularies/LL3/9.1.tex => formularies/LL3/9.1.tex +1 -0
@@ 0,0 1,1 @@
\overline{\dot{f}}=\dot{\overline{f}}

A formularies/LL3/9.2.tex => formularies/LL3/9.2.tex +1 -0
@@ 0,0 1,1 @@
\qop{\dot{f}}=\frac{\partial\qop{f}}{\partial t}+\frac{i}{\hbar}\left(\qop[]{H}\qop{f}-\qop{f}\qop{H}\right)

A formularies/Makefile => formularies/Makefile +14 -0
@@ 0,0 1,14 @@
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.RECIPEPREFIX = >

TEX	=	$(shell ls -1 formularies/*/*.tex)
HTML	=	$(subst formularies/, www-data/,$(TEX:.tex=.html))

all: $(HTML)

www-data/%.html: formularies/%.tex
> @echo $@
> @mkdir -p $(shell dirname $@)
> @tools/tex_to_html.sh $^ > $@

M md/ammonia-maser.md => md/ammonia-maser.md +4 -0
@@ 24,16 24,19 @@ where $A$ represent the probability for the molecule to flip between the two sta

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

$$
\begin{aligned}
\det(H-\lambda\mathbb{1})&=0\\
(E-\lambda)^2&=A^2\\
\lambda_\pm&=E\pm A
\end{aligned}
$$

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{aligned}
\qop{H}\ket{+}&=(E+A)\ket{+}\\
\begin{pmatrix} E& -A\\ -A& E \end{pmatrix}


@@ 42,6 45,7 @@ Let us now find the first eigenfunction $\ket{+}$ corresponding to energy $E_+=E
\begin{pmatrix}a\\b\end{pmatrix}\\
a&=b\\
\end{aligned}
$$

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


M md/central-field.md => md/central-field.md +21 -7
@@ 11,30 11,44 @@ We have shown that the [angular-momentum](angular-momentum.md) $\mathbf{M}=\math

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

$$ \ptag[LL1]{14.1} L=\mfrac{1}{2}m(\dot{r}^2+r^2\dot{\phi^2})-U(r) $$
```eq
LL1/14.1
```

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}$.

$$ \ptag[LL1]{14.2} \frac{\partial L}{\partial \dot{\phi}}=mr^2\dot{\phi}=\text{constant} (=M_z=p_\phi)$$
```eq
LL1/14.2
```

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

$$ \ptag[LL1]{14.3} 2m\dd{A}=M\dd{t} $$
```eq
LL1/14.3
```

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

$$ \ptag[LL1]{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)$$
```eq
LL1/14.4
```

we rewrite this as

$$ \ptag[LL1]{14.5} \dot{\mathbf{r}}=\frac{\dd{r}}{\dd{t}}=\sqrt{\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}} $$
```eq
LL1/14.5
```

by integrating

$$ \ptag[LL1]{14.6} t=\int\dd{r}\left(\frac{2}{m}(E-U(r))-\frac{M^2}{m^2r^2}\right)^{-1/2}+\text{constant} $$
```eq
LL1/14.6
```

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

$$ \ptag[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} $$
```eq
LL1/14.7
```

M md/energy.md => md/energy.md +9 -3
@@ 3,9 3,15 @@ title: energy
type: theory
---

$$\tag{6.1} E\equiv\sum_i\dot{q_i}\frac{\partial L}{\partial \dot{q_i}}-L $$
$$\tag{6.2} E=T(q,\dot{q})+U(q) $$
$$\tag{6.3} E=\sum_a\frac{1}{2}m_av_a^2+U(\mathbf{r}_1,\mathbf{r}_2,\ldots) $$
```eq
LL1/6.1
```
```eq
LL1/6.2
```
```eq
LL1/6.3
```

## Model
 - [Classical mechanics](mechanical-system.md)

M md/erf.md => md/erf.md +1 -38
@@ 1,41 1,4 @@
---
title: exponential response function
title: Exponential response function
type: math
sources: MIT 18.031x
---

## First order ERF

This trick works for finding the solution to $n^{th}$ order ODE with constant factors when the input is of exponential form.

Consider the following $n^th$ order constant factor ODE.

$$ P(D)z=e^{rt} $$

where $P(D)$ is a polynomial of the derivative operator $D$.

because of the property of exponential we have

$$ \tag{1} P(D)e^{rt}=P(r)e^{rt} $$

If $P(D)\neq 0$, by linearity of the operator $P(D)$ we have immediately

$$ P(D)\left(\frac{e^{rt}}{P(r)}\right)=e^{rt} $$

Therefore we have the particular solution to our ODE

$$ z_p=\frac{e^{rt}}{P(r)} $$

## Generalized ERF

When $P(r)=0$ can simply take the derivative of $(1)$ with respect to $r$.

$$ P(D)te^{rt}=P'(r)e^{rt} $$

or more generally if all the $P^{(i<m)}(r)=0$

$$ \tag{2} P(D)t^me^{rt}=P^{(m)}(r)e^{rt} $$

In which case our particular solution is

$$ z_p=\frac{t^{m}e^{rt}}{P^{(m)}(r)} $$

M md/hamiltonian-operator.md => md/hamiltonian-operator.md +5 -5
@@ 21,7 21,7 @@ Since this must hold for an arbitrary $\Psi$, we find that $\qop{L}$ must be Her

$$ \qop[t]{L}=\qop[*]{L} $$

Let us find the classical quantity to which $\qop{L}$ corresponds, we differentiate $(6.1)$
Let us find the classical quantity to which $\qop{L}$ corresponds, we differentiate `LL3/6.1`

$$ \frac{\partial\Psi}{\partial t}=\frac{i}{\hbar}\frac{\partial S}{\partial t}\Psi $$



@@ 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.

$$ \ptag[LL3]{8.1} i\hbar\frac{\partial\Psi}{\partial t}=\qop{H}\Psi $$

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.

```eq
LL3/8.1
```

If the form of the Hamiltonian is known, equation `LL3/8.1` determines the wave function of the physical system concerned. This fundamental equation of quantum mechanics is called the wave equation.

M md/inertia-tensor.md => md/inertia-tensor.md +39 -19
@@ 3,32 3,52 @@ title: inertia tensor
type: theory
---

\begin{equation}\tag{32.1} T=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}\sum m\left[\Omega^2r^2-(\mathbf{\Omega}\cdot\mathbf{r})^2\right] \end{equation}
\begin{equation}\tag{32.2} I_{ik}=\sum m\left(x_l^2\delta_{ik}-x_ix_k\right) \end{equation}
\begin{equation}\tag{32.3} T=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}I_{ik}\Omega_i\Omega_k \end{equation}
\begin{equation}\tag{32.4} L=\mfrac{1}{2}\mu V^2+\mfrac{1}{2}I_{ik}\Omega_i\Omega_k-U \end{equation}
\begin{equation}\tag{32.5} I_{ik}=I_{ki} \end{equation}
\begin{equation}\tag{32.6} I_{ik}=\left[\begin{matrix}
	    \sum m(y^2+z^2) & -\sum mxy & -\sum mxz\\
	    -\sum mxy & \sum m(x^2+z^2) & -\sum myz\\
	    -\sum mxz & -\sum myz & \sum m(x^2+y^2)\\
    \end{matrix}\right]
\end{equation}

\begin{equation}\tag{32.7} I_{ik}=\int \rho\left(x_l^2\delta_{ik}-x_ix_k\right)\dd{V} \end{equation}

\begin{equation}\tag{32.12} I'_{ik}=I_{ik}+\mu\left(a^2\delta_{ik}-a_ia_k\right) \end{equation}
hello
\begin{equation}I_1=I_2=\sum m{x_3}^2,\quad I_3=0 \end{equation}

```eq
LL1/32.1
```
```eq
LL1/32.2
```
```eq
LL1/32.3
```
```eq
LL1/32.4
```
```eq
LL1/32.5
```
```eq
LL1/32.6
```
```eq
LL1/32.7
```
```eq
LL1/32.12
```

### Principle moments of inertia

\begin{equation}\tag{32.8} T_\text{rot}=\mfrac{1}{2}\left(I_1\Omega_1^2+I_2\Omega_2^2+I_3\Omega_3^2\right) \end{equation}
\begin{equation}\tag{32.9} I_1+I_2=\sum m(x_1^2+x_2^2+2x_3^2) \geq \sum m(x_1^2+x_2^2)=I_3 \end{equation}
```eq
LL1/32.8
```
```eq
LL1/32.9
```

#### Coplanar system of particles
\begin{equation}\tag{32.10} I_3=I_1+I_2 \end{equation}
```eq
LL1/32.10
```

#### Colinear system of particles
\begin{equation}\tag{32.11} I_1=I_2=\sum m{x_3}^2,\quad I_3=0 \end{equation}
```eq
LL1/32.11
```

## Model
 - [Rigid body](rigid-body.md)

M md/lagrangian.md => md/lagrangian.md +25 -9
@@ 5,14 5,30 @@ type: theory

The Lagrangian is defined by the principle of least action

$$\tag{2.1} S=\int_{t_1}^{t_2}L(q,\dot{q},t)\dd{t} $$
$$\tag{2.2} q(t)+\delta q(t) $$
$$\tag{2.3} \delta q(t_1)=\delta q(t_2) = 0 $$
$$\tag{2.4} \delta S=\delta \int_{t_1}^{t_2}L(q,\dot{q},t)\dd{t}=0 $$
$$\tag{2.5} \delta S=\left[\frac{\partial L}{\partial \dot{q}}\delta q\right]_{t_1}^{t_2}+\int_{t_1}^{t_2}\left(\frac{\partial L}{\partial q}-\frac{\dd{}}{\dd{t}}\frac{\partial L}{\partial \dot{q}}\right)\delta q \dd{t}=0 $$
$$\tag{2.6} \frac{\dd{}}{\dd{t}}\frac{\partial L}{\partial \dot{q_i}}-\frac{\partial L}{\partial q_i}=0\qquad(i=1,2,...,s) $$
$$\tag{2.7} \lim L=L_A+L_B $$
$$\tag{2.8} L'(q,\dot{q},t)=L(q,\dot{q},t)+\frac{\dd{}}{\dd{t}}f(q,t) $$
	
```eq
LL1/2.1
```
```eq
LL1/2.2
```
```eq
LL1/2.3
```
```eq
LL1/2.4
```
```eq
LL1/2.5
```
```eq
LL1/2.6
```
```eq
LL1/2.7
```
```eq
LL1/2.8
```

## Model
 - [Classical mechanics](mechanical-system.md)

A md/lhopital.md => md/lhopital.md +40 -0
@@ 0,0 1,40 @@
---
title: l'Hôpital's rule
type: math
sources: MIT 18.01x
---

## indeterminate form 0/0

if $f(x)\xrightarrow[a]{}0$ and $g(x)\xrightarrow[a]{}0$

and the functions $f$ and $g$ are differentiable near the point $x=a$, then

$$ \lim_{x\to a}{\frac{f(x)}{g(x)}} =
\lim_{x\to a}{\frac{f'(x)}{g'(x)}}
$$

## indeterminate form $\infty/\infty$

if $f(x)\xrightarrow[a]{}\infty$ and $g(x)\xrightarrow[a]{}\infty$

and the functions $f$ and $g$ are differentiable near the point $x=a$, then

$$ \lim_{x\to a}{\frac{f(x)}{g(x)}} =
\lim_{x\to a}{\frac{f'(x)}{g'(x)}}
$$

## notes

We can replace $a$ with $a^+$ or $a^-$ and the results still hold.  
We can replace $a$ with $\pm\infty$ and the results still hold.

## other indeterminate forms

$0\cdot\infty$  
$\infty-\infty$  
$0^0$  
$1^\infty$  
$\infty^0$  
  
Should be rearranged to of the form $0/0$ or $\infty/\infty$ in order to apply l'Hôpital's rule.

M md/momentum-operator.md => md/momentum-operator.md +39 -40
@@ 13,7 13,9 @@ $$ \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

$$ \ptag[LL3]{15.1} (\sum_a\nabla_a)\qop{H}-\qop{H}(\sum_a\nabla_a)=0 $$
```eq
LL3/15.1
```

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$.



@@ 23,11 25,9 @@ $$ \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

$$ \ptag[LL3]{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
$$
```eq
LL3/15.2
```

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



@@ 37,21 37,17 @@ 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.

$$ \ptag[LL3]{15.3}
\qop{p}_x\qop{p}y-\qop{p}_y\qop{p}x=0,\qquad
\qop{p}_x\qop{p}z-\qop{p}_z\qop{p}x=0,\qquad
\qop{p}_y\qop{p}z-\qop{p}_z\qop{p}y=0
$$
```eq
LL3/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

$$ \ptag[LL3]{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
$$
```eq
LL3/15.4
```

The solution to the first equation is 



@@ 61,15 57,21 @@ 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.

$$ \ptag[LL3]{15.5} \psi=Ce^{(i/\hbar)\v{p}\cdot\v{r}} $$
```eq
LL3/15.5
```

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

$$ \ptag[LL3]{15.6} \int\Psi_{p'}^*\Psi_p\dd{v}=\delta(\v{p'}-\v{p}) $$
```eq
LL3/15.6
```

The integration can be effected with the formula

$$ \ptag[LL3]{15.7} \mfrac{1}{\tau}\int_{-\infty}^{+\infty}e^{i\alpha x}\dd{x}=\delta(\alpha) $$
```eq
LL3/15.7
```

We have



@@ 80,21 82,21 @@ We have

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

$$ \ptag[LL3]{15.8} \psi=h^{-3/2}e^{i\tau(\v{p}\cdot\v{r}/h)} $$
```eq
LL3/15.8
```

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

$$ \ptag[LL3]{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}
$$
```eq
LL3/15.9
```

(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)$

$$ \ptag[LL3]{15.10} a(\v{p})=
\int \psi(\v{r})\psi_\v{p}^*(\v{r})\dd{V}=
h^{-3/2}\int\psi(\v{r})e^{i\tau(\v{p}\cdot\v{r}/h)}\dd{V}
$$
```eq
LL3/15.10
```

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}$.



@@ 106,11 108,9 @@ TODO 15.11 and 15.12

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

$$ \ptag[LL3]{16.1}
\qop{p}_xy-y\qop{p}_x=0,\qquad
\qop{p}_xz-z\qop{p}_x=0,\qquad
\qop{p}_yz-z\qop{p}_y=0
$$
```eq
LL3/16.1
```

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



@@ 122,16 122,15 @@ For the commutation of $\qop{p}_x$ and $x$ we write
We find that the commutator reduces to a multiplication by $-i\hbar$, the same is true for $y$ and $z$


$$ \ptag[LL3]{16.2}
\qop{p}_xx-x\qop{p}_x=
\qop{p}_yy-y\qop{p}_y=
\qop{p}_zz-z\qop{p}_z=
-i\hbar
$$
```eq
LL3/16.2
```

or they can be rewritten in the form

$$ \ptag[LL3]{16.3} \qop{p}_ik-k\qop{p}_i=-i\hbar\delta_{ki}\qquad(i,k=x,y,z) $$
```eq
LL3/16.3
```

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. 


M md/particle.md => md/particle.md +18 -6
@@ 8,9 8,21 @@ type: model

### For a free particle

$$\tag{4.1} L=\frac{1}{2}mv^2 $$
$$\tag{4.2} L=\sum\frac{1}{2}m_av_a^2 $$
$$\tag{4.3} v=(\dd{l}/\dd{t})^2=(\dd{l})^2/(\dd{t})^2 $$
$$\tag{4.4} \dd{l}^2=\frac{1}{2}(\dot{x}^2+\dot{y}^2+\dot{z}^2) $$
$$\tag{4.5} \dd{l}^2=\frac{1}{2}(\dot{r}^2+r^2\dot{\phi}^2+\dot{z}^2) $$
$$\tag{4.6} \dd{l}^2=\frac{1}{2}(\dot{r}^2+r^2\dot{\theta}^2+r^2\dot{\phi}^2\sin^2\theta) $$
```eq
LL1/4.1
```
```eq
LL1/4.2
```
```eq
LL1/4.3
```
```eq
LL1/4.4
```
```eq
LL1/4.5
```
```eq
LL1/4.6
```

M md/quantum-operator.md => md/quantum-operator.md +97 -33
@@ 5,19 5,27 @@ title: quantum operators

Real physical quantities $f$ are contained in the [wave function](wave-function.md)  $\Psi$, measurement is done by the application of an operator $(\qop{f}\Psi)$. The values that are taken by a physical quantities are eigenvalues $f_n$ of it's operator. The set of eigenvalues form a "spectrum". The spectrum can be discrete (e.g. energy) or continous (e.g. position) or a mix of both (see anharmonic oscillator). To each eingenvalue is associate a eigen-wavefunction $\Psi_n$ which is also normalized.

$$ \ptag[LL3]{3.1} \int|\Psi_n|^2\dd{q}=1 $$
```eq
LL3/3.1
```

If a measurement $\qop{f}$ is carried out on a system $\Psi$, the result will be one of $f_n$. The wavefunction must be a linear combination of the eigen-wavefunctions. (see principle of superposition).

$$ \ptag[LL3]{3.2} \Psi=\sum a_n\Psi_n $$
```eq
LL3/3.2
```

A wavefunction can be expanded in terms of eigenfunction of any physical quantity. These $a_n$ represent the probability of a given eigenfunction which are $|a_n|^2$. We also must have unit probability over the eigenfunction.

$$ \ptag[LL3]{3.3} \sum_n|a_n|^2=1 $$
```eq
LL3/3.3
```

This relation doesn't hold if $\Psi$ is not normalized. The sum $\sum|a_n|^2$ must be bilinear in $\Psi, \Psi^*$, and become unit when $\Psi$ is normalized, thus we have

$$ \ptag[LL3]{3.4} \sum_n a_na_n^*=\int\Psi\Psi^*\dd{q} $$
```eq
LL3/3.4
```

we can find a simple form for $a_n$



@@ 27,71 35,99 @@ we can find a simple form for $a_n$
\sum_n a_na_n^*&=\sum a_n^*\int\Psi_n^*\Psi\dd{q} &&\text{replacing with $(3.4)$}
\end{align}

$$ \ptag[LL3]{3.5} a_n=\int\Psi\Psi_n^*\dd{q} $$
```eq
LL3/3.5
```

if we substitute $(3.2)$ we find $a_n=\sum a_m\int\Psi_m\Psi_n^*\dd{q}$, from which it is evident the eigenfunctions must satisfy be an orthogonal set

$$ \ptag[LL3]{3.6} \int\Psi_m\Psi_n^*\dd{q}=\delta_{nm} $$
```eq
LL3/3.6
```

Thus the spectrum of eigenfunctions is orthonormal.

The mean value $\overline{f}$ of a physical quantity $f$, with the usual definition using wighted probabilities we get

$$ \ptag[LL3]{3.7} \overline{f}=\sum_nf_n|a_n|^2 $$
```eq
LL3/3.7
```

Let $(\qop{f}\Psi)$ be the result of the operator acting on the function $\Psi$. We define $\qop{f}$ in such a way that

$$ \ptag[LL3]{3.8} \overline{f}=\int \Psi^*(\qop{f}\Psi)\dd{q} $$
```eq
LL3/3.8
```

In general $\qop{f}$ is linear, if we plug $(3.5)$ in $(3.7)$ we find $\overline{f}=\sum_n f_na_na_n^*=\int\Psi(\sum_n a_nf_n\Psi_n)\dd{q}$

Comparing with $(3.8)$ we get that the effect of $\qop{f}$ on $\Psi$ is

$$ \ptag[LL3]{3.9} (\qop{f}\Psi)=\sum_nf_na_n\Psi_n $$
```eq
LL3/3.9
```

If we substitute in $(3.5)$ for $a_n$, we find that $\qop{f}$ is an integral operator of the form

$$ \ptag[LL3]{3.10} (\qop{f}\Psi)=\int K(q,q')\Psi(q')\dd{q} $$
```eq
LL3/3.10
```

where the kernel function $K(q,q')$ is

$$ \ptag[LL3]{3.11} K(q,q')=\sum_n f_n\Psi_n^*(q')\Psi_n(q) $$
```eq
LL3/3.11
```

Thus, for every physical quantity there is a definite linear integral operator. From $(3.9)$ we see that if $\Psi$ is one the the eigenfunction $\Psi_n$, then

$$ \ptag[LL3]{3.12} \qop{f}\Psi=f_n\Psi_n $$
```eq
LL3/3.12
```

The values taken by physical quantities are necessarily real, hence the mean must also be real, in any state. And if the mean is real, then all of the eigenvalues must be real, because the mean values coincidence with the eigenvalues in the states $\Psi_n$. Because the mean is real, we can equate $(3.8)$ to it's conjugate form

$$ \ptag[LL3]{3.13} \int\Psi^*(\qop{f}\Psi)\dd{q}=\int\Psi(\qop[*]{f}\Psi^*)\dd{q} $$
```eq
LL3/3.13
```

This doens't hold in general for any linear operator $\qop{f}$, it is a restriction for physical quantities.

For an arbitrary $\qop{f}$ we can find the transposed operator $\qop{f}\qop[t]{f}$ such that

$$ \ptag[LL3]{3.14} \int\Psi(\qop{f}\Phi)\dd{q}\equiv\int\Phi(\qop[t]{f}\Psi)\dd{q} $$
```eq
LL3/3.14
```

where $\Psi$ and $\Phi$ are different, if we take $\Phi=\Psi^*$ then from $(3.13)$ we have

$$ \ptag[LL3]{3.15} \qop[t]{f}=\qop[*]{f} $$
```eq
LL3/3.15
```

Thus, the operators that represent physical quantities must be Hermitian.

If we consider a complex physical quantity $f$ (need example here), it's complex conjugate is $f^*$, whose eigenvalues are the complex conjugate of those of $f$. We denote $\qop[+]{f}$ the operator corresponding to the physical quantity $f^*$. It is the Hermitian conjugate of $\qop{f}$ and in general is different from $\qop[*]{f}$: from the condition $\overline{f^*}=\overline{f}^*$ we find that

$$ \ptag[LL3]{3.16} \qop[+]{f}=\qop[*t]{f} $$
```eq
LL3/3.16
```

### Addition of operators

Let $f$ and $g$ be two physical quantities. The eigenvalues of the sum $f+g$ are equal to the sums of the eigenvalues of $f$ and $g$. The quantity $f+g$ is represented by the operator $\qop{f}+\qop{g}$. Sometimes $f$ and $g$ can't take definite values at the same time, in this case we define the mean of the sum

$$ \ptag[LL3]{4.1} \overline{f+g}=\overline{f}+\overline{g} $$
```eq
LL3/4.1
```

In this case, the eigenvalues of the new operator $\qop{f}+\qop{g}$ are real valued, but they don't bear any more relation to those of the quantities $f$ and $g$ separately.

Let $f_0$ and $g_0$ be the smallest eigenvalues of the quantities $f$ and $g$, and $(f+g)_0$ of the quantity $f+g$, then

$$ \ptag[LL3]{4.2} (f+g)_0\geq f_0+g_0 $$
```eq
LL3/4.2
```

(need Hilbert algebra for proof of this)



@@ 99,7 135,9 @@ $$ \ptag[LL3]{4.2} (f+g)_0\geq f_0+g_0 $$

Let $f$ and $g$ be quantities that can be measured simultaneously. The product $\qop{f}\qop{g}$, it is the successive application of $\qop{g}$, then $\qop{f}$. If $\Psi_n$ are eigenfunctions common to $\qop{f}$ and $\qop{g}$ we hav $\qop{f}\qop{g}\Psi=\qop{f}g_n\Psi_n=g_n\qop{f}\Psi_n=g_nf_n\Psi_n$, we could have equally taken the operator $\qop{g}\qop{f}$. Sinec $\Psi$ can always be written as a linear combination of $\Psi_n$, it follows that $\qop{f}\qop{g}$ is the same as $\qop{g}\qop{f}$.

$$ \ptag[LL3]{4.3} \qop{f}\qop{g}-\qop{g}\qop{f}=0 $$
```eq
LL3/4.3
```

Thus, we arrive at this important result: if two quantities $f$ and $g$ can simultaneously take definite values, then their operators $\qop{f}$ and $\qop{g}$ commute. (there is also proof of the converse in par11).



@@ 118,30 156,40 @@ $$

from which we have directly

$$ \ptag[LL3]{4.4} (\qop{f}\qop{g})^t=\qop[t]{g}\qop[t]{f} $$
```eq
LL3/4.4
```

Taking the complex conjugate on both sides we have

$$ \ptag[LL3]{4.5} (\qop{f}\qop{g})^+=\qop[+]{g}\qop[+]{f} $$
```eq
LL3/4.5
```


If both $\qop{f}$ and $\qop{g}$ are Hermitian, then $(\qop{f}\qop{g})^+=\qop{g}\qop{f}$. It follows that the operator $\qop{f}\qop{g}$ is Hermitian if and only if the factors $\qop{f}$ and $\qop{g}$ commute.

We note that for non commuting operators, we can form an Hermitian operator by taking the symmetrical combination

$$ \ptag[LL3]{4.6} \mfrac{1}{2}(\qop{f}\qop{g}+\qop{g}\qop{f}) $$
```eq
LL3/4.6
```

The difference $\qop{f}\qop{g}-\qop{g}\qop{f}$ is an anti-Hermitian operator. It can be made Hermitian by mutlplying by $i$

$$ \ptag[LL3]{4.6} i(\qop{f}\qop{g}-\qop{g}\qop{f}) $$
$$ i(\qop{f}\qop{g}-\qop{g}\qop{f}) $$

For brevity we note the commutator

$$ \ptag[LL3]{4.7} \{\qop{f},\qop{g}\}=\qop{f}\qop{g}-\qop{g}\qop{f} $$
```eq
LL3/4.7
```

It is easily seen that 

$$ \ptag[LL3]{4.8} \{\qop{f}\qop{g},\qop{h}\}=\{\qop{f},\qop{h}\}\qop{g}-\qop{f}\{\qop{g},\qop{h}\} $$
```eq
LL3/4.8
```

And we notice that if $\{\qop{f},\qop{h}\}=0$ and $\{\qop{g},\qop{h}\}=0$, it does not in general follow that $\qop{f}$ and $\qop{g}$ commute, i.e. commutation is not transitive. (math example is easy to find, need an example here with a physical meaning).



@@ 149,13 197,17 @@ And we notice that if $\{\qop{f},\qop{h}\}=0$ and $\{\qop{g},\qop{h}\}=0$, it do

We can generalize the above results for operator an operator $\qop{f}$ with a continuous spectrum. We shall denote it's eigenvalues $f$, without suffix, because they take a continuous range of values. We note $\Psi_f$ the eigenfunction corresponding to the eigenvalue $f$. Just as $\Psi$ can be exanded in a series $(3.2)$ of eingenfunctions, it can also be expanded in terms of of the complete set of eigenfunctions of a quantity with a continuous spectrum as an integral.

$$ \ptag[LL3]{5.1} \Psi(q)=\int a_f\Psi_f(q)\dd{f} $$
```eq
LL3/5.1
```

where the integration is taken over the whole range of values that can be taken by the quantity $f$.

The subject of normalisation of the eigenfunctions of a continuous spectrum is more complex than that of a discrete spectrum. We don't try to normalize the square modulus of the wavefunction, instead we normalize so that the $|a_f|^2\dd{f}$ is the probability that the physical quantity has a value between $f$ and $f+\dd{f}$. Since the sum of all probabilities must equal unity, we have

$$ \ptag[LL3]{5.2} \int|a_f|^2\dd{f}=1 $$
```eq
LL3/5.2
```

In the same way we found $(3.5)$, we can write



@@ 166,7 218,9 @@ In the same way we found $(3.5)$, we can write

By comparing these two we find the expression for the expansion coefficients

$$ \ptag[LL3]{5.3} a_f=\int\Psi(q)\Psi_f^*(q)\dd{q} $$
```eq
LL3/5.3
```

in exact analogy to $(3.5)$.



@@ 176,7 230,9 @@ $$ a_f=\int a_{f'}(\Psi_{f'}\Psi_f^*\dd{q})\dd{f'} $$

This relation must hold for any $a_f$. The only solution is

$$ \ptag[LL3]{5.4} \int\Psi_{f'}\Psi_f^*\dd{q}=\delta(f'-f) $$
```eq
LL3/5.4
```

This gives the normalisation rule for the eigenfunctions; replacing condition $(3.6)$. Similarly, we have $\Psi_f$ and $\Psi_{f'}$ orthogonal for $f\neq f'$. However the integrals of $|\Psi_f|^2$ diverge for a continuous system. The eigenfunctions satisfy another relation by subsituting the other way around



@@ 184,11 240,15 @@ $$ \Psi(q)=\int\Psi(q')\left(\int\Psi_f^*(q')\Psi_f(q)\dd{f}\right)\dd{q'} $$

From which we deduce immediately

$$ \ptag[LL3]{5.11} \int\Psi_f^*(q')\Psi_f(q)\dd{f}=\delta(q-q') $$
```eq
LL3/5.11
```

The analogous for a discrete spectrum is

$$ \ptag[LL3]{5.12} \sum_n\Psi_n^*(q')\Psi_n(q)\dd{f}=\delta(q-q') $$
```eq
LL3/5.12
```

$(5.1)$ and $(5.3)$ are analogous: $\Psi(q)$ can be expanded in terms of the functions $\Psi_f(q)$ with expansion coefficients $a_f$, or otherwise we can expand $a_f\equiv a(f)$ in terms of the functions $\Psi_f^*(q)$ while $\Psi(q)$ play the expansion coefficients. The function $a(f)$, like $\Psi(q)$ completely determines the state of the system. Just as $|\Psi(q)|^2$ determines the probability for the system to have coordinates lying in an interval $\dd{q}$, so $|a(f)|^2$ determines the probability for the values of the quantity $f$ to lie in a given interval $\dd{f}$.



@@ 198,7 258,9 @@ $(5.1)$ and $(5.3)$ are analogous: $\Psi(q)$ can be expanded in terms of the fun

The classical definition of a time derivative doesn't hold in quantum mechanics. In quantum mechanics, if a quantity has a value at one instant, it does not in general have a definite value at subsequent instants. However it is still natural to define the derivative $\dot{f}$ of a quantity $f$ as the quantity whose mean value is equal to the derivative of the mean value $\bar{f}$

$$ \ptag[LL3]{9.1} \overline{\dot{f}}=\dot{\overline{f}} $$
```eq
LL3/9.1
```

by definition we have the mean as $\overline{f}=\int\Psi^*\qop{f}\Psi\dd{q}$,



@@ 226,6 288,8 @@ $$

Since, by definition of the mean value, the operator inside the parenthesis must be the derivative operator of the quantity $f$

$$ \ptag[LL3]{9.2} \qop{\dot{f}}=\frac{\partial\qop{f}}{\partial t}+\frac{i}{\hbar}\left(\qop[]{H}\qop{f}-\qop{f}\qop{H}\right) $$
```eq
LL3/9.2
```

We notice that if $f$ does not depend explicitly on time, then the derivative $\qop{\dot{f}}$ is, apart from a constant factor, just a commutation of $f$ with the Hamiltonian $\qop{H}$.

M md/rigid-body.md => md/rigid-body.md +6 -10
@@ 5,16 5,12 @@ type: model

the study of motion of a rigid body

\begin{equation}
\tag{31.1}
	\dd{\mathfrak{r}}/\dd{t}=\mathbf{v},\quad
	\dd{\mathbf{R}}/\dd{t}=\mathbf{V},\quad
	\dd{\mathbf{\phi}}/\dd{t}=\mathbf{\Omega}
\end{equation}
\begin{equation}
	\tag{31.2}
	\mathbf{v}=\mathbf{V}+\mathbf{\Omega}\times\mathbf{r}
\end{equation}
```eq
LL1/31.1
```
```eq
LL1/31.2
```

## Assumptions
 - [Particles](particle.md) within solids are attached firmly, no deformation.

M md/scattering.md => md/scattering.md +1 -0
@@ 4,6 4,7 @@ type: model
---

\begin{equation} \chi=|\mfrac{\tau}{2}-2\phi_0| \end{equation}

\begin{equation} \phi_0=\int\limits_{r_\text{min}}^\infty\frac{(M/r^2)\dd{r}}{\sqrt{2m[E-U(r)]-M^2/r^2}} \end{equation}
\begin{equation} E=\mfrac{1}{2}mv_\infty^2,\qquad M=m\rho v_\infty \end{equation}
\begin{equation} \phi_0=\int\limits_{r_\text{min}}^\infty\frac{(\rho/r^2)\dd{r}}{\sqrt{1-(\rho^2/r^2)-(2U/mv_\infty^2)}} \end{equation}

M md/two-body-problem.md => md/two-body-problem.md +12 -4
@@ 3,10 3,18 @@ title: two body problem
type: model
---

$$\tag{13.1} L=\frac{1}{2}m_1\dot{\mathbf{r}}_1+\frac{1}{2}m_2\dot{\mathbf{r}}_2-U(|\mathbf{r}_1-\mathbf{r}_2|) $$
$$\tag{13.2} \mathbf{r}_1=m_2\mathbf{r}/(m_1+m_2),\qquad \mathbf{r}_2=-m_1\mathbf{r}/(m_1+m_2),\qquad $$
$$\tag{13.3} L=\frac{1}{2}m\dot{\mathbf{r}}^2-U(r) $$
$$\tag{13.4} m=m_1m_2/(m_1+m_2) $$
```eq
LL1/13.1
```
```eq
LL1/13.2
```
```eq
LL1/13.3
```
```eq
LL1/13.4
```

## Theory
 - [Mechanical System](mechanical-system.md)

M md/wave-function.md => md/wave-function.md +13 -5
@@ 5,21 5,29 @@ title: the wave function

The wave function describes a quantum-mechanical system. From the wave function we can calculate the probability of a given event (see uncertainty principle) with a form bilinear in $\Psi$ and $\Psi^*$.

$$ \ptag[LL3]{2.1} \int\int\Psi(q)\Psi^*(q')\phi(q,q')\dd{q}\dd{q'} $$
```eq
LL3/2.1
```

The sum of the probabilities of all possible values of the co-ordinates of the system must be unity.

$$ \ptag[LL3]{2.2} \int|\Psi|^2\dd{q}=1 $$
```eq
LL3/2.2
```

Sometimes $|\Psi|^2$ diverges, in this case it does not represent the absolute values of probability, but rather the relative probability between two events in the co-ordinate system.

If we know the wave function for two systems, then the state of the whole system is

$$ \ptag[LL3]{2.3} \Psi_{12}(q_1,q_2)=\Psi_1(q_1)\Psi_2(q_2) $$
```eq
LL3/2.3
```

This relation stands as long as the two systems don't interact. (see entanglement)

$$ \ptag[LL3]{2.4} \Psi_{12}(q_1,q_2,t)=\Psi_1(q_1,t)\Psi_2(q_2,t) $$
```eq
LL3/2.4
```

### Passage to classical mechanics



@@ 29,6 37,6 @@ $$ \hbar=1.054\times10^{-34} \text{J$\cdot$s} $$

The wave function of an "almost classical" system has the form

$$ \ptag[LL3]{6.1} \Psi=ae^{iS/\hbar} $$
\load[LL3]{6.1}

Planck's constant $\hbar$ plays the role of the "extent of quantistion", the passage from quantum to classical mechanics, corresponding to large phase, can be formally described as a passage to the limit $\hbar\to 0$.

M tools/get => tools/get +3 -8
@@ 9,21 9,16 @@ colors[math]="#ffd1dc"		#pink
colors[DEFAULT]="#ffd1dc"	#pink

_or_default() { grep ^ || echo DEFAULT; }
slug() { echo $1; }
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)]}"; }
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; }
graph() { grep "($1.md)" md/*.md | awk -F: '{print $1}' | uniq | sed s:md/::g | sed s:.md::g || true; }
bg_css() {
    for type in ${!colors[@]}; do
	    echo "._$type{ background-color: ${colors[$type]}; }"
    done
}
see_also() {
    cat <<-EOF
<h3>See also</h3>
<center><object data=${1}.svg type=image/svg+xml></object></center>
EOF
}

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

R tools/latex-includes.yaml => tools/math.tex +21 -21
@@ 1,24 1,24 @@
---
header-includes: |
  \usepackage{bm}
  \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>}
\usepackage{bm}
\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{\dd}[2][]{\mathrm{d}^{#1}#2}
  \newcommand{\v}[1]{\mathbf{#1}}
  \newcommand{\qop}[2][]{\hat{#2}\vphantom{#2}^{#1}}
  \newcommand{\mfrac}[2]{\textstyle\frac{#1}{#2}\displaystyle}
\newcommand{\dd}[2][]{\mathrm{d}^{#1}#2}
\newcommand{\v}[1]{\mathbf{#1}}
\newcommand{\qop}[2][]{\hat{#2}\vphantom{#2}^{#1}}
\newcommand{\mfrac}[2]{\textstyle\frac{#1}{#2}\displaystyle}

  \newcommand{\ptag}[2][]{\tag*{(#2)$_{\text{#1}}$}}
\newcommand{\ptag}[2][]{\label{#1:#2}\tag*{(#2)$_{\text{#1}}$}}
\newcommand{\load}[2][]{
\input{formularies/#1/#2.tex}
}

  \newenvironment{nalign}{
      \begin{equation}
      \begin{aligned}
  }{
      \end{aligned}
      \end{equation}
      \ignorespacesafterend
  }
---
\newenvironment{nalign}{
\begin{equation}
\begin{aligned}
}{
\end{aligned}
\end{equation}
\ignorespacesafterend
}

M tools/pf-filter.py => tools/pf-filter.py +15 -2
@@ 8,14 8,27 @@ def prepare(doc):


def action(elem, doc):
    if isinstance(elem, pf.Code):
        doc.content.insert(0, pf.RawBlock(f"HELLO"))
    # if isinstance(elem, pf.Code):
    #     doc.content.insert(0, pf.RawBlock(f"HELLO"))

    # .md to .html
    if isinstance(elem, pf.Link) and elem.url.endswith('.md'):
        elem.url = elem.url[:-3] + '.html'
        return elem

    # load
    if isinstance(elem, pf.CodeBlock):
        if 'eq' in elem.classes:
            with open(f'www-data/{elem.text}.html') as file:
                html = file.read()
            elem = pf.RawBlock(html, format='html')
            return elem
        return []

    # ref
    if isinstance(elem, pf.Code):
        return elem


if __name__ == '__main__':
    pf.run_filter(action, prepare=prepare)

M tools/style.css => tools/style.css +39 -0
@@ 12,3 12,42 @@ hr { display: block; height: 1px;
    border: 0; border-top: 1px solid #000000;
    margin: 1em 0; padding: 0;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

M tools/template.html => tools/template.html +3 -0
@@ 1,6 1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<div align="left"><a href="index.html">back to graph</a></div>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="colors.css">
<link rel="stylesheet" type="text/css" href="style.css">
<head>


@@ 66,6 67,8 @@ $for(sources)$
$endfor$
</ul>
$endif$
<h3>See also</h3>
<center><object data=$slug$.svg type=image/svg+xml></object></center>
</body>
</div>
</html>

A tools/tex_to_html.sh => tools/tex_to_html.sh +10 -0
@@ 0,0 1,10 @@
#!/bin/bash

eq=$(basename ${1%.tex})
dir=$(dirname $1)
book=$(basename $dir)
pandoc -f latex --mathjax tools/math.tex <(echo "
\begin{equation}
\ptag[$book]{$eq} $(cat $1)
\end{equation}
")