\documentclass{article}
\usepackage[landscape]{geometry}
\usepackage{url, multicol, amsmath, esint, amsfonts, tikz, amsmath, amssymb, colortbl, xcolor, mathtools, enumitem, physics, hyperref}

\newcommand{\mean}[1]{\left\langle #1 \right\rangle}

\usetikzlibrary{decorations.pathmorphing}

\usepackage{environ}

\NewEnviron{topic}[1][Topic]{
    \begin{tikzpicture}
        \node [mybox] (box){%
            \begin{minipage}{0.29\textwidth}
            \BODY
            \end{minipage}
        };
        \node[fancytitle, right=10pt] at (box.north west) {#1};
    \end{tikzpicture}
}

\makeatletter

\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother

\advance\topmargin-.8in
\advance\textheight3in
\advance\textwidth3in
\advance\oddsidemargin-1.5in
\advance\evensidemargin-1.5in
\parindent0pt
\parskip2pt
\newcommand{\hr}{\centerline{\rule{3.5in}{1pt}}}

\begin{document}

\begin{center}{\textbf{\large Electrodynamics and Optics Cheatsheet} }\\
    \href{https://fc472.user.srcf.net/}{Feiyang}
\end{center}
\begin{multicols*}{3}

\tikzstyle{mybox} = [draw=black, fill=white, very thick,
    rectangle, rounded corners, inner sep=10pt, inner ysep=10pt]
\tikzstyle{fancytitle} =[fill=black, text=white, font=\bfseries]

\begin{topic}
    [Basic relations]
    \textbf{Maxwell}
    \begin{align*}
        \div \bf B  &= 0\\
        \div \bf D &= \rho & \bf D &= \epsilon \epsilon_0 \bf E\\
        \curl \bf E &= \dot{\bf B}\\
        \curl \bf H &=  \bf J + \dot{\bf D} & \bf H &= \frac{\bf B}{\mu_0} - \bf M  = \frac{\bf B}{\mu \mu_0} 
    \end{align*}
    \textbf{Energy and impedance}
    \begin{align*}
        \bf N &=  \bf E \crossproduct \bf H\\
        \bf B &=  \curl \bf A \\ \bf E &= - \dot{\bf A} - \grad \phi\\
        c^2 &= \frac{1}{\mu_0 \epsilon_0} \\
        \frac{\abs{\bf E}}{\abs{\bf B}} &= \frac{\omega}{k} = v = \frac{c}{n} = \frac{c}{\sqrt{\epsilon \mu}}\\
        \frac{\abs{\bf E}}{\abs{\bf H}} &= \frac{c \mu \mu_0}{\sqrt{\epsilon \mu}} = \sqrt{\frac{\mu \mu_0}{\epsilon \epsilon_0} } = Z = \sqrt{\frac{\mu}{\epsilon}} Z_0
    \end{align*}
    \textbf{Boundary conditions}
    \begin{gather*}
        D_\perp = D_\perp\\
        \theta_B = \arctan (\frac{n_2}{n_1}) \implies r_p = 0
    \end{gather*}
\end{topic}
\columnbreak

\begin{topic}
    [Anisotropic]
    \textbf{Uniaxial: } \(\epsilon_1 = \epsilon_2 \neq \epsilon_3\)\\
    perpendicular to \(\hat{\bf e}_3 \implies \) ordinary spherical wavefront, \(\bf k \parallel \bf N\);\\
    not perpendicular to \(\hat{\bf e}_3 \implies \) extraordinary wave.
    \textbf{Induced birefringence}
    \begin{itemize}[label={},leftmargin=5pt,noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
        \item chiral materials 
        \begin{gather*}
            n_L \neq n_R \implies \text{ rotation}\\
            \alpha = \frac{\pi}{\lambda} \pqty{ n_L - n_R }; \qquad \Delta  \phi = 2 \alpha d
        \end{gather*}
        \item Faraday effect
        \begin{align*}
            m \ddot{\bf r} &=  -e \pqty{\bf E + \dot{\bf r} \crossproduct \bf B_0}\\
            \theta &= VB_0 d &\text{N.B. directional}
        \end{align*}
        \item Kerr effect
        \[
            \Delta n = n_x - n_y = \lambda_0 k E_0^2
        \]
    \end{itemize}
\end{topic}
\begin{topic}
    [Incoherence]
    \textbf{Degree of polarisation:} \(V = \frac{I_\text{pol}}{I_ \text{tot}} \)\\
    \textbf{Coherence}
    \[
        F = \frac{1}{\omega - \omega_0 - i \omega_s}
    \]
    \begin{itemize}[label={},leftmargin=5pt,noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt]
        \item width
        \[
            \Delta  \omega = \text{FWHM} = 
            2 \omega_s = 2.36 \sigma
        \]
        \item  lifetime
        \[
            \tau_s = \frac{1}{\omega_s}
        \]
        \item thermal
        \[
            \sigma = \omega_0 \sqrt{\frac{k_B T}{mc^2} }
        \]
        \item pressure
        \[
            \tau = \frac{1}{4 N \bar{v} A}
        \]
    \end{itemize}

\end{topic}



\begin{topic}
    [Thermodynamic potentials]
    \textbf{Gibbs-Duhem}
    \begin{align*}
        U &= TS - pV + \mu N\\
        \dd{U} &= T \dd{S} - p\dd{V} + \mu \dd{N}\\
        \dd{\mu} &= - s \dd{T} + v \dd{p}
    \end{align*}
    \textbf{Availability}
    \begin{gather*}
        \begin{aligned}
            \dd{A} &= \dd{U} - T_R \dd{S} +p_R \dd{V} - \mu_R \dd{N}\\
            &= \pqty{T-T_R} \dd{S} - \pqty{p-p_R} \dd{V} + \pqty{\mu - \mu_R} \dd{N}\\
            &= -T_R \dd{S}_\text{tot}
        \end{aligned}\\
        \dd{A} \leq 0 \iff \dd{S}_\text{tot} \geq 0
    \end{gather*}
    \begin{align*}
        H &= U + pV\\
        F &= U - TS=  - k_BT \ln Z\\
        G &= U- TS +pV = \mu N\\
        \Phi &= U - TS - \mu N = - pV = - k_B T \ln \Xi\\
        \pqty{\dd{}}_\text{natural} &= \dd{A} \\
        \Xi &= \sum e^{-\beta\pqty{E_i - \mu N_i}}
    \end{align*}
\end{topic}

\columnbreak
\begin{topic}
    [Statistical physics]
    \textbf{Statistics}
    \[
        \left\langle n_k \right\rangle = \frac{1}{e^{\beta \pqty{\epsilon_k - \mu}} - \eta}
    \]
    \textbf{Quantum}
    \begin{align*}
        \lambda &=  \pqty{ \frac{2\pi \hbar^2}{ m k_B T} }^{\frac{1}{2}}\\
        n_c &= \frac{1}{\lambda^3}\\
        Z_N &= \frac{1}{N!} Z_1^N\\
        Z &= \frac{1}{N!} \pqty{\frac{V}{\lambda^3}}^N
    \end{align*}
    \textbf{Bose condensation}
    \begin{gather*}
        N = \int n(\epsilon) g(\epsilon) \dd{\epsilon}
    \end{gather*}
    At some low, finite temperature, \(\mu=0\).\\
    \textbf{Virial expansion}
    \begin{align*}
        \mean{\nu} &= \mean{ - \frac{1}{2} \sum_i \mathbf{r}_i \dotproduct \mathbf{f}_i } = \mean{\nu_\text{ext}} = \mean{\nu_\text{int}}\\
        \mean{\nu_i} &= \frac{1}{2} \int_0^\infty 4\pi r^2 n e^{-\beta \phi} r \dv[]{\phi}{r} \dd{r}\\
        \mean{\nu} &= \frac{3}{2} k_B T\\
        \frac{p}{k_B T} &= n+ B_2 (T) n^2 + \dots \\
        B_2 (T) &= \int_0^\infty 2\pi r^2 \pqty{1 - e^{-\beta \phi}} \dd{r}
    \end{align*}
\end{topic}

\columnbreak
\begin{topic}
    [Equilibrium fluctuation]
    \begin{align*}
        \mean{x^2} &=  \frac{1}{Z \beta^2} \pdv[2]{Z}{f} \qquad E = - fx\\
        \mean{ \Delta  M^2} &=  k_B T \pqty{ \pdv[]{\mean{M}}{B}}_T\\
        \mean{\Delta M^2} &= k_B T^2 \pdv[]{U}{T}
    \end{align*}
    \textbf{Fluctuation-dissipation theorem}
    \[
        \mean{\Delta  x^2} = \frac{k_B T_R}{\pqty{\pdv[2]{A}{x}}_{x = x_0}} = \frac{k_B T}{ \pqty{\pdv[]{f}{x}}_{x = x_0}} 
    \]
\end{topic}


\end{multicols*}
\end{document}