\documentclass[preprint,showkeys,nofootinbib]{revtex4-1}

% linking references
\usepackage{hyperref}
\hypersetup{
  breaklinks=true,
  colorlinks=true,
  linkcolor=blue,
  urlcolor=cyan,
}

% general physics / math packages and commands
\usepackage{physics,amsmath,amssymb,braket,dsfont}
\renewcommand{\t}{\text} % text in math mode
\newcommand{\f}{\dfrac} % shorthand for fractions
\newcommand{\p}[1]{\left(#1\right)} % parenthesis
\renewcommand{\sp}[1]{\left[#1\right]} % square parenthesis
\renewcommand{\set}[1]{\left\{#1\right\}} % curly parenthesis
\newcommand{\bk}{\braket} % shorthand for braket

\renewcommand{\d}{\text{d}}
\newcommand{\g}{\text{g}}
\newcommand{\e}{\text{e}}
\newcommand{\x}{\text{x}}
\newcommand{\y}{\text{y}}
\newcommand{\z}{\text{z}}

\renewcommand{\c}{\hat{c}}
\newcommand{\n}{\hat{n}}

\newcommand{\A}{\mathcal{A}}
\newcommand{\B}{\mathcal{B}}
\newcommand{\D}{\mathcal{D}}
\newcommand{\E}{\mathcal{E}}
\newcommand{\G}{\mathcal{G}}
\renewcommand{\H}{\mathcal{H}}
\newcommand{\I}{\mathcal{I}}
\newcommand{\K}{\mathcal{K}}
\renewcommand{\L}{\mathcal{L}}
\newcommand{\M}{\mathcal{M}}
\newcommand{\N}{\mathcal{N}}
\renewcommand{\O}{\mathcal{O}}
\renewcommand{\P}{\mathcal{P}}
\newcommand{\Q}{\mathcal{Q}}
\renewcommand{\S}{\mathcal{S}}
\newcommand{\U}{\mathcal{U}}

\newcommand{\1}{\mathds{1}}

\newcommand{\mA}{m_{\text{A}}} % symbol for the mass of an atom

% "left vector" arrow; requires tikz package
\newcommand{\lvec}[1]
{\reflectbox{\ensuremath{\vec{\reflectbox{\ensuremath{#1}}}}}}

% figures
\usepackage{graphicx} % for figures
\usepackage{grffile} % help latex properly identify figure extensions
\graphicspath{{./figures/}} % set path for all figures
\usepackage[caption=false]{subfig} % subfigures (via \subfloat[]{})

% inline lists
\usepackage[inline]{enumitem}

% for feynman diagrams
\usepackage{tikz,tikz-feynman}
\tikzset{
  baseline = (current bounding box.center)
}
\tikzfeynmanset{
  compat = 1.1.0,
  every feynman = {/tikzfeynman/small}
}
\newcommand{\shrink}[1]{\scalebox{0.8}{#1}} % for smaller diagrams

% color definitions (used in a figure)
\usepackage{xcolor}
\definecolor{lightblue}{RGB}{31,119,180}
\definecolor{orange}{RGB}{255,127,14}
\definecolor{green}{RGB}{44,160,44}
\definecolor{lightred}{RGB}{214,39,40}

% proper coloring inside math environment
\makeatletter
\def\mathcolor#1#{\@mathcolor{#1}}
\def\@mathcolor#1#2#3{
  \protect\leavevmode
  \begingroup
    \color#1{#2}#3
  \endgroup
}
\makeatother
\newcommand{\bmu}{\mathcolor{lightblue}{\mu}}
\newcommand{\onu}{\mathcolor{orange}{\nu}}
\newcommand{\grho}{\mathcolor{green}{\rho}}
\newcommand{\re}{\mathcolor{lightred}{\text{e}}}

% leave a note in the text, visible in the compiled document
\newcommand{\note}[1]{\textcolor{red}{#1}}

% for strikeout text
% normalem included to prevent underlining titles in the bibliography
\usepackage[normalem]{ulem}

\newcommand{\blue}[1]{\textcolor{blue}{#1}}
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\green}[1]{\textcolor{green}{#1}}

\begin{document}

\section*{Referee 1}

We thank the referee for taking the time to carefully read and
reconsider our revised manuscript.  Below, we address the remaining
comments made by the referee.

Excerpts from the referee reports are written in \blue{blue}, excerpts
from the previous version of our manuscript (i.e.~after the first
round of review) are written in \red{red}, and excerpts from the final
version of our manuscript is written in \green{green}.  All page,
line, equation, and reference numbers generally refer to those from
the previous version of our manuscript.

\begin{enumerate}
\item Concerning:

  \blue{The authors have significantly improved the manuscript and
    very carefully incorporated the comments in the first round of
    referee reports, and provided a very careful reply to each
    comment. The referee appreciates a lot this effort, and the
    manuscript can be published in the present form as it is.}

  We thank the referee for recognizing our efforts in the first round
  of referee reports, and for noting that we ``have significantly
  improved the manuscript'' to the point that it ``can be published in
  the present form''.

\item Concerning the remaining questions about renormalization:

  \blue{However, the referee as an optional comment, which the authors
    might consider. It concerns the renormalization and the question
    whether it is universal. The authors define the condition for
    renormalization in Eq.(16) by fixing the two-particle interaction
    in the lowest motional state. However, this procedure does not
    uniquely define the renormalization of the diagrams such as (23),
    where the loop is connected to an excited states. Especially, the
    authors claim that from Eq.(25) it follows Eq.~(26). However, the
    referee disagrees with this assessment as Eq (25) only fixes the
    counter term with all states in the motional ground
    state. However, the counter terms with excited external lines is
    not defined by this condition, and especially, there is no unique
    method to define it. Note, that this is in contrast to high energy
    physics, where the renormalization and form of the counter terms
    are uniquely fixed by Lorentz invariance and gauge
    symmetry. Therefore, the referee is convinced that the three-body
    interaction derived in the present manuscript also involves terms,
    which are non universal and involve additional contribution
    dependent on the strength of the optical lattice. The comparison
    between theory and experiment certainly is consistent with such an
    observation as the agreement is not exzellent.}

  We greatly thank the referee for their careful attention to detail.
  Indeed, our renormalization condition in Eq.~(16) (page 15) fixes
  counter-terms with all atoms in the lowest motional state, which at
  third order in the effective theory implies Eq.~(25) (page 19).
  While Eq.~(25) can be used to solve for counter-terms directly,
  factoring out any dependence on motional states, the referee is
  correct in pointing out that we have made an error in claiming that
  Eq.~(25) implies Eq.~(26).  Once this error is corrected, however,
  the counter-terms in question are uniquely defined, and can be used
  to cancel out the divergence from diagrams of the form in Eq.~(23).

  We have corrected the error in both the analytical work in section
  III and numerical results shown in section IV of our manuscript.  We
  emphasize in particular that the corrections to our numerical
  results (presented in figures 3, 4, and 5) are small enough as to be
  nearly imperceptible to the eye, and therefore do not affect any of
  the discussions or conclusions in our manuscript.

  To this end, we have replaced the following text:

  \red{To leading order in the coupling constants, the renormalization
    condition in (16) implies that
    \begin{align}
     \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex[crossed dot] (v) {};
           \vertex[above left = of v] (f1);
           \vertex[below left = of v] (f2);
           \vertex[above right = of v] (f3);
           \vertex[below right = of v] (f4);
           \diagram* {
             (f1) -- (v),
             (f2) -- (v),
             (v) -- (f3),
             (v) -- (f4), };
         \end{feynman}
       \end{tikzpicture}}
     = \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex (v1);
           \vertex[right = of v1] (v2);
           \vertex[above left = of v1] (f1);
           \vertex[below left = of v1] (f2);
           \vertex[above right = of v2] (f3);
           \vertex[below right = of v2] (f4);
           \diagram* {
             (f1) -- (v1) --[half left, scalar] (v2) -- (f3),
             (f2) -- (v1) --[half right, scalar] (v2) -- (f4), };
         \end{feynman}
       \end{tikzpicture}},
     \tag{25}
   \end{align}
   which means that the sum over all counter-term diagrams in (24) is
   \begin{align}
     \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex[crossed dot] (v1) {};
           \vertex[right = 4em of v1] (v2);
           \vertex[above left = of v1] (f1);
           \vertex[below left = of v1] (f2);
           \vertex[above right = of v1] (f3);
           \vertex[below left = of v2] (f4);
           \vertex[below right = of v2] (f5);
           \vertex[above right = of v2] (f6);
           \diagram* {
             (f1) -- (v1) -- (f3),
             (f2) -- (v1) --[scalar] (v2),
             (f4) -- (v2) -- (f5),
             (v2) -- (f6), };
         \end{feynman}
       \end{tikzpicture}}
     = \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex (v1);
           \vertex[right = of v1] (v2);
           \vertex[below right = of v2] (v3);
           \vertex[above left = of v1] (f1);
           \vertex[below left = of v1] (f2);
           \vertex[below left = of v3] (f3);
           \vertex[above right = of v2] (f4);
           \vertex[above right = of v3] (f5);
           \vertex[below right = of v3] (f6);
           \diagram* {
             (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
             (f2) -- (v1) --[half right, scalar] (v2)
             --[scalar] (v3) -- (f5),
             (f3) -- (v3) -- (f6), };
         \end{feynman}
       \end{tikzpicture}}.
     \tag{26}
   \end{align}
   The net contribution of the these counter-term diagrams together
   with the two-particle-loop diagrams in (23) is therefore
   \begin{multline}
     - \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex[crossed dot] (v1) {};
           \vertex[right = 4em of v1] (v2);
           \vertex[above left = of v1] (f1);
           \vertex[below left = of v1] (f2);
           \vertex[above right = of v1] (f3);
           \vertex[below left = of v2] (f4);
           \vertex[below right = of v2] (f5);
           \vertex[above right = of v2] (f6);
           \diagram* {
             (f1) -- (v1) -- (f3),
             (f2) -- (v1) --[scalar] (v2),
             (f4) -- (v2) -- (f5),
             (v2) -- (f6), };
         \end{feynman}
       \end{tikzpicture}}
     + \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex (v1);
           \vertex[right = of v1] (v2);
           \vertex[below right = of v2] (v3);
           \vertex[above left = of v1] (f1);
           \vertex[below left = of v1] (f2);
           \vertex[below left = of v3] (f3);
           \vertex[above right = of v2] (f4);
           \vertex[above right = of v3] (f5);
           \vertex[below right = of v3] (f6);
           \diagram* {
             (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
             (f2) -- (v1) --[half right, scalar] (v2)
             --[scalar] (v3) -- (f5),
             (f3) -- (v3) -- (f6), };
         \end{feynman}
       \end{tikzpicture}}
     - \f12 \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              -- (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left] (v2) -- (f4),
              (f2) -- (v1) --[half right] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}} \\
      = - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              -- (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left] (v2) -- (f4),
              (f2) -- (v1) --[half right] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}.
      \tag{27}
    \end{multline}
    An identical cancellation occurs for the mirror images of the
    diagrams in (23) and (24), which results in a contribution to the
    effective Hamiltonian that is equal to (27).}

  by:

  \green{The sum over loop diagrams in (23), meanwhile, contains a
    divergence that must be cancelled out by the counter-terms in
    (24).  To leading order in the coupling constants, the
    renormalization condition in (16) implies that
    \begin{align}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex[crossed dot] (v) {};
            \vertex[above left = of v] (f1);
            \vertex[below left = of v] (f2);
            \vertex[above right = of v] (f3);
            \vertex[below right = of v] (f4);
            \diagram* {
              (f1) -- (v),
              (f2) -- (v),
              (v) -- (f3),
              (v) -- (f4), };
          \end{feynman}
        \end{tikzpicture}}
      = \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above right = of v2] (f3);
            \vertex[below right = of v2] (f4);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f3),
              (f2) -- (v1) --[half right, scalar] (v2) -- (f4), };
          \end{feynman}
        \end{tikzpicture}},
      \tag{30}
    \end{align}
    which can be expanded to find
    \begin{align}
      K \widetilde G^{rs}_{r''s''}
      = \sum_{\ell,m,r',s'} \f{K_{\ell m}^2}{E_{\ell m}}
      G^{rs}_{r's'} G^{r's'}_{r''s''}.
      \tag{31}
    \end{align}
    In terms of ordinary coupling constants, the counter-term diagram
    in (24) is therefore
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex[crossed dot] (v1) {};
          \vertex[above left = 4em of v1] (f1) {$\mu r$};
          \vertex[below left = 4em of v1] (f2) {$\nu s$};
          \vertex[right = 4em of v1] (v2);
          \vertex[above right = 4em of v1] (f3) {$\mu r''$};
          \vertex[below left = of v2] (f4) {$\rho t$};
          \vertex[below right = of v2] (f5) {$\rho t'$};
          \vertex[above right = of v2] (f6) {$\nu s'''$};
          \diagram* {
            (f1) -- (v1) -- (f3),
            (f2) -- (v1)
            --[scalar, edge label=$n\nu s''$] (v2),
            (f4) -- (v2) -- (f5),
            (v2) -- (f6), };
        \end{feynman}
      \end{tikzpicture}
      = \sum_{\ell,m,r',s'}
      \f{K_{\ell m}^2 K_n^2}{K E_{\ell m} E_n}
      G^{rs}_{r's'} G^{r's'}_{r''s''} G^{s''t}_{s'''t'}
      \c_{\mu r''}^\dag \c_{\nu s'''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}.
      \tag{32}
    \end{align}
    Altogether, the contribution to the third-order three-body
    interaction Hamiltonian from loop diagrams of the form in (23) and
    counter-term diagrams of the form in (24) is
    \begin{multline}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
        - \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex[crossed dot] (v1) {};
            \vertex[right = 4em of v1] (v2);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above right = of v1] (f3);
            \vertex[below left = of v2] (f4);
            \vertex[below right = of v2] (f5);
            \vertex[above right = of v2] (f6);
            \diagram* {
              (f1) -- (v1) -- (f3),
              (f2) -- (v1) --[scalar] (v2),
              (f4) -- (v2) -- (f5),
              (v2) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              -- (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left] (v2) -- (f4),
              (f2) -- (v1) --[half right] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}} \\
      = \p{\alpha_{3,2}^{(3)}
        - \f12\alpha_{4,3}^{(3)} - \f12\alpha_5^{(3)}}
      \H_{3,2}^{(3)},
      \tag{33}
    \end{multline}
    where
    \begin{align}
      \alpha_{3,2}^{(3)}
      \equiv \sum_{\substack{\ell+m>0\\n>0}}
      \f{K_{\ell m} K_n}{E_{\ell m} E_n}
      \p{K^{\ell m}_n - \f{K_{\ell m} K_n}{K}},
      &&
      \alpha_{4,3}^{(3)}
      \equiv K \sum_{m+n>0} \f{K_{mn}^2}{E_{mn}^2},
      \tag{34}
    \end{align}
    and
    \begin{align}
      \H_{3,2}^{(3)} \equiv \sum_{\abs{\set{\mu,\nu,\rho}}=3}
      G^{rs}_{r's'} G^{r's'}_{r''s''} G^{s''t}_{s'''t'}
      \c_{\mu r''}^\dag \c_{\nu s'''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}.
      \tag{35}
    \end{align}
    An equal contribution comes from the mirror images of these
    diagrams, such that the net third-order three-body interaction
    Hamiltonian is
    \begin{align}
      H_3^{(3)} = \p{\alpha_{3,1}^{(3)} - \alpha_5^{(3)}} \H_{3,1}^{(3)}
      + \p{2\alpha_{3,2}^{(3)} - \alpha_{4,3}^{(3)} - \alpha_5^{(3)}}
      \H_{3,2}^{(3)}.
      \tag{36}
    \end{align}
    Note that the aforementioned divergence and its cancellation are
    buried in $\alpha_{3,2}^{(3)}$.  Formally, this factor is
    calculated by imposing an ultraviolet cutoff $\Lambda$ for the
    maximum values of motional state indices $\ell,m,n$, and then
    taking the limit $\Lambda\to\infty$.  This procedure ensures that
    there are no divergences in $\alpha_{3,2}^{(3)}$.}

  Accordingly, in the last appendix (G) we have replaced all instances
  of \red{$\alpha_3^{(1)}$} with \green{$\alpha_{3,1}^{(3)}$}, and the
  replaced prefactor \red{$-\p{\alpha_{4,3}^{(3)}+\alpha_5^{(3)}}$} by
  \green{$+ \p{2\alpha_{3,2}^{(3)} - \alpha_{4,3}^{(3)} -
      \alpha_5^{(3)}}$}.

  We have also re-organized the text in section III.D to improve
  readability in light of the above changes, and similarly
  re-organized the text in section III.E in order for this section to
  have a structure similar to that of section III.D.  In full,
  sections III.D and III.E now read:

  \green{{\bf Effective three-body interactions at third order}}

  \green{The third-order effective interaction Hamiltonian
    $H_{\t{int}}^{(3)}$ in (14) contains both three- and four-body
    terms.  To compactly enumerate and evaluate all three-body
    diagrams at third order, we introduce an expanded coupling symbol
    \begin{align}
      G^{\mu q;\nu r}_{\rho s;\sigma t} \equiv \left\{
        \begin{array}{ll}
          G^{qr}_{st} & ~ \p{\mu,\nu} = \p{\rho,\sigma}
          \\
          - G^{qr}_{ts} & ~ \p{\mu,\nu} = \p{\sigma,\rho}
          \\
          0 & ~ \t{otherwise}
        \end{array}\right.
      \tag{20}
    \end{align}
    for more general
    $\p{\mu,q}+\p{\nu,r}\leftrightarrow\p{\rho,s}+\p{\sigma,t}$
    coupling induced by terms proportional to
    $\c_{\rho s}^\dag \c_{\sigma t}^\dag \c_{\nu r} \c_{\mu q}$.  The
    minus sign in (20) accounts for fermionic statistics: if
    $\p{\mu,\nu}=\p{\sigma,\rho}$, then we are considering a term of
    the form
    \begin{align}
      G^{\mu q;\nu r}_{\nu s;\mu t}
      \c_{\nu s}^\dag \c_{\mu t}^\dag \c_{\nu r} \c_{\mu q}
      = -G^{qr}_{ts} \c_{\nu s}^\dag \c_{\mu t}^\dag \c_{\mu r} \c_{\nu q}
      = G^{qr}_{ts} \c_{\mu t}^\dag \c_{\nu s}^\dag \c_{\nu r} \c_{\mu q}.
    \end{align}
    At the cost of introducing an additional sum over new nuclear spin
    indices, the expanded coupling symbol allows us to collect
    together diagrams which have the same graph topology, but
    represent different matrix elements of the effective Hamiltonian
    due to the exchange of nuclear spins at a vertex.  The third order
    three-body diagrams in $H_{\t{int}}^{(3)}$ are then
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex (v1);
          \vertex[below right = of v1] (v2);
          \vertex[above right = of v2] (v3);
          \vertex[above left = of v1] (f1) {$\mu r$};
          \vertex[left = of v1] (f2) {$\nu s$};
          \vertex[below left = of v2] (f3) {$\rho t$};
          \vertex[above right = of v3] (f4) {$\mu r''$};
          \vertex[right = of v3] (f5) {$\nu's'''$};
          \vertex[below right = of v2] (f6) {$\rho't'$};
          \diagram* {
            (f1) -- (v1) --[scalar, edge label=$\ell\mu r'$] (v3)
            -- (f4),
            (f2) -- (v1)
            --[scalar, edge label'=$m\nu s'$] (v2)
            --[scalar, edge label'=$n\nu's''$] (v3)
            -- (f5),
            (f3) -- (v2) -- (f6), };
        \end{feynman}
      \end{tikzpicture}
      \propto K_{\ell m} K^m_n K_{\ell n}
      G^{rs}_{r's'} G^{\nu s';\rho t}_{\nu's'';\rho't'} G^{r's''}_{r''s'''}
      \c_{\mu r''}^\dag \c_{\nu's'''}^\dag \c_{\rho't'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r},
      \tag{22}
    \end{align}
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex (v1);
          \vertex[right = of v1] (v2);
          \vertex[below right = of v2] (v3);
          \vertex[above left = of v1] (f1) {$\mu r$};
          \vertex[below left = of v1] (f2) {$\nu s$};
          \vertex[below left = of v3] (f3) {$\rho t$};
          \vertex[above right = of v2] (f4) {$\mu r''$};
          \vertex[above right = of v3] (f5) {$\nu s'''$};
          \vertex[below right = of v3] (f6) {$\rho t'$};
          \diagram* {
            (f1) -- (v1)
            --[half left, scalar, edge label=$\ell\mu r'$] (v2)
            -- (f4),
            (f2) -- (v1)
            --[half right, scalar, edge label'=$m\nu s'$] (v2)
            --[scalar, edge label=$n\nu s''$] (v3)
            -- (f5),
            (f3) -- (v3) -- (f6), };
        \end{feynman}
      \end{tikzpicture}
      \propto K_{\ell m} K^{\ell m}_n K_n
      G^{rs}_{r's'} G^{r's'}_{r''s''} G^{s''t}_{s'''t'}
      \c_{\mu r''}^\dag \c_{\nu s'''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r},
      \tag{23}
    \end{align}
    and the mirror image of (23).  As prescribed by
    $H_{\t{int}}^{(3)}$ in (14), these diagrams have an associated
    minus sign if they contain only one excited virtual state, and a
    factor of $1/2$ if they contain a virtual ground state.
    Remembering that counter-terms are $\O\p{G^2}$, there are
    additionally two third-order three-body diagrams in
    $H_{\t{int}}^{(2)}$, namely
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex[crossed dot] (v1) {};
          \vertex[above left = 4em of v1] (f1) {$\mu r$};
          \vertex[below left = 4em of v1] (f2) {$\nu s$};
          \vertex[right = 4em of v1] (v2);
          \vertex[above right = 4em of v1] (f3) {$\mu r'$};
          \vertex[below left = of v2] (f4) {$\rho t$};
          \vertex[below right = of v2] (f5) {$\rho t'$};
          \vertex[above right = of v2] (f6) {$\nu s''$};
          \diagram* {
            (f1) -- (v1) -- (f3),
            (f2) -- (v1)
            --[scalar, edge label=$n\nu s'$] (v2),
            (f4) -- (v2) -- (f5),
            (v2) -- (f6), };
        \end{feynman}
      \end{tikzpicture}
      \propto K_n^2 \widetilde G^{rs}_{r's'} G^{s't}_{s''t'}
      \c_{\mu r'}^\dag \c_{\nu s''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}
      \tag{24}
    \end{align}
    and its mirror image, where $\widetilde G^{qr}_{st}$ is equal to
    the counter-term associated with $G^{qr}_{st}$.}

  \green{The net contribution to the third-order three-body
    interaction Hamiltonian from three-particle-loop diagrams of the
    form in (22) is
    \begin{align}
     \shrink{
       \begin{tikzpicture}
         \begin{feynman}
           \vertex (v1);
           \vertex[below right = of v1] (v2);
           \vertex[above right = of v2] (v3);
           \vertex[above left = of v1] (f1);
           \vertex[left = of v1] (f2);
           \vertex[below left = of v2] (f3);
           \vertex[above right = of v3] (f4);
           \vertex[right = of v3] (f5);
           \vertex[below right = of v2] (f6);
           \diagram* {
             (f1) -- (v1) --[scalar] (v3) -- (f4),
             (f2) -- (v1) --[scalar] (v2) --[scalar] (v3) -- (f5),
             (f3) -- (v2) -- (f6), };
         \end{feynman}
       \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[below right = of v1] (v2);
            \vertex[above right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[left = of v1] (f2);
            \vertex[below left = of v2] (f3);
            \vertex[above right = of v3] (f4);
            \vertex[right = of v3] (f5);
            \vertex[below right = of v2] (f6);
            \diagram* {
              (f1) -- (v1) -- (v3) -- (f4),
              (f2) -- (v1) --[scalar] (v2) -- (v3) -- (f5),
              (f3) -- (v2) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[below right = of v1] (v2);
            \vertex[above right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[left = of v1] (f2);
            \vertex[below left = of v2] (f3);
            \vertex[above right = of v3] (f4);
            \vertex[right = of v3] (f5);
            \vertex[below right = of v2] (f6);
            \diagram* {
              (f1) -- (v1) -- (v3) -- (f4),
              (f2) -- (v1) -- (v2) --[scalar] (v3) -- (f5),
              (f3) -- (v2) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      = \p{\alpha_{3,1}^{(3)} - \alpha_5^{(3)}} \H_{3,1}^{(3)},
      \tag{25}
    \end{align}
    where
    \begin{align}
      \alpha_{3,1}^{(3)} \equiv \sum_{\substack{\ell+m>0\\\ell+n>0}}
      \f{K_{\ell m} K^m_n K_{\ell n}}{E_{\ell m} E_{\ell n}},
      &&
      \alpha_5^{(3)}
      \equiv  K \sum_{n>0} \f{K_n^2}{E_n^2},
      \tag{26}
    \end{align}
    and
    \begin{align}
      \H_{3,1}^{(3)} \equiv \sum_{\abs{\set{\mu,\nu,\rho}}=3}
      G^{rs}_{r's'} G^{\nu s'\rho t}_{\nu's''\rho't'} G^{r's''}_{r''s'''}
      \c_{\mu r''}^\dag \c_{\nu's'''}^\dag \c_{\rho't'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}.
      \tag{27}
    \end{align}
    Even though this contribution comes from loop diagrams, the
    factors $\alpha_{3,1}^{(3)}$ and $\alpha_5^{(3)}$ in (26) are
    finite.  At large motional state indices $n$, atoms become free
    particles for which $n$ essentially indexes discrete momentum
    states.  These atoms thus have an energy which asymptotically
    scales as $E_n\sim n^2\equiv n_\x^2+n_\y^2+n_\z^2$.  Furthermore,
    the oscillatory behavior of atomic wavefunctions with increasing
    motional state indices $\ell,m$ implies that the overlap integral
    $K_{\ell m}$ becomes sharply peaked at $\ell\approx m$ as $\ell$
    and $m$ get large.  The asymptotic behavior of
    $\alpha_{3,1}^{(3)}$ at large $\ell,m,n$ is therefore
    \begin{align}
      \alpha_{3,1}^{(3)}
      \sim \int \f{\d^3\ell~\d^3m~\d^3n}{\p{\ell^2+m^2}\p{\ell^2+n^2}}
      ~\delta\p{\ell-m}\delta\p{\ell-n}
      \sim \int \f{\d^3\ell}{\ell^4}
      \sim \int_{\ell_{\t{min}}}^\infty \f{\d\ell}{\ell^2}
      \sim \f1{\ell_{\t{min}}},
      \tag{28}
    \end{align}
    where in the last integral we changed to spherical coordinates,
    and $\ell_{\t{min}}^2$ is the minimum value of $\ell^2$ for which
    \begin{enumerate*}
    \item the energy $E_\ell\sim\ell^2$, and
    \item the integral expression in (28) is a good approximation to
      the corresponding sum in (26).
    \end{enumerate*}
    Note that the introduction of $\ell_{\t{min}}$ amounts to
    neglecting a finite number of terms in the sum over $\ell,m,n$ in
    (25), whose contribution to the value of $\alpha_{3,1}^{(3)}$ is
    finite.  Convergence of $\alpha_5^{(3)}$ is similarly guaranteed
    by the fact that the overlap integral $K_n$ does not
    asymptotically grow with increasing $n$, such that
    $\alpha_5^{(3)}$ asymptotically behaves as
    \begin{align}
      \alpha_5^{(3)} \sim \int \f{\d^3 n}{n^4}
      \sim \int_{n_{\t{min}}}^\infty \f{\d n}{n^2}
      \sim \f1{n_{\t{min}}},
      \tag{29}
    \end{align}
    where again $n_{\t{min}}$ is defined similarly to
    $\ell_{\t{min}}$.}

  \green{The sum over loop diagrams in (23), meanwhile, contains a
    divergence that must be cancelled out by the counter-terms in
    (24).  To leading order in the coupling constants, the
    renormalization condition in (16) implies that
    \begin{align}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex[crossed dot] (v) {};
            \vertex[above left = of v] (f1);
            \vertex[below left = of v] (f2);
            \vertex[above right = of v] (f3);
            \vertex[below right = of v] (f4);
            \diagram* {
              (f1) -- (v),
              (f2) -- (v),
              (v) -- (f3),
              (v) -- (f4), };
          \end{feynman}
        \end{tikzpicture}}
      = \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above right = of v2] (f3);
            \vertex[below right = of v2] (f4);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f3),
              (f2) -- (v1) --[half right, scalar] (v2) -- (f4), };
          \end{feynman}
        \end{tikzpicture}},
      \tag{30}
    \end{align}
    which can be expanded to find
    \begin{align}
      K \widetilde G^{rs}_{r''s''}
      = \sum_{\ell,m,r',s'} \f{K_{\ell m}^2}{E_{\ell m}}
      G^{rs}_{r's'} G^{r's'}_{r''s''}.
      \tag{31}
    \end{align}
    In terms of ordinary coupling constants, the counter-term diagram
    in (24) is therefore
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex[crossed dot] (v1) {};
          \vertex[above left = 4em of v1] (f1) {$\mu r$};
          \vertex[below left = 4em of v1] (f2) {$\nu s$};
          \vertex[right = 4em of v1] (v2);
          \vertex[above right = 4em of v1] (f3) {$\mu r''$};
          \vertex[below left = of v2] (f4) {$\rho t$};
          \vertex[below right = of v2] (f5) {$\rho t'$};
          \vertex[above right = of v2] (f6) {$\nu s'''$};
          \diagram* {
            (f1) -- (v1) -- (f3),
            (f2) -- (v1)
            --[scalar, edge label=$n\nu s''$] (v2),
            (f4) -- (v2) -- (f5),
            (v2) -- (f6), };
        \end{feynman}
      \end{tikzpicture}
      = \sum_{\ell,m,r',s'}
      \f{K_{\ell m}^2 K_n^2}{K E_{\ell m} E_n}
      G^{rs}_{r's'} G^{r's'}_{r''s''} G^{s''t}_{s'''t'}
      \c_{\mu r''}^\dag \c_{\nu s'''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}.
      \tag{32}
    \end{align}
    Altogether, the contribution to the third-order three-body
    interaction Hamiltonian from loop diagrams of the form in (23) and
    counter-term diagrams of the form in (24) is
    \begin{multline}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
        - \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex[crossed dot] (v1) {};
            \vertex[right = 4em of v1] (v2);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above right = of v1] (f3);
            \vertex[below left = of v2] (f4);
            \vertex[below right = of v2] (f5);
            \vertex[above right = of v2] (f6);
            \diagram* {
              (f1) -- (v1) -- (f3),
              (f2) -- (v1) --[scalar] (v2),
              (f4) -- (v2) -- (f5),
              (v2) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left, scalar] (v2) -- (f4),
              (f2) -- (v1) --[half right, scalar] (v2)
              -- (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v3] (f3);
            \vertex[above right = of v2] (f4);
            \vertex[above right = of v3] (f5);
            \vertex[below right = of v3] (f6);
            \diagram* {
              (f1) -- (v1) --[half left] (v2) -- (f4),
              (f2) -- (v1) --[half right] (v2)
              --[scalar] (v3) -- (f5),
              (f3) -- (v3) -- (f6), };
          \end{feynman}
        \end{tikzpicture}} \\
      = \p{\alpha_{3,2}^{(3)}
        - \f12\alpha_{4,3}^{(3)} - \f12\alpha_5^{(3)}}
      \H_{3,2}^{(3)},
      \tag{33}
    \end{multline}
    where
    \begin{align}
      \alpha_{3,2}^{(3)}
      \equiv \sum_{\substack{\ell+m>0\\n>0}}
      \f{K_{\ell m} K_n}{E_{\ell m} E_n}
      \p{K^{\ell m}_n - \f{K_{\ell m} K_n}{K}},
      &&
      \alpha_{4,3}^{(3)}
      \equiv K \sum_{m+n>0} \f{K_{mn}^2}{E_{mn}^2},
      \tag{34}
    \end{align}
    and
    \begin{align}
      \H_{3,2}^{(3)} \equiv \sum_{\abs{\set{\mu,\nu,\rho}}=3}
      G^{rs}_{r's'} G^{r's'}_{r''s''} G^{s''t}_{s'''t'}
      \c_{\mu r''}^\dag \c_{\nu s'''}^\dag \c_{\rho t'}^\dag
      \c_{\rho t} \c_{\nu s} \c_{\mu r}.
      \tag{35}
    \end{align}
    An equal contribution comes from the mirror images of these
    diagrams, such that the net third-order three-body interaction
    Hamiltonian is
    \begin{align}
      H_3^{(3)} = \p{\alpha_{3,1}^{(3)} - \alpha_5^{(3)}} \H_{3,1}^{(3)}
      + \p{2\alpha_{3,2}^{(3)} - \alpha_{4,3}^{(3)} - \alpha_5^{(3)}}
      \H_{3,2}^{(3)}.
      \tag{36}
    \end{align}
    Note that the aforementioned divergence and its cancellation are
    buried in $\alpha_{3,2}^{(3)}$.  Formally, this factor is
    calculated by imposing an ultraviolet cutoff $\Lambda$ for the
    maximum values of motional state indices $\ell,m,n$, and then
    taking the limit $\Lambda\to\infty$.  This procedure ensures that
    there are no divergences in $\alpha_{3,2}^{(3)}$.}

  \green{{\bf Effective four-body interactions at third order}}

  \green{At third order in the coupling constants, we have four-body
    terms of the form
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex (v1);
          \vertex[above right = 1.5em of v1] (v2);
          \vertex[below right = 2.5em of v1] (v3);
          \vertex[right = 0.5em of v1] (label)
          {$\let\scriptstyle\textstyle\substack{m\mu q'\\n\nu r'}$};
          \vertex[above left = of v1] (f1) {$\mu q$};
          \vertex[below left = of v1] (f2) {$\nu r$};
          \vertex[above left = of v2] (f3) {$\rho s$};
          \vertex[below left = of v3] (f4) {$\sigma t$};
          \vertex[above right = of v2] (f5) {$\rho s'$};
          \vertex[right = of v2] (f6) {$\mu q''$};
          \vertex[right = of v3] (f7) {$\nu r''$};
          \vertex[below right = of v3] (f8) {$\sigma t'$};
          \diagram* {
            (f1) -- (v1) --[scalar] (v2) -- (f6),
            (f2) -- (v1) --[scalar] (v3) -- (f7),
            (f3) -- (v2) -- (f5),
            (f4) -- (v3) -- (f8),
          };
        \end{feynman}
      \end{tikzpicture}
      \propto K_{mn} K_m K_n G^{qr}_{q'r'} G^{q's}_{q''s'} G^{r't}_{r''t'}
      \c_{\mu q''}^\dag \c_{\nu r''}^\dag
      \c_{\rho s'}^\dag \c_{\sigma t'}^\dag
      \c_{\sigma t} \c_{\rho s} \c_{\nu r} \c_{\mu q}
      \tag{37}
    \end{align}
    and its mirror image, as well as
    \begin{align}
      \begin{tikzpicture}
        \begin{feynman}
          \vertex[label=0:$~m\mu q'$] (v1);
          \vertex[below right = of v1, label=0:$~n\mu'q''$] (v2);
          \vertex[below right = of v2] (v3);
          \vertex[above left = of v1] (f1) {$\mu q$};
          \vertex[below left = of v1] (f2) {$\nu r$};
          \vertex[below left = of v2] (f3) {$\rho s$};
          \vertex[below left = of v3] (f4) {$\sigma t$};
          \vertex[above right = of v1] (f5) {$\nu r'$};
          \vertex[above right = of v2] (f6) {$\rho's'$};
          \vertex[above right = of v3] (f7) {$\sigma t'$};
          \vertex[below right = of v3] (f8) {$\mu'q'''$};
          \diagram* {
            (f1) -- (v1) -- (f5),
            (f2) -- (v1) -- (f5),
            (v1) --[scalar] (v2) --[scalar] (v3) -- (f8),
            (f3) -- (v2) -- (f6),
            (f4) -- (v3) -- (f7),
          };
        \end{feynman}
      \end{tikzpicture}
      \propto K_m K^m_n K_n
      G^{qr}_{q'r'} G^{\mu q'\rho s}_{\mu'q''\rho's'} G^{q''t}_{q'''t'}
      \c_{\mu'q'''}^\dag \c_{\nu r'}^\dag
      \c_{\rho's'}^\dag \c_{\sigma t'}^\dag
      \c_{\sigma t} \c_{\rho s} \c_{\nu r} \c_{\mu q}.
      \tag{38}
    \end{align}
    As we are computing the leading-order contribution to effective
    four-body interactions, there are no counter-terms contributions.
    In principle, there is now also the possibility to make the
    disconnected diagrams of the form
    \begin{align}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[right = of v1] (v2);
            \vertex[above right = of v2] (f3);
            \vertex[below right = of v2] (f4);
            \vertex[below = 1em of f2] (f5);
            \vertex[below = of f5] (f6);
            \vertex[below = 1em of f4] (f7);
            \vertex[below = of f7] (f8);
            \diagram* {
              (f1) -- (v1),
              (f2) -- (v1),
              (v2) -- (f3),
              (v2) -- (f4),
              (v1) --[scalar, half left] (v2),
              (v1) --[scalar, half right] (v2),
              (f5) -- (f8),
              (f6) -- (f7) };
          \end{feynman}
        \end{tikzpicture}},
      &&
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[right = of v1] (v2);
            \vertex[above right = of v2] (f3);
            \vertex[below right = of v2] (f4);
            \vertex[left = of f2] (a1);
            \vertex[left = of f4] (a2);
            \vertex[below = 1em of a1] (f5);
            \vertex[below = of f5] (f6);
            \vertex[below = 1em of a2] (f7);
            \vertex[below = of f7] (f8);
            \diagram* {
              (f1) -- (v1),
              (f2) -- (v1),
              (v2) -- (f3),
              (v2) -- (f4),
              (v1) --[scalar, half left] (v2),
              (v1) --[scalar, half right] (v2),
              (f5) -- (f8),
              (f6) -- (f7) };
          \end{feynman}
        \end{tikzpicture}},
      &&
      \t{and}
      &&
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[right = of v1] (v2);
            \vertex[above right = of v2] (f3);
            \vertex[below right = of v2] (f4);
            \vertex[right = of f2] (a1);
            \vertex[right = of f4] (a2);
            \vertex[below = 1em of a1] (f5);
            \vertex[below = of f5] (f6);
            \vertex[below = 1em of a2] (f7);
            \vertex[below = of f7] (f8);
            \diagram* {
              (f1) -- (v1),
              (f2) -- (v1),
              (v2) -- (f3),
              (v2) -- (f4),
              (v1) --[scalar, half left] (v2),
              (v1) --[scalar, half right] (v2),
              (f5) -- (f8),
              (f6) -- (f7) };
          \end{feynman}
        \end{tikzpicture}}.
      \tag{39}
    \end{align}
    As prescribed by $H_{\t{int}}^{(3)}$ in (14), however, the second
    and third of these diagrams pick up a factor of $-1/2$, so the sum
    over disconnected diagrams vanishes.}

  \green{The contribution to the third-order four-body interaction
    Hamiltonian from diagrams of the form in (37) is
    \begin{align}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[above right = 1.5em of v1] (v2);
            \vertex[below right = 2.5em of v1] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above left = of v2] (f3);
            \vertex[below left = of v3] (f4);
            \vertex[above right = of v2] (f5);
            \vertex[right = of v2] (f6);
            \vertex[right = of v3] (f7);
            \vertex[below right = of v3] (f8);
            \diagram* {
              (f1) -- (v1) --[scalar] (v2) -- (f6),
              (f2) -- (v1) --[scalar] (v3) -- (f7),
              (f3) -- (v2) -- (f5),
              (f4) -- (v3) -- (f8),
            };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[above right = 1.5em of v1] (v2);
            \vertex[below right = 2.5em of v1] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[above left = of v2] (f3);
            \vertex[below left = of v3] (f4);
            \vertex[above right = of v2] (f5);
            \vertex[right = of v2] (f6);
            \vertex[right = of v3] (f7);
            \vertex[below right = of v3] (f8);
            \diagram* {
              (f1) -- (v1) --[scalar] (v2) -- (f6),
              (f2) -- (v1) -- (v3) -- (f7),
              (f3) -- (v2) -- (f5),
              (f4) -- (v3) -- (f8),
            };
          \end{feynman}
        \end{tikzpicture}}
      = \p{\alpha_{4,1}^{(3)} - \f12\alpha_5^{(3)}} \H_{4,1},
      \tag{40}
    \end{align}
    where
    \begin{align}
      \alpha_{4,1}^{(3)}
      \equiv \sum_{\substack{m\ge0\\n>0}} \f{K_{mn} K_m K_n}{E_{mn} E_n},
      \tag{41}
    \end{align}
    and
    \begin{align}
      \H_{4,1}^{(3)}
      \equiv \sum_{\abs{\set{\mu,\nu,\rho,\sigma}}=4}
      G^{qr}_{q'r'} G^{q's}_{q''s'} G^{r't}_{r''t'}
      \c_{\mu q''}^\dag \c_{\nu r''}^\dag
      \c_{\rho s'}^\dag \c_{\sigma t'}^\dag
      \c_{\sigma t} \c_{\rho s} \c_{\nu r} \c_{\mu q}.
      \tag{42}
    \end{align}
    An equal contribution comes from the mirror images of these
    diagrams.  The contribution from diagrams of the form in (38),
    meanwhile, is
    \begin{align}
      \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[below right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v2] (f3);
            \vertex[below left = of v3] (f4);
            \vertex[above right = of v1] (f5);
            \vertex[above right = of v2] (f6);
            \vertex[above right = of v3] (f7);
            \vertex[below right = of v3] (f8);
            \diagram* {
              (f1) -- (v1) -- (f5),
              (f2) -- (v1) -- (f5),
              (v1) --[scalar] (v2) --[scalar] (v3) -- (f8),
              (f3) -- (v2) -- (f6),
              (f4) -- (v3) -- (f7),
            };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[below right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v2] (f3);
            \vertex[below left = of v3] (f4);
            \vertex[above right = of v1] (f5);
            \vertex[above right = of v2] (f6);
            \vertex[above right = of v3] (f7);
            \vertex[below right = of v3] (f8);
            \diagram* {
              (f1) -- (v1) -- (f5),
              (f2) -- (v1) -- (f5),
              (v1) --[scalar] (v2) -- (v3) -- (f8),
              (f3) -- (v2) -- (f6),
              (f4) -- (v3) -- (f7),
            };
          \end{feynman}
        \end{tikzpicture}}
      - \f12 \shrink{
        \begin{tikzpicture}
          \begin{feynman}
            \vertex (v1);
            \vertex[below right = of v1] (v2);
            \vertex[below right = of v2] (v3);
            \vertex[above left = of v1] (f1);
            \vertex[below left = of v1] (f2);
            \vertex[below left = of v2] (f3);
            \vertex[below left = of v3] (f4);
            \vertex[above right = of v1] (f5);
            \vertex[above right = of v2] (f6);
            \vertex[above right = of v3] (f7);
            \vertex[below right = of v3] (f8);
            \diagram* {
              (f1) -- (v1) -- (f5),
              (f2) -- (v1) -- (f5),
              (v1) -- (v2) --[scalar] (v3) -- (f8),
              (f3) -- (v2) -- (f6),
              (f4) -- (v3) -- (f7),
            };
          \end{feynman}
        \end{tikzpicture}}
      = \p{\alpha_{4,2}^{(3)} - \alpha_5^{(3)}} \H_{4,2},
      \tag{43}
    \end{align}
    where
    \begin{align}
      \alpha_{4,2}^{(3)}
      \equiv \sum_{m,n>0} \f{K_m K^m_n K_n}{E_m E_n},
      \tag{44}
    \end{align}
    and
    \begin{align}
      \H_{4,2}^{(3)}
      \equiv \sum_{\abs{\set{\mu,\nu,\rho,\sigma}}=4}
      G^{qr}_{q'r'} G^{\mu q'\rho s}_{\mu'q''\rho's'} G^{q''t}_{q'''t'}
      \c_{\mu'q'''}^\dag \c_{\nu r'}^\dag
      \c_{\rho's'}^\dag \c_{\sigma t'}^\dag
      \c_{\sigma t} \c_{\rho s} \c_{\nu r} \c_{\mu q}.
      \tag{45}
    \end{align}
    The net third-order four-body interaction Hamiltonian is therefore
    \begin{align}
      H_4^{(3)}
      = \p{2\alpha_{4,1}^{(3)} - \alpha_5^{(3)}} \H_{4,1}^{(3)}
      + \p{\alpha_{4,2}^{(3)} - \alpha_5^{(3)}} \H_{4,2}^{(3)}.
      \tag{46}
    \end{align}}

  We thank the referee again for pointing out our error between
  Eqs.~(25) and (26), and hope that the above changes address this
  error appropriately.  We note that the above changes address the
  only non-trivial use of counter-terms in our manuscript, which
  therefore cannot contain any other errors of a similar nature.

  Finally, the referee is also correct in their comment that we
  implicitly assume no non-universal contributions to the effective
  three-body interaction.  We agree that it is worthwhile to make this
  assumption explicit, and have therefore modified the opening of
  section III.C on effective three-body interactions at leading order.
  Specifically, we have replaced the text (page 17, line 19):

  \red{At second order in the coupling constants, the expansion for
    $H_{\t{int}}^{(2)}$ in (13) gives rise to effective three-body
    interactions.}

  by:

  \green{Our theory of effective multi-body interactions assumes no
    non-universal contribution to the three-body interaction energy,
    which is to say that we assume the absence of real (as opposed to
    effective), bare three-body interactions.  Consequently,
    three-body interactions do not appear until second order in the
    coupling constants of the effective theory, in the expansion of
    $H_{\t{int}}^{(2)}$ in (13).}

  We hope that this change addresses the question of non-universal
  three-body contributions to a satisfactory degree.

\end{enumerate}

\end{document}


\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[osf]{libertine}
\usepackage[scaled=0.8]{beramono}
\usepackage[margin=1.5in]{geometry}
\usepackage{url}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{nicefrac}
\usepackage{microtype}
\usepackage{bm}

\usepackage{sectsty}
\sectionfont{\large}
\subsectionfont{\normalsize}

\usepackage{titlesec}
\titlespacing{\section}{0pt}{10pt plus 2pt minus 2pt}{0pt plus 2pt minus 0pt}
\titlespacing{\subsection}{0pt}{5pt plus 2pt minus 2pt}{0pt plus 2pt minus 0pt}

\newcommand{\acro}[1]{\textsc{\MakeLowercase{#1}}}
\newcommand{\given}{\mid}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\data}{\mc{D}}
\newcommand{\intd}[1]{\,\mathrm{d}{#1}}
\newcommand{\inv}{^{-1}}
\newcommand{\trans}{^\top}
\newcommand{\mat}[1]{\bm{\mathrm{#1}}}
\renewcommand{\vec}[1]{\bm{\mathrm{#1}}}
\newcommand{\R}{\mathbb{R}}
\renewcommand{\epsilon}{\varepsilon}
\newcommand{\Exp}{\mathbb{E}}

\DeclareMathOperator{\var}{var}
\DeclareMathOperator{\cov}{cov}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}

\begin{document}

{\large \textbf{CSE 515T (Fall 2019) Project}} \\

A portion of your grade this semester will be based on a significant project
investigating Bayesian methods in depth. You will have two possible paths to
satisfy this project requirement.

The main goal of the project is to give you hands-on experience applying
Bayesian methods to a real-world dataset.  The use of real-world data can have
many interesting (and potentially frustrating!) aspects that are difficult to
convey without getting your hands dirty.  The scope of the project is intended
to be more than a homework problem, but less than a full-fledged research paper.

Note that I don't necessarily expect your idea to ``work.''  Part of research is
trying out ideas, regardless of whether they're ultimately successful.  If your
idea does ``work,'' I expect you to think about why it was succesful.  If not, I
expect you to think about why not!

\clearpage

\section*{Option 1: Novel project with existing data}

Some of you may be working on existing projects or be an expert in relevant data
where the techniques of this class could be brought to bear; for example if you
are a Ph.D.\ student wishing to analyze existing data, or if you have a hobbyist
interest in and passion for some particular dataset. In previous semesters,
several students have used the project as a springboard for investigations that
eventually lead to publications.

If this is the case you may propose a project applying Bayesian techniques to
your problem. There is a great deal of freedom in defining this project to suit
your needs. However, a critical requirement to this option is that \emph{you be
  an expert in the data you are proposing.} In particular, the following
datasets are \emph{insufficient:}
\begin{itemize}
\item Kaggle competitions, etc.
\item reference datasets from machine learning, \acro{UCI} datasets, etc.
\end{itemize}

However, in previous semesters I have seen people use data from surprising
sources that lead to interesting projects! Examples from previous semesters
include:
\begin{itemize}
\item Split times from cross country races, with the goal of predicting a
  runner's performance from their previous races.
\item Several projects on predicting sports outcomes from various features,
  predicting tournament outcomes, etc.
\item
  A Bayesian ray tracer based on Bayesian quadrature.
\end{itemize}
As you can see, you can be passionate about and an expert in data that is not
academic/scientific!

If you wish to pursue this route, your project will comprise four parts:

\begin{itemize}
\item
  A one-page proposal outlining the problem you want to solve, its importance
  and motivation, your proposed solution, and the data will use for your
  investigation. This will be due \textbf{Monday, 4 November 2019.} We will
  review your proposal and give you feedback.  At this stage we may also
  \emph{reject} your proposal if we feel the problem is not appropriate.
\item
  A two-page status report reporting on your current progress and detailing any
  issues/questions you may have, due \textbf{Friday, 22 November 2019.}  We will
  provide feedback and guidance.
\item
  A four-page final report detailing the final approach and the outcomes of the
  investigation, due \textbf{Monday, 9 December 2019.}
\item
  A ten-minute presentation to the class during the \textbf{last week of class.}
\end{itemize}

This project option can optionally have teams of 2--4 people; however at least
50\% of the team members must rise to the level of ``experts'' on the
data. Please comment on this in your proposal.

\clearpage

\section*{Option 2: Supervised project}

If you do not wish to pursue the first project option, you can instead complete
a guided project incorporating many notions from this class following the
outline below. There is still considerable room for creativity in this option.

You can work in teams of 2--3 on this project if you desire.

The project will be an investigation into applying Bayesian optimization to
automatic and efficient hyperparameter tuning of machine learning models.

We will use two sources of data for this investigation. The first is a classical
synthetic benchmark function used in optimization, the \emph{Branin} (sometimes
\emph{Branin--Hoo}) function.  See here for a description, formula, and some
implementations:
\begin{quote}
  \url{https://www.sfu.ca/~ssurjano/branin.html}
\end{quote}
This is a function of a two-dimensional input and can be useful for visualizing
the behavior of the methods you will implement. The goal is to minimize the
function over the specified box-bounded domain.

The second is real data from a hyperparameter tuning task on two different
models: \acro{SVM} and online \acro{LDA}. These datasets were used in the paper
``Practical Bayesian Optimization of Machine Learning Algorithms'' by Snoek, et
al. The paper is available at
\begin{quote}
  \url{http://tiny.cc/bopt}
\end{quote}
You should read it!

Given some data, the performance of each methods was evaluated on a
three-dimensional grid of hyperparameter values, defining an objective function
$f(\theta)$, where $\theta$ is a three-dimensional hyperparameter vector. Our
goal is to maximize the performance of the model as a function of the
hyperparameters.  As the cost of training and evaluating the performance of
these models is so great, we will use the precomputed grids instead. The data is
available here:
\begin{quote}
  \url{https://github.com/mwhoffman/benchfunk/tree/master/benchfunk/functions/data}
\end{quote}
For each problem, the goal is to minimize the value in the fourth column given
the values of the hyperparameters in the first three. You can ignore the final
column.

Note that all of these are \emph{minimization} problems.

The project will comprise a series of smaller components that you must
complete. You will then compile your findings into a report. I expect every
bulleted item to be addressed in the report. The report will be due
\textbf{Wednesday, 4 December 2019,} the last day of class.

If you have any question about what may or may not be appropriate for any of
these parts, please feel free to ask on Piazza!

\subsection*{Data visualization}

First let's do some visualization of the data to get some insight into the
functions we are dealing with.

\begin{itemize}
\item
  Make a heatmap of the value of the Branin function over the domain $\mc{X} =
  [-5, 10] \times [0, 15]$ using a dense grid of values, with 1000 values per
  dimension, forming a $1000 \times 1000$ image.
\item
  Describe the behavior of the function. Does it appear \emph{stationary?} (That
  is, does the behavior of the function appear to be relatively constant
  throughout the domain?)
\item Can you find a transformation of the data that makes it more stationary?
\item
  Make a kernel density estimate of the distribution of the values for the
  \acro{LDA} and \acro{SVM} benchmarks. Interpret the distributions.
\item
  Again, can you find a transformation that makes the performance better
  behaved?
\end{itemize}

\subsection*{Model fitting}

Before we can succeed with optimization, we must first determine whether we can
build a useful model of the objective function. If we can't find an informative
model that can make reasonable predictions, it would be foolish to try to use
the model to make decisions.

We begin with the Branin function where we can make useful diagnostic plots. For
this first series of steps, do not apply any transformation to the outputs of
the function; use its output directly.

\begin{itemize}
\item
  Select a set of 32 training points for the Branin function in the domain
  $\mc{X} = [-5, 10] \times [0, 15]$ using a \emph{Sobol sequence.} This is a
  so-called low-discrepancy sequence that produces ``quasirandom'' points that
  fill the space relatively evenly; see the Wikipedia article for more
  information, and note that this should be built into most scientific
  software. Measure the function at these locations to form a dataset $\data$.
\item
  Fit a Gaussian process model to the data using a constant mean and a squared
  exponential covariance. As the output of a deterministic computer program,
  there is no ``noise'' in our observations, so we should fix the standard
  deviation of the noise to a small value such as $0.001$. This is possible in
  most \acro{GP} software packages.

  Maximize the marginal likelihood of the data as a function of the
  hyperparameters: constant mean value and the length scale and output scale of
  the covariance function.
\item
  What values did you learn for the hyperparameters? Do they agree with your
  expectations given your visualization?
\item
  Make a heatmap of the Gaussian process posterior mean as you did of the
  function. Compare the predicted values with the true values.  Do you see
  systematic errors?
\item
  Make a heatmap of the Gaussian process posterior standard deviation (not
  variance!) as you did of the function. Do the values make sense? Does the
  scale make sense? Does the standard deviation drop to near zero at your data
  points?

  Note that if these heatmaps do not agree with your intuition, it may indicate
  a bug or mistake somewhere!
\item
  Make a kernel density estimate of the $z$-scores of the residuals between the
  posterior mean of trained Gaussian process and the true values. If the
  Gaussian process model is well calibrated this should be approximately
  standard normal. Is that the case?
\item
  Repeat the above using a log transformation to the output of the Branin
  function. Does the marginal likelihood improve? Does the model appear better
  calibrated?
\end{itemize}

Now let's try some different models. Given a \acro{GP} mean function and
covariance, we can derive a score for how well those choices fit a given
dataset, such as the dataset of 32 observations $\data$ above. The most natrual
score would be the model evidence after integrating over the hyperparameters,
but unfortunately this is intractable for Gaussian process models. A widespread
and convenient approximation is called the \emph{Bayesian information criterion}
(\acro{BIC}). Look up the Wikipedia article and read it! To compute the
\acro{BIC} we first find the values of the hyperparameters maximizing the (log)
marginal likelihood:
\[
  \hat{\theta} = \argmax_\theta \log p(y \given X, \theta).
\]
Now the \acro{BIC} is a combination of two terms rewarding model fit and
penalizing model complexity:
\[
\acro{BIC} = \lvert \theta \rvert \log \lvert \data \rvert - 2 \log p(y \given X, \hat{\theta}),
\]
where $\lvert \theta \rvert$ is the total number of hyperparameters (above, 3)
and $\lvert \data \rvert$ is the number of observations (above, 32). Given a set
of models, we prefer the one with the lowest \acro{BIC}, and this score can actually
be interpreted as an approximation to the (negative) log model evidence.

\begin{itemize}
\item
  Compute the \acro{BIC} score for the data and model from the last part.
\item
  Considering \acro{BIC} as a function of the choice of mean and covariance
  functions $(\mu, K)$, as well as the dataset described above, attempt a search
  over models to find the best possible explanation of the data. What is the
  best model you found and its \acro{BIC} score? The notion of the
  ``compositional kernel grammar'' may be useful for automating the search, or
  you could do it by hand.  You may also consider transformations of the data to
  improve the \acro{BIC} further.
\item
  Perform a similar search for the \acro{SVM} and \acro{LDA} datasets, using 32
  randomly sampled observations from each dataset.  What is the best \acro{GP}
  model you found for each?
\end{itemize}

\subsection*{Bayesian optimization}

Let's fix a choice of Gaussian process model for each of the datasets above by
selecting the best model (possibly coupled with a transformation) you found, and
for now let's fix the hyperparameters of that model to be those that maximize
the marginal likelihood of the dataset. We will now implement a basic Bayesian
optimization procedure and observe its performance.

\begin{itemize}
\item
  Implement the \emph{expected improvement} acquisition function (formula in the
  Snoek, et al.\ paper above), which provides a score to each possible
  observation location in light of the observed data. The formula is a function
  of the posterior predictive mean and pointwise variance of a point, which
  should be readily available.

  Be careful as different authors define \acro{EI} for minimization or for
  maximization. We have minimization problems but we can make them maximization
  problems by negating if needed.
\item
  For the Branin function, make new heatmaps for the posterior mean and standard
  deviation from the 32 datapoints we used before using the model you selected.
  Make another heatmap for the \acro{EI} value, and place a mark where it is
  maximized. Does the identified point seem like a good next observation location?
\item
  For the Branin, \acro{SVM}, and \acro{LDA} functions, implement the following
  experiment:
  \begin{itemize}
  \item
    select 5 randomly located initial observations, $\data$
  \item
    repeat the following 30 times:
    \begin{itemize}
    \item
      Find the point $x$ that maximizes the expected improvement acquisition
      function given the current data. For the Branin function, you can simply
      measure \acro{EI} on a dense grid or on a dense Sobol set and find the
      maximum on that dense set.  For the other datasets, you can measure
      \acro{EI} on the unlabeled points and maximize.
    \item
      Add the observation $\bigl(x, f(x)\bigr)$ to your dataset.
    \end{itemize}
  \item
    return the final dataset (containing 35 observations)
  \end{itemize}
\item
  We will evaluate performance as follows. Using the final returned dataset,
  identify the best point found. We will score optimization performance using
  the ``gap'' measure, which for maximization is:
  \[
  \text{gap} = \frac{f(\text{best found}) - f(\text{best initial})}{f(\text{maximum}) - f(\text{best initial})}.
  \]
  You can interpret gap is the portion of the ``gap'' between the best initial
  observation among the 5 initial data points and the optimum that we managed to
  traverse over the course of optimization; this gives us a normalized score
  between 0 and 1 for how well we did.
\item
  Now perform 20 runs of the above Bayesian optimization experiment using
  different random initializations, and store the entire sequence of
  observations for each run.

  For a baseline, we will use random search. Using the same initializations,
  implement random search (i.e., a policy that samples an unlabeled point in the
  domain completely at random). Allow random search to have a total budget of
  150 observations rather than 30 (5 times the budget), but store the entire
  sequence of data. This will allow us to compare with na\"ive ``parallel random
  search'' below.
\item
  Make a plot of ``learning curves'' for each of the methods on each of the
  datasets. For now only using the first 30 observations for random search, plot
  the average gap achieved by Bayesian optimization and random search as a
  function of the number of observations for each of the datasets. (That is,
  after 1, 2, \dots 30 observations, we visualize the performance of each
  method.) You'll want to make one plot per dataset with a curve for each
  method, allowing us to see how well each method compares on that dataset.
\item
  What is the mean gap for \acro{EI} and for random search using 30
  observations?  What about 60? 90? 120? 150?  Perform a paired $t$-test (gasp!)
  comparing the performance of random search (using 30 observations) and
  \acro{EI}. What is the $p$-value? How many observations does random search
  need before the $p$ value raises above 0.05? We can interpret the result in
  terms of a ``speedup'' of Bayesian optimization over random search.
\end{itemize}

\subsection*{Bonus}

Finally, for the remainder of the project, take this initial investigation into
a new direction of your choosing. There is considerable flexibility here, and some
examples are below. I obviously don't expect you to do all of these or even any
of these if you have a different idea:
\begin{itemize}
\item
  Investigate different objectives or a different task.
\item
  Implement more acquisition functions and compare their performance with
  \acro{EI} and random search as above. There are numerous options out there!
\item
  Investigate how the performance of Bayesian optimization changes if after
  every observation we relearn the model's hyperparameters by maximizing
  the marginal likelihood.
\item
  Investigate batch Bayesian optimization. What if we select multiple points
  at once? There are numerous acquisition functions for implementing such a policy.
\item
  Investigate how Bayesian optimization performs in the face of observation
  noise.  You can simulate this noise by adding random noise with a given
  variance into each observation. Does noise slow us down? How much?
\end{itemize}

Please write a (at-least) one-page report on this final part,
including your idea and your findings.

\end{document}


%
% Chapter 3.5
%

\section*{3.5 Curve Sketching}

Read chapter 3.5 on page 244 in James Stewart Calculus Eighth Edition.


\documentclass[revision-guide.tex]{subfiles}
%% Current Author: PS
\setcounter{chapter}{0}
\begin{document}
\chapter{Mechanics}
\begin{content}
\item scalars and vectors
\item moment of a force
\item kinematics
\item Newton’s laws of motion
\item conservation of linear momentum
\item density
\item pressure
\end{content}

\section*{Candidates should be able to:}

\section{Scalars and Vectors}
\spec{distinguish between scalar and vector quantities and give examples of each}
A scalar quantity\footnote{strictly we are modelling a physical quantity as a mathematical object} is one which has only a magnitude whereas a vector has \emph{both} magnitude and direction. We often use positive and negative values to indicate direction (e.g. $v=-2\ ms^{-1}$) but this does not mean that all negative values are vectors!

Note that there are different ways of multiplying vectors and scalars. Two vectors can be multiplied to give a scalar \emph{or} a vector. For example, work done is the (scalar) product of force and displacement, both vectors.

\spec{resolve a vector into two components at right angles to each other by drawing and by calculation}

Vectors can be split into two components using trigonometry. The diagram below shows a velocity vector being split into horizontal and vertical components $v_x$ and $v_y$.

\begin{figure}[h]
\begin{center}
\begin{tikzpicture}
	\draw[very thick, black, ->] (0,0) -- node[above] {$\mathbf{v}$}  (5,2.5);
	\draw[very thick, purple, ->] (0,0) -- node[below] {$\mathbf{v_x}$} (5,0);
	\draw[very thick, purple, ->] (0,0) -- node[left]{$\mathbf{v_y}$}(0,2.5);
	\draw [very thick,gray](1,0) arc (0:26.6:1);
	\draw [gray](1,0.25) node[right]{$\theta$};
	\draw (7,1.25) node[right] {
		$\begin{aligned}
		\mathbf{v}&=\mathbf{v_x + v_y}\\
		v_x &= v\cos{\theta}\\
		v_y &= v\sin{\theta}
		\end{aligned}$};
\end{tikzpicture}
\end{center}
\end{figure}

\spec{combine any number of coplanar vectors at any angle to each other by drawing}

Vectors can be added by placing them end to end. The resultant vector is the one joining the start of the first vector to the end of the final vector. Its magnitude and direction can be calculated by trigonometry or scale drawing.

\begin{figure}[h]
	\begin{center}
	\begin{tikzpicture}
	\draw[thick,->] (0,0) -- node[above] {$\mathbf{v_1}$} (3,1) -- node[below] {$\mathbf{v_2}$} (6,.5) -- node[below] {$\mathbf{v_3}$} (9,2);
	\draw[thick,purple,->] (0,0) -- node[above]{$\mathbf{v}$} (9,2);
	\end{tikzpicture}
	$$\mathbf{v} = \mathbf{v_1}+\mathbf{v_2}+\mathbf{v_3}$$
	\end{center}
\end{figure}

\section{Static Equillibrium}

\spec{calculate the moment of a force and use the conditions for equilibrium to solve problems (restricted to
	coplanar forces)}

The moment of a force is calculated by multiplying its magnitude by the perpendicular distance of the force's line of action to the pivot point. This is mathematically equivalent to multiplying the distance from the pivot by the component of the force perpendicular to that distance.

\begin{figure}[h]
	\centering
	\begin{tikzpicture}
		\draw[thick] (0,0) -- (6,2);
		\draw[thick, purple, ->] (6,2) -- node[right]{$ F$}(6,1);
		\draw[thick, purple, dashed] (6,1) -- node[right] {line of action of $F$}(6,-1) ;
		\draw[thick, dashed] (0,0) -- node[below]{perpendicular distance, $x$} (6,0);

	\end{tikzpicture}
	$$\mathrm{moment} = Fx $$
\end{figure}

The conditions for equilibrium are:
\begin{enumerate}
	\item The sum of all the forces acting on the object must be zero.
	\item The sum of all the moments on an object must be zero.
\end{enumerate}
\begin{example}
	A Tower Crane lifts a load into position. The load has a weight of \SI{4.0e4}{N} and the arm of the crane has a weight of \SI{1.2e5}{N}.

	Calculate the required weight of the counterweight and the force the tower must support. Assume the centre of mass of the arm is at its centre.

	\vspace{1cm}

		\begin{center}
		\begin{tikzpicture}
					\draw[thick] (2,0) rectangle (2.5,5);
					\draw[thick] (0,4) rectangle (8,4.2);
					\fill (-0.5,3.8) rectangle (.5,4.4);
					\draw(2.25,5) -- (8,4.2);
					\foreach \x in {0,1,...,13} {
						\draw (1+0.5*\x,4) -- (1.5+0.5*\x,4.2);
						\draw (1+0.5*\x,4.2) -- (1.5+0.5*\x,4);
					}
					\foreach \y in {0,1,...,9} {
						\draw (2,0+0.5*\y) -- (2.5,0.5+0.5*\y);
						\draw (2.5,0+0.5*\y) -- (2,0.5+0.5*\y);
					}
					\draw[purple, thick, ->] (8,4) -- (8,3) node[right]{$W_l=\SI{4.0e4}{N}$};
					\draw[purple, thick, ->] (4,4) -- (4,3.4) node[below]{$W_a=\SI{1.2e5}{N}$};
					\draw[purple,thick, ->] (0,4) -- (0,3) node[right]{$W_c$};
					\draw[<->] (0,6) -- node[above]{15m}(2.25,6);
					\draw[<->] (2.25,6) -- node[above]{45m}(8,6);
				\end{tikzpicture}
		\end{center}

		\textbf{Answer}

		We begin by taking moments around the tower of the crane. The weight of the arm, $W_a$, acts \SI{15}{m} from the tower so solving for moments gives:

		$$ 15W_c = 15W_a + 45W_l $$
		$$ W_c = \SI{2.4e5}{N} $$

		The sum of the downward forces must equal the reaction force of the tower so:

		$$ R = \SI{4.0e5}{N} $$
\end{example}

\section{Kinematics}

\spec{construct displacement-time and velocity-time graphs for uniformly accelerated motion}

For uniform acceleration, a graph of velocity against time will be linear, with the formula $ v=u+at$, and a graph of displacement against time will be parabolic, with the formula $s=ut+\frac{1}{2}at^2$.

\begin{center}
	\begin{tikzpicture}[domain=0:3]
		\draw[thick,->] (0,0) -- (3,0) node[below]{$t$};
		\draw[thick,->] (0,0) -- (0,3) node[left]{$s$};
		\draw[thick,->] (4,0) -- (7,0) node[below]{$t$};
		\draw[thick,->] (4,0) -- (4,3) node[left]{$v$};
		\draw[color=purple] plot (\x+4,{.2+0.4*\x});
		\draw[color=purple] plot (\x,{.2*\x+0.2*\x^2});
	\end{tikzpicture}
\end{center}

\spec{identify and use the physical quantities derived from the gradients of displacement--time and areas and gradients of velocity--time graphs, including cases of non-uniform acceleration}

The quantities are given in the table below:

\begin{tabular}{r|ll}
	& gradient & area  \\ \hline
	displacement-time & velocity & -- \\
	velocity-time & acceleration & displacement \\
\end{tabular}

If the graph is non-linear then the gradient of a tangent must be taken. Note that areas below the axis in a velocity-time graph represent \emph{negative} displacement.

\spec{recall and use:}
\begin{align*}
	v &= \frac{\Delta x}{\Delta t}\\
	a &= \frac{\Delta v}{\Delta t}
\end{align*}

\spec{recognise and use the kinematic equations for motion in one dimension with constant acceleration:}
\begin{align*}
	s &= ut + \frac{1}{2}at^2 \\
	v^2 &= u^2 + 2as \\ s &= \left( \frac{u+v}{2} \right) t
\end{align*}

\spec{recognise and make use of the independence of vertical and horizontal motion of a projectile moving freely under gravity}

When an object moves in a uniform gravitational field it motion can be modeled by considering the horizontal and vertical components of motion separately. The horizontal component has a constant velocity and the vertical has a constant acceleration.

\begin{example}
A ball is thrown with a velocity of \SI{5}{m.s^{-1}} from a height of \SI{1.2}{m}. If its initial angle to the horizontal is \ang{50} calculate the distance it travels before it hits the ground.
\answer

The first step is to split the velocity into horizontal and vertical components:
	\begin{align*}
		v_x = 5\cos{50}\\
		v_y = 5\sin{50}
	\end{align*}

	The time for the ball to reach the ground can now be calculated using the vertical motion and the equation $s=ut+\frac{1}{2}at^2$, setting $s = \SI{-1.2}{m}$. This gives $t=\SI{1.02}{s}$.

	Finally, the horizontal distance is calculated using the simple constant velocity formula to give $x=\SI{3.28}{m}$.
\end{example}

\section{Forces}

\spec{recognise that internal forces on a collection of objects sum to zero vectorially}

This is as a result of Newton's Third Law.

\spec{recall and interpret statements of Newton’s laws of motion}
\begin{enumerate}
	\item An object will remain at rest, or continue at a constant velocity, unless a resultant force acts upon it.
	\item $F=ma$, where $F$ is the vector sum of the forces acting on the body. Or, alternatively $F=\frac{dp}{dt}$ (see below).
	\item For every force of object A acting on object B there exists a force of the same type, of equal magnitude and opposite direction of object B acting on object A.

	\emph{It is important to be able to distinguish the `equal and opposite' forces which may act on a single object in equilibrium from a Newton's Third Law pair of forces.}
\end{enumerate}

\spec{recall and use $F = ma$ in situations where mass is constant}

Remember that $F$ is the \emph{resultant} force acting on the body.

\spec{understand the effect of kinetic friction and static friction}

\spec{recall and use $F_k = \mu_k N$ and $F_s = \mu_s N$, where $N$ is the normal contact force and $\mu_k$ and $\mu_s$ are the coefficients of kinetic friction and static friction, respectively}

Friction occurs between two objects when they are pushed together by a normal force. A useful model is that the maximum size of the frictional force is proportional to the normal force. There is usually a difference between the constant of proportionality when the two surfaces are stationary compared to each other (static friction) compared to when they are sliding past each other (kinetic friction). It is usually the case that $\mu_k < \mu_s$.

An interesting result is that blocks of different masses should take the same distance to slide to a halt:

\[ s = \frac{\frac{1}{2}mv^2}{F} = \frac{\frac{1}{2}mv^2}{\mu_k N} = \frac{\frac{1}{2}mv^2}{\mu_k mg} = \frac{v^2}{2\mu_k g} \]

\spec{recall and use the independent effects of perpendicular components of a force}

As with velocities, forces can be split into two perpendicular components and their effects considered independently.

\begin{example}
A block of mass \SI{4}{kg} is on a frictionless slope of \ang{30}. Calculate the rate at which it accelerates down the slope.

\usetikzlibrary{scopes}

\def\iangle{30} % Angle of the inclined plane

\def\down{-90}
\def\arcr{0.5cm} % Radius of the arc used to indicate angles

\begin{tikzpicture}[
    force/.style={>=latex,draw=blue,fill=blue},
    axis/.style={densely dashed,gray,font=\small},
    M/.style={rectangle,draw,fill=lightgray,minimum size=0.5cm,thin},
    m/.style={rectangle,draw=black,fill=lightgray,minimum size=0.3cm,thin},
    plane/.style={draw=black,fill=blue!10},
]

    \draw[plane] (0,-2) coordinate (base)
                     -- coordinate[pos=0.5] (mid) ++(\iangle:6) coordinate (top)
                     |- (base) -- cycle;
    \path (mid) node[M,rotate=\iangle,yshift=0.25cm] (M) {};

    \draw[->] (base)++(\arcr,0) arc (0:\iangle:\arcr);
    \path (base)++(\iangle*0.5:\arcr+10pt) node {$30 ^{\circ}$};

    \begin{scope}[rotate=\iangle]

        % Draw axes and help lines

        {[axis,->]

        }

        % Forces
        {[force,->]
            % Assuming that Mg = 1. The normal force will therefore be cos(alpha)
            \draw [green](M.center) -- ++(0,{cos(\iangle)}) node[above right, black] {$N$};
            \draw [green](M.center) -- ++(-.5,0) node[left, black] {Mg sin30};

        }

    \end{scope}

    \draw[force,->] (M.center) -- ++(0,-1) node[below] {$Mg$};
    %%

\\
%};
\end{tikzpicture}

\answer

The weight should be split into components along the slope and perpendicular to the slope (shown in green). Only the component along the slope contributes to the acceleration.

\[ a = \frac{F}{m} = \frac{mg\sin{30}}{m} = \SI{4.9}{ms^{-2}} \]

This question could be extended to include friction by calculating the normal force, the frictional force and hence a new acceleration. If $\mu_k = 0.4$ then the answers are \SI{34}{N}, \SI{14}{N} and \SI{1.5}{ms^{-2}} respectively (Try it!)

\end{example}

\spec{recall and use p = mv and apply the principle of conservation of linear momentum to problems in one dimension}

Momentum is a conserved quantity (along with energy and charge). It can be calculated using the formula $p=mv$ where $p$ is the momentum. In any closed system the total momentum of the particules must remain constant. This can be used to predict the outcomes of collisions in certain cases.

\spec{distinguish between elastic and inelastic collisions}

An elastic collision is one in which \emph{kinetic energy} is conserved. An inelastic collision is one in which it is not. In general, a collision in which two objects adhere will not conserve kinetic energy as the final velocity will be given by:
$$ v = \frac{m_1u_1+m_2u_2}{m_1+m_2} $$
and therefore the final kinetic energy will be given by:
\[ \text{KE} = \frac{1}{2}(m_1+m_2)v^2 = \frac{1}{2}\frac{\left( m_1u_1+m_2u_2\right)^2}{m_1+m_2}\]
which cannot be equal to the original kinetic energy.

\spec{relate resultant force to rate of change of momentum in situations where mass is constant and recall and use $F = \frac{\Delta P}{\Delta t}$}

Newton's second law is more properly given by:

\[ F = \frac{dp}{dt} \]

This simplifies to the GCSE formulation for constant mass:

\[ F = \frac{dp}{dt} = m\frac{dv}{dt} = ma \]

A simplified version is:
$$F = \frac{\Delta P}{\Delta t}$$

This will give the correct result for a constant force or otherwise give the average force.

\spec{recall and use the relationship impulse = change in momentum}

Multiplying both sides of the equation above by time gives:
$$ F \Delta t = \Delta P $$

The quantity on the left hand side is the impulse.

\spec{recall and use the fact that the area under a force-time graph is equal to the impulse}

Using calculus to solve differential version of Newton's Second Law above gives:
$$ \Delta P = \int_{t_0}^{t_1} F dt $$
The right-hand side of this equation represents the area under a force-time graph.

\spec{apply the principle of conservation of linear momentum to problems in two dimensions}

When objects are free to move in two dimensions then momentum must be conserved along two axis.

\begin{example}
	Two objects are able to slide frictionlessly over a horizontal surface. The first object, $m_1=\SI{3}{\kg}$ is propelled with an initial speed $u_1=\SI{5}{\m\per\s}$ towards a second mass, $m_2=\SI{1.5}{\kg}$, which is initially at rest. After the collision both objects move at \SI{30}{\degree} on either side of the line of the original motion. What are the final speeds of the two objects? Is the collision elastic?
	\answer
	Conservation of momentum along the x-axis gives
	$$ m_1u_1 = m_1v_1\cos{\theta} + m_2v_2\cos{\theta}$$
	Conservation of momentum along the y-axis gives
	$$ m_1v_1\sin{\theta} = m_2v_2\sin{\theta} $$
	These equations can be combined to give
	$$ v_1 = \frac{u_1}{2\cos{\theta}} = \SI{2.887}{\m\per\s}$$
	and
	$$ v_2 = \frac{m_1}{m_2}v_1= \SI{5.773}{\m\per\s}$$
	The initial KE of the system is
	$$ K_i = \frac{1}{2}m_1u_1^2 = \SI{37.5}{\joule} $$
	and the final KE of the system is
	$$ K_f = \frac{1}{2}m_1v_1^2 + \frac{1}{2}m_2u_2^2 = \SI{37.5}{\joule}$$
	since $K_i = K_f$, the collision is elastic
\end{example}

\spec{recall and use density = mass / volume}
\spec{recall and use pressure = normal force / area}
\spec{recall and use $ p = \rho gh $ for pressure due to a liquid.}
These are GCSE equations and should present no problems.
\end{document}

%sagemathcloud={"latex_command":"latexmk -pdf -f -g -bibtex -synctex=1 -interaction=nonstopmode '1-mechanics.tex'"}