\chapter{Fermi Liquid}

\section{Non-relativistic Field Theory}
A general non-relativistic field theory is described by the action (with repeated indices automatically summed):
\begin{equation}
\begin{aligned}
	S &= S_0 + S_{\mathrm{int}} = \int dt \int d^d x \mathcal{L}_0 - \int dt\ \mathcal{V}_{\mathrm{int}}, \\
	\mathcal{L}_0 &= \bar\psi_a(x) (i\delta_{ab}\partial_t-\hat H_{ab})\psi_b(x).
\end{aligned}
\end{equation}
where the field operator $\psi(x)$ can be bosonic or fermionic, which is denoted by a number $\zeta=\pm 1$, and $\mathcal{V}_{\mathrm{int}}$ is the interaction Lagrangian.
A general interaction has the form
\begin{equation}
	\mathcal{V}_{\mathrm{int}} = \sum_{abcd}\int \prod_{i=1}^4 d^d x_i \ \bar\psi_{c}(x_3)\bar\psi_{d}(x_4) V_{abcd}(x_1,x_2,x_3,x_4) \psi_{b}(x_2)\psi_{a}(x_1).
\end{equation}
Note that the classical equation of motion for the free field satisfies the Schr\"{o}dinger equation:
\begin{equation}
	\partial_\mu \frac{\partial \mathcal L_0}{\partial(\partial_\mu \bar\psi_a(x))} - \frac{\partial \mathcal L_0}{\partial\bar{\psi}_a(x)}
	= - i\partial_t \psi_a(x) + \hat H_{ab}\psi_b(x) = 0.
\end{equation}

We are mostly work with finite system size $L^d$ with UV cutoff $\Lambda = \pi/a$ (where $a$ is the lattice spacing, and $L = Na$). The spatial Fourier transformation is
\begin{equation}
	\tilde{\psi}_a(k) = \int_{L^d} d^dx e^{-i k \cdot x}\psi_a(x), \quad
	\psi_a(x) = \frac{1}{L^d}\sum_{k} e^{i k \cdot x}\tilde{\psi}_a(k).
\end{equation}
For the finite size, the momentum is discretized: $k = 2\pi n_k/L$, $n_k \in \mathbb Z$.
The summation in the thermodynamic limit becomes the integral:
\begin{equation}
	\frac{1}{L^d}\sum_k \longrightarrow \int_{|k|<\Lambda} \frac{d^dk}{(2\pi)^d}.
\end{equation}
In the momentum space, the free theory can be simplified:
\begin{equation}
	S_0 = \int dt \int \frac{d^d k}{(2\pi)^d} \tilde{\bar\psi}_a(k) [i\partial_t-\varepsilon_a(k)]\tilde{\psi}_a(k).
\end{equation}
The interaction in the momentum space is described by the vertex function:
\begin{equation}
	\tilde V_{abcd}(k_1,k_2,k_3,k_4)
	= \int \prod_{i=1}^4 d^d x_i e^{i(k_1x_1+k_2x_2-k_3x_3-k_4x_4)} V_{abcd}(x_1,x_2,x_3,x_4).
\end{equation}
Because of the momentum conservation, the vertex will contain a delta function factor.

Consider the Coulomb repulsive potential $e^2/r$, in the field theory formalism, the coefficient $V_{abcd}(x_1,x_2,x_3,x_4)$ is
\begin{equation}
\begin{aligned}
	\frac{V(x_1-x_2)}{2!2!}\left[\delta_{ac}\delta_{bd}\delta^{(3)}(x_1-x_3)\delta^{(3)}(x_2-x_4) - \delta_{ad}\delta_{bc}\delta^{(3)}(x_1-x_4)\delta^{(3)}(x_2-x_3)\right],
\end{aligned}
\end{equation}
where the factor $\frac{1}{2!2!}$ is the symmetry from interchanging the fermion fields.
In momentum space:
\begin{equation}
	V_{abab}(k_1,k_2,k_3+q,k_4-q) = \frac{1}{2!2!} V_{\mathrm{Coul}}(q),
\end{equation}
where the Coulomb potential in the momentum space is
\begin{equation}
\begin{aligned}
	V_{\mathrm{Coul}}(q)
	&=  \lim_{\alpha\rightarrow0}e^{2}\int_{0}^{\infty}dr\ 2\pi r^{2} \int_{-1}^{+1}d\left(\cos\theta\right)\frac{e^{-iqr\cos\theta-\alpha r}}{r} \\
	&=  \lim_{\alpha\rightarrow0}\frac{2\pi e^{2}}{iq}\int_{0}^{\infty}dr\left(e^{iqr-\alpha r}-e^{-iqr-\alpha r}\right)\\
 	&=  \lim_{\alpha\rightarrow0}\frac{4\pi e^{2}}{q^{2}+\alpha^{2}}
	=  \frac{4\pi e^{2}}{q^{2}}.
\end{aligned}
\end{equation}

\subsection{Action in Euclidean Space}

The original real-time partition function is defined as\footnote{As with the relativistic case, we introduce an auxiliary source $J$, which is bosonic/fermionic if the field $\psi$ is bosonic/fermionic.
}
\begin{equation}
	Z[J] = \int D[\bar\psi,\psi] \exp\left\{i\int dt \int d^dx \left[\mathcal{L}+\bar{J}_a(x)\psi_a(x)+\bar{\psi}_a(x)J_a(x)\right]\right\}.
\end{equation}
If we make a analytic continuation of $t$ to the complex plane:\footnote{Note that in the frequency domain, the singularities for positive frequency lies below the complex plane, as we always include an infinitesimal $-i\epsilon$ to the energy (mass) term of the theory in ensure convergence. So, the rotation of the real axis anti-clock-wisely to the imaginary axis will not cross any singularity, and thus the can be analytically extended.}
\begin{equation}
	t \rightarrow -i\tau, \quad \omega \rightarrow i\omega.
\end{equation}
In this way the free action transforms as:
\begin{equation*}
	iS_0 = i \int dt dx\ \psi(\bm x, t) (i\partial_t - E) \psi(\bm x, t) \rightarrow
	-\int d\tau dx\ \psi(\bm x, \tau) (\partial_\tau + E) \psi(\bm x, \tau).
\end{equation*}
The partition function can then be written as:
\begin{equation}
	Z[J] = \int D[\bar\psi,\psi] e^{-S_0[\bar\psi,\psi]+\bar{J}\cdot\psi+\bar{\psi}\cdot J},
\end{equation}
where the Euclidean free action defined as:
\begin{equation}
	S = \int d\tau \left[\int d^dx\ \bar\psi_a(\bm x,\tau) (\delta_{ab}\partial_\tau+\hat H_{ab})\psi_b(\bm x,\tau) + \mathcal{V}_\mathrm{int}\right].
\end{equation}

The Euclidean action is suitable to describe the system both in zero temperature or finite temperature.
For finite temperature case, the integral over the imaginary time $\tau$ is over $[0,\beta)$.
The Fourier transformation of the field on the imaginary time domain is defined as:
\begin{equation}
	\tilde\psi(\omega_n) = \int_0^\beta d\tau e^{i\omega_n\tau} \psi(\tau),\quad
	\psi(\tau) = \frac{1}{\beta}\sum_{\omega_n} e^{-i\omega_n\tau} \tilde\psi(\omega_n).
\end{equation}
Under such convention, in the thermodynamic limit and zero-temperature limit, the spatial-temporal Fourier transformation agrees with the relativistic case (up to a Wick rotation).

\subsection{Free Field Theory}

The Fourier transformation of the free field action is
\begin{equation}
	S_0 = \frac{1}{\beta}\sum_{\omega_n} \int_{\Lambda} \frac{d^dk}{(2\pi)^d}
	\tilde{\bar{\psi}}_a(k,\omega_n)\left[-i\omega_n + \tilde{H}_{ab}(k)\right]\tilde{\psi}_b(k,\omega_n).
\end{equation}
The partition function with source is
\begin{equation}
	\frac{Z_0[J]}{Z_0[0]} = \exp\left[-\frac{1}{\beta}\sum_{\omega_n} \int_{\Lambda} \frac{d^dk}{(2\pi)^d}\tilde{\bar J}_a(k,\omega_n) \tilde{G}_{ab}(k,\omega_n) \tilde{J}_b(k,\omega_n) \right],
\end{equation}
where the Green's function is
\begin{equation}
	\tilde{G}_{ab}(k,\omega_n) = \left[\frac{1}{i\omega_n - \tilde{H}(k)}\right]_{ab}.
\end{equation}

Unlike the relativistic case, the value of the value of partition function without source $Z_0[0]$ is related to the free energy.
We can express it formally as
\begin{equation*}
	Z_0[0]= \left[\det (-G_{ab})^{-1}\right]^{-\zeta}.
\end{equation*}
To get the correct dimensionality, we set the determinant as
\begin{equation*}
	Z_0[0] \equiv \prod_{k,\omega_n}\left\{\beta \det\left[-i\omega_n+\tilde{H}(k)\right]\right\}^{-\zeta}.
\end{equation*}
Thus the free energy is
\begin{equation}
	F = -\frac{1}{\beta} \ln Z_0
	= \zeta \sum_{k,\omega_n} \ln\left\{\beta\det\left[-i\omega_n+\tilde{H}(k)\right]\right\}.
\end{equation}

\subsection{Matsubara Summation}
Now consider the summation on Matsubara frequency:
\begin{equation}
	\sum_{\omega_n} f(\omega_n) =
	\begin{cases}
		\sum_n f(\frac{2n\pi}{\beta}) & \mathrm{bosonic} \\
		\sum_n f(\frac{(2n+1)\pi}{\beta}) & \mathrm{fermionic}
	\end{cases}.
\end{equation}
The frequency is capture by the singularities of the density function of the states:
\begin{equation}
	\rho(z) = \begin{cases}
		\frac{1}{\exp(\beta z)-1} & \mathrm{bosonic} \\
		\frac{1}{\exp(\beta z)+1} & \mathrm{fermionic}
	\end{cases}.
\end{equation}
The residue on imaginary frequency $i\omega_n$ is alway $\frac{1}{\beta}$. In this way, the summation is:
\begin{equation}
	\frac{1}{\beta}\sum_{\omega_n} f(i\omega_n)
	= \frac{1}{2\pi i} \oint \rho(z)f(z)
	= -\sum_{k} \mathrm{Res}\ \rho(z)f(z)|_{z=z_k}.
\end{equation}

\subsubsection*{Summation of Green's function}
Consider the frequency summation for the correlation function:
\begin{equation}
	\frac{1}{\beta}\sum_{\omega_n} \tilde{G}_0(k)
	= \frac{1}{\beta}\sum_{\omega_n}\frac{1}{i\omega_n-E_{p}}
	= -\mathrm{Res} \left. \frac{\rho(z)}{z-E_{p}}\right|_{z=E_{p}}
	= \rho(E_{p}).
\end{equation}

\subsubsection*{Summation of Green's function}
Consider the frequency summation for the correlation function:
\begin{equation}
	\sum_{\omega_n} \langle\bar\psi_{\vec p,\omega_n}\psi_{\vec p, \omega_n}\rangle = \frac{1}{\beta}\sum_{\omega_n}\frac{1}{-i\omega_n+\epsilon_{\vec p}}
	= \mathrm{Res} \left. \frac{\rho(z)}{z-\epsilon_{\vec p}}\right|_{z-\epsilon_{\vec p}}
	= \rho(\epsilon_{\vec p}).
\end{equation}

\subsubsection*{Free Energy Summation}
Consider the free energy
\begin{equation}
	F = -\frac{1}{\beta}\ln Z
	= -\frac{1}{\beta}\sum_{\omega_n}\ln[\beta(-i\omega_n+E_{\vec p})]
	= \frac{1}{2\pi i} \oint dz \rho(z)\ln[\beta(\xi - z)].
\end{equation}
To calculate the summation, we consider the line integral along the loop:
\begin{equation*}
	\includegraphics[width=0.25\linewidth]{pics/FqSum.png}
\end{equation*}
The free energy is
\begin{equation}
\begin{aligned}
	F &= \frac{1}{2\pi i}\int_{-\infty}^\infty dx \rho(x)\ln\left(\frac{\xi-x-i\epsilon}{\xi-x+i\epsilon}\right) \\
	&= \frac{-\zeta}{2\pi i\beta} \int_{-\infty}^{\infty}dx \ln(1-\zeta e^{-\beta z})\left(\frac{1}{x+i\epsilon-\xi}-\frac{1}{x-i\epsilon-\xi}\right),
\end{aligned}
\end{equation}
where we integrate the expression by part, noticing that
\begin{equation}
	\frac{d}{dz} \frac{\zeta}{\beta} \ln(1-\zeta e^{-\beta z}) = \frac{1}{e^{\beta z}-\zeta} = \rho(z)
\end{equation}
Using the identity
\begin{equation*}
	\lim_{\epsilon\rightarrow 0^+} \frac{1}{x+i\epsilon} = -i\pi\delta(x) + \mathcal{P}\frac{1}{x},
\end{equation*}
the above expression can be simplified to
\begin{equation}
	F = \frac{\zeta}{\beta} \ln(1-\zeta e^{-\beta\zeta}).
\end{equation}

\section{RG of 2D Fermi Liquid}
In this section, we are considering the system of weakly interacting Fermi gas.
To be specific, we consider the lattice Hamiltonian:
\begin{equation}\label{eq:FL-gen-ham}
	H = -\frac{1}{2}\sum_{\langle i,j \rangle} (c_i^\dagger c_{j} + c_{j}^\dagger c_i) + \mu\sum_i c_i^\dagger c_i + \sum_{i,j,k,l} u_{ijkl} c_i^\dagger c_j^\dagger c_k c_l.
\end{equation}
In the following, we investigate the effective field theory near the Fermi surface.
We discuss the RG flow of the couplings (mainly for two dimensional system).
Then we carry out the perturbative calculation for the correlation functions.

\subsection{Effective Field Theory for Interacting Fermi Systems}
The low-energy manifold is an annulus of thickness $2 \Lambda$ symmetrically situated with respect to the Fermi circle $K=K_{\mathrm{F}}$.
The dispersion for the free lattice model is
\begin{equation}
	E(\bm K) = -\cos K_x - \cos K_y \simeq -2 + \frac{\bm K^2}{2}.
\end{equation}
For a given chemical potential $\mu$, the Fermi circle is $K_F = \sqrt{2m\mu}$, we can linearize the dispersion near the Fermi surface:
\begin{equation}
	E(\bm K) = \frac{\bm K^2-K_F^2}{2m} \simeq \frac{K_F}{m}k \equiv v_F k, \quad
	k\equiv |K|-K_F
\end{equation}
The partition function is:
\begin{equation}
	Z_0 = \sum_\theta \sum_{|k|<\Lambda}\int D\left[\bar\psi(k,\theta,\omega),\psi(k,\theta,\omega)\right] e^{-S_0},
\end{equation}
where the free field action is:\footnote{A factor of $K_{\mathrm{F}}$ has been absorbed in the field.}
\begin{equation}
	S_0 = \int \frac{d\theta}{2\pi} \int^\Lambda_{-\Lambda}\frac{dk}{2\pi} \int^\infty_{-\infty}\frac{d\omega}{2\pi} \bar\psi(k,\theta,\omega)(-i\omega+v_F k)\psi(k,\theta,\omega).
\end{equation}
Consider the quartic interaction
\begin{equation}
	\delta S_4 = \frac{1}{4}\int_{\bm K,\theta,\omega} \bar\psi(4)\bar\psi(3)\psi(2)\psi(1)u(4,3,2,1)
\end{equation}
where we eliminate one of the four sets of variables, say, the one numbered 4, by integrating them against the delta functions:
\begin{equation}
	\int_{K,\theta,\omega}
	=\prod_{i=1}^{3} \int_{0}^{2 \pi} \frac{d \theta_{i}}{2 \pi} \int_{-\Lambda}^{\Lambda} \frac{d k_{i}}{2 \pi} \int_{-\infty}^{\infty} \frac{d \omega_{i}}{2 \pi} \theta\left(\Lambda-\left|k_{4}\right|\right), \quad
	k_4 = |\bm K_4|-K_F.
\end{equation}
The $\omega$ integral is easy: since all $\omega$'s are allowed, the condition $\omega_4=\omega_1+\omega_2-\omega_3$ is always satisfied for any choice of the first three frequencies.
The same would be true for the momenta if all momenta were allowed.
But they are not; they are required to lie within the annulus of thickness $2\Lambda$ around the Fermi circle.
Consequently, if one freely chooses the first three momenta from the annulus, the fourth could have a length as large as $3K_F$.
The role of $\delta(\Lambda-|k_4|)$ is to prevent exactly this.

\subsubsection*{Momentum Constraint}
Note that $k_4$ can be expressed as
\begin{equation}
	k_4 = |(K_F+k_1)\bm \Omega_1+(K_f+k_2)\bm \Omega_2-(K_F+k_3)\bm \Omega_3|-K_F.
\end{equation}
When doing RG towards the Fermi surface, the integral measure will not preserve the preserve the original form.
The situation is clearly is we use a smooth cutoff
\begin{equation}
	\theta(\Lambda-|k_4|) \rightarrow e^{-|k_4|/\Lambda},
\end{equation}
and define $\Delta\equiv \bm \Omega_1+\bm \Omega_2-\bm \Omega_3$, $k_4$ in this way behaves as
\begin{equation}
	k_4 = (|\Delta|-1)K_F + O(k).
\end{equation}
The integral then change to:
\begin{equation}
\begin{aligned}
	& \prod_{i=1}^{3} \int_{-\Lambda}^{\Lambda} \frac{d k_{i}}{2\pi}
		\int \frac{d \theta_{i}}{2 \pi} \int \frac{d \omega_{i}}{2 \pi}
		e^{-||\Delta|-1|\frac{K_F}{\Lambda}} u(k,\theta,\omega)
		\bar\psi \bar\psi \psi \psi \\
	\overset{\mathrm{RG}}{\longrightarrow} & \prod_{1}^{3} \int_{-\Lambda}^{\Lambda}
		\frac{d k_{i}^{\prime}}{2 \pi}
		\int \frac{d \theta_{i}}{2 \pi}
		\int \frac{d \omega_{i}^{\prime}}{2 \pi}
		e^{-|| \Delta|-1|\frac{sK_F}{\Lambda}}
		u\left(\frac{k^{\prime}}{s} \frac{\omega^{\prime}}{s} \theta\right)
		\bar\psi \bar\psi \psi \psi.
\end{aligned}
\end{equation}
We can then get the RG transformation of $u$ as
\begin{equation}
	u'(k',\theta,\omega') = e^{-||\Delta|-1|\frac{(s-1)K_F}{\Lambda}}u\left(\frac{k'}{s},\theta,\frac{\omega'}{s}\right).
\end{equation}
By Taylor expansion, we conclude that the only couplings that survive the RG transformation without any decay correspond to the cases in which $|\Delta|=1$, and without momentum dependence.

\begin{figure}[]
	\centering
	\includegraphics[width=0.5\linewidth]{pics/FL-kcons.png}
	\caption{The geometric construction for determining the allowed values of momenta. If $K_{1}$ and $K_{2}$ add up to $P$, then $K_{3}$ and $K_{4}$ are constrained as shown, if they are to add up to $P$ and lie within the cutoff. If the incoming momenta $K_{1}$ and $K_{2}$ are equal and opposite, the two shells coalesce and $K_{3}$ and $K_{4}$ are free to point in all directions, as long as they are equal and opposite.}
	\label{fig:FL-kcons}
\end{figure}

This equation has only three solutions (see also Fig.~\ref{fig:FL-kcons}):
\begin{equation}
\begin{aligned}
	&\text{Case I:} \quad \bm \Omega_1 = \bm \Omega_3, \\
	&\text{Case II:} \quad \bm \Omega_2 = \bm \Omega_3, \\
	&\text{Case III:} \quad \bm \Omega_1 = -\bm \Omega_2.
\end{aligned}
\end{equation}
Because of the rotational symmetry, the marginal vertex functions are determined solely by two functions:
\begin{eqnarray}
	u[\theta_1,\theta_2,\theta_1,\theta_2] &\equiv& F(\theta_1,\theta_2) = F(\theta_1-\theta_2), \\
	u[\theta_1,\theta_2,\theta_2,\theta_1] &=& -F(\theta_1-\theta_2), \\
	u[\theta_1,-\theta_1,\theta_3,-\theta_3] &\equiv& V(\theta_1,\theta_3) = V(\theta_1-\theta_3).
\end{eqnarray}
Note that the manifestation of the Pauli principle on $F$ and $V$ is somewhat subtle: $F$ will not be antisymmetric under $1 \leftrightarrow 2$ since, according to the way it is defined above, we cannot exchange 1 and 2 without exchanging 3 and 4 at the same time.
On the other hand, since 3 and 4 can be exchanged without touching 1 and 2 in the definition of $V$, $V$ must go to $-V$ when $1 \leftrightarrow 3$.

\subsection{One-loop RG for 2D System}
We first consider the loop correction to the chemical potential:
\begin{equation}
\begin{aligned}
	\mu^{(2)}(k,\theta,\omega)
	&= \int_{d\Lambda}\frac{dK'}{2\pi} \int \frac{d\omega'}{2\pi} \int \frac{d\theta'}{2\pi} \frac{F(\theta-\theta')}{i\omega-v_F k'} \\
	&= \int_{-\Lambda}^{-\Lambda+\Lambda dt}\frac{dK'}{2\pi} \int \frac{d\theta'}{2\pi} F(\theta-\theta') \\
	&= \frac{\Lambda}{2\pi} \left[\int\frac{d\phi}{2\pi} F(\phi)\right] dt.
\end{aligned}
\end{equation}
For the vertex correction, again we should consider three channels corresponding to the diagrams:
\begin{equation}
	\includegraphics[align=c, width=0.7\linewidth]{pics/FL-4.png}
\end{equation}
First we consider the correction to the $F(\theta)$.
The contribution from the ZS channel (the momentum transfer $Q \simeq 0$) is
\begin{equation}
	F^{(2)}_{\mathrm{ZS}}(\theta_1-\theta_2) = \int_{d\Lambda}\frac{dk}{2\pi}\int \frac{d\omega}{2\pi} \int \frac{d\theta}{2\pi} \frac{F(\theta_1-\theta)F(\theta-\theta_2)}{(i\omega-v_F k)^2}.
\end{equation}
Since two poles of the integrant lie at the same half plane, we can alway choose to close the loop integral along the other half, and thus getting zero contribution.

\begin{figure}[]
	\centering
	\includegraphics[width=0.4\linewidth]{pics/FL-kshell.png}
	\caption{Construction for determining the allowed values of loop momenta in ZS'. The requirement that the loop momenta come from the shell and differ by $Q'$ forces them to lie in one of the eight intersection regions of width $d\Lambda^2$.}
	\label{fig:FL-kshell}
\end{figure}

For the ZS' channels, the momentum conservation condition (see Fig.~\ref{fig:FL-kshell}) restrict the phase space to be of order $d\Lambda^2$, and thus has no relevant contribution to $F(\theta)$.
Finally, for the same kinematical reason, the BCS diagram does not renormalize $F(\theta)$ at one loop.
Consider Fig.~\ref{fig:FL-kcons}, with $K_3$ and $K_4$ replaced by the two momenta in the BCS loop, $K$ and $P-K$.
In each annulus we keep just two shells of thickness $d\Lambda$ at the cutoff corresponding to the modes to be eliminated.
The requirement that $K$ and $P-K$ lie in these shells and also add up to $P$ forces them into intersection regions of order $d\Lambda^2$.
This means the diagram is just as ineffective as the ZS' diagram in causing a flow.
Thus any $F$ is a fixed point to this order.

Now we consider the correction to the $V(\theta)$ function.
We choose the external momenta equal and opposite and on the Fermi surface.
The ZS and ZS' diagrams do not contribute to any marginal flow for the same reason that BCS and ZS' did not contribute to the flow of $F(\theta)$.
But the BCS diagram produces a flow:
\begin{equation}
\begin{aligned}
	V^{(2)}_{\mathrm{BCS}}(\theta_1-\theta_3)
	&= -\frac{1}{2}\int_{d\Lambda}\frac{dk}{2\pi}\int\frac{d\omega}{2\pi}\int\frac{d\theta}{2\pi}
		\frac{V(\theta_1-\theta)V(\theta-\theta_3)}{(i\omega-v_F k)(-i\omega-v_F k)} \\
	&= -\frac{dt}{4\pi v_F}\int \frac{d\theta}{2\pi}V(\theta_1-\theta)V(\theta-\theta_3).
\end{aligned}
\end{equation}
We can simplify the picture by going to angular momentum eigenfunctions,
\begin{equation}
	V(\theta) = \sum_l e^{il\theta} V_l,
\end{equation}
which gives the RG flow as
\begin{equation}
	\frac{dV_l}{dt} = -\frac{V_l^2}{4\pi v_F}.
\end{equation}
The solution to the RG flow is:
\begin{equation}
	V_l(t) = \frac{V_l(0)}{1+\frac{V_l(0)}{4\pi v_F}t}.
\end{equation}
What these equations tell us is that if the potential in angular momentum channel $l$ is repulsive, it will get renormalized (logarithmically) down to zero, while if it is attractive, it will run off to large negative values signaling the BCS instability.
This is the reason the $V$'s are excluded in Landau theory, which assumes we have no phase transitions.\footnote{Remember that the sign of any given $V_l$ is not necessarily equal to that of the microscopic interaction. Kohn and Luttinger have shown (PRL, 15, 524 (1965)) that some of them will be always negative. Thus, the BCS instability is inevitable, though possibly at absurdly low temperatures or absurdly high angular momentum $l$.}


\documentclass[11pt]{amsbook}

\usepackage{../HBSuerDemir}	% ------------------------

\begin{document}

%++++++++++++++++++++++
\hPage{b1p1/009}
%++++++++++++++++++++++
	The positive square root of $a(>0)$ is denoted by $\sqrt a $ and the negative one by $-\sqrt a$. Thus, \par

	\medskip

	{\centering $\sqrt 4 = 2, \quad -\sqrt4 = -2, \quad \sqrt{(-3)^2} = \sqrt9 = 3$  \\}

	\medskip

	The number $0$ which is neither positive nor negative has only one square root, namely $0$, as a double root of $x^2 = 0$.  \\ \par

	\underline{ Absolute value \\}

	The \underline {absolute value} of a real number "a" is a non negative real number, denoted by $|a|$ and defined by \\ \par

	\medskip

	{\centering $ |a| = \sqrt a^2 \quad (\geq 0)$  \\}

	\medskip

	or equivalently, by \\

	\medskip

	{\centering $ |a| = $  $\begin{cases}

		a \quad if \quad a>0  \\

		0 \quad if \quad a=0 \\

		-a \quad if \quad a<0 \\

	\end{cases}  $\\}

	\medskip

	The equivalency of two definitions can be seen by considering three cases $a>0, a=0, a<0$ seperately.

	\medskip

	$ |5| = \sqrt {5^2} = 5, \quad \quad \quad \quad |-3| = \sqrt{(-3)^2} = \sqrt 9 = 3 $ \\

	$ |-2| = -(-2) = 2, \quad \enskip |2| = 2$ \\

	As an immediate corollary we have

	 \medskip

	\underline{Corollary}

	\medskip

	1. $|a|^2 = a^2 \quad \quad \quad \quad \quad 2. -|a| \leq a \leq |a| $

	\medskip

	Some other properties are stated in the next theorem. \\

	\underline{Theorem.} If a, b are real numbers, then

% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/15}
% ++++++++++++++++++++++++++++++++++++++
will be treated in Chapter.\\

We conclude this secftion by two classification of numbers:\\\\

%\begin{figure}[htb]
%	\centering
	\includegraphics[width=1\textwidth]{images/b1p1-015-fig01}
%	\caption{Classification of complex numbers}
%	\label{fig:classificationOfComplexNumbersA}
%\end{figure}

%\begin{figure}[htb]
%	\centering
	\includegraphics[width=1\textwidth]{images/b1p1-015-fig02}\\
%	\caption{Classification of complex numbers}
%	\label{fig:classificationOfComplexNumbersA}
%\end{figure}

\subsection{EXERCISES}
\paragraph{}

\paragraph{\hspace{0.5cm}1. Construct the following numbers on the number axis:}

\paragraph{\hspace{1.5cm}a) $3/5$\hspace{2.6cm}	b) $-7/3$\hspace{0.6cm} \emph{(use Thales Theorem)}}

\paragraph{\hspace{1.5cm}c) $\sqrt{8}$\hspace{2.8cm}	d) $\sqrt{12}$ \hspace{0.8cm}\emph{(use Pythagorean Theorem)}}

\paragraph{}
\paragraph{\hspace{0.5cm}2. Give examples of two irrational numbers such that their}

% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/19}
% ++++++++++++++++++++++++++++++++++++++

The meanings of the symbols
$ \{ x: p(x) \text{ and } q(x) \} $
and
$ \{x: p(x) \text{ or } q(x)\} $
are clear.

\begin{exmp}
	(for finite sets):

	\begin{hEnumerateArabic}
		\item
		$ D = \{ n: n \text{ is a digit} \} = \{ 0, 1, 2, \dotsc, 9 \} $

		\item
		$ \{ n: n \in D, n \text{ is prime} \} = \{ 2, 3, 5, 7 \} $

		\item
		$ \{ n: n \in D, 1 \leq n < 7 \} = \{ 1, 2, 3, 4, 5, 6 \} $
	\end{hEnumerateArabic}
\end{exmp}

\begin{exmp}
	The following infinite sets of numbers are used frequently in mathematics:

	\begin{hEnumerateArabic}
		\item
		$ \hSoN = \{ n : n \text{ is a natural number} \} = \{ 1, 2, \dotsc, n, \dotsc \} $

		\item
		$ \hSoZ = \{ n : n \text{ is an integer} \} = \{ \dotsc, -2, -1, 0, 1, 2, \dotsc \} $

		\item
		$ \hSoQ = \{ r : r \text{ is a rational number} \} = \{ \frac{p}{q} : p, q \in \hSoZ, q \neq 0 \} $

		\item
		$ \hSoQ'= \{ r' : r' \text{ is an irrational number} \} $

		\item
		$ \hSoR = \{ x : x \text{ is a real number} \} = \{ x : x \in \hSoQ \text{ or } x \in \hSoQ' \} $

		\item
		$ \hSoC = \{ z : z \text{ is a complex number} \} = \{ a + ib : a, b \in \hSoR, i^{2} = -1 \} $
	\end{hEnumerateArabic}
\end{exmp}

A set worth of mentioning is the one having no element at all.
It is called the \hDefined{empty set} (\hDefined{null set}) and denoted by
$ \emptyset $,
so that
$ n(\emptyset) = 0 $.

\begin{exmp}
	Each one of the following is the null set
	$ \emptyset $:

	\begin{hEnumerateArabic}
		\item
		$ \{ x : x^{2} + 1 = 0 , x \in \hSoR \} $

		\item
		$ \{ x : \hAbs{x} < 0 , x \in \hSoR \} $

		\item
		$ \{ x : x \text{ is a box, } x \text{ is open and } x \text{ is closed} \} $
	\end{hEnumerateArabic}
\end{exmp}

In any particular discussion, a set that contains all the objects that enter into that discussion is called the \hDefined{uni-}

% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/53}
% ++++++++++++++++++++++++++++++++++++++

function given by the rule $ y = \hAbs{x-1} - 2\hAbs{x}+ x $ to be \\
a) a constant function, \\
b) an invertible function.

\begin{hSolution}
	The given function is the piecewisely defined function:
	\[
		y =
		\begin{cases}
			1+2x & \text{if }x \in(-\infty, 0] \\
			1-2x & \text{if }x \in(0, 1] \\
			-1 & \text{if }x \in(1, \infty).
		\end{cases}
	\]
\footnote{Corrected: "0)" in the first case of the equation must be closed interval "0]"}
\footnote{Corrected: Missing element of sign in the third case}
\end{hSolution}\\
% There must be    \end{exmp}     because the example and its solution is
%divided into two pages and i could not write it without \begin{exmp}
%which must be in the previous page.
a) A domain of restriction is $(1, \infty)$, \\
b) A domain of restriction is $(-\infty, 0]$ on which the function is increasing, or (0, 1] on which it is decreasing.

% =======================================
\subsection{Operation with functions}
Let
\[
	f\colon I \to \hSoR,\quad y = f(x)
\]
be a function with domain I. If $c \in \hSoR$, then the function
\begin{align}
	\label{eq:b1p1_053_scalarMultiple}
	cf\colon I \to \hSoR,\quad y = (cf)(x) = cf(x)
\end{align}
is called a \hDefined{scalar multiple} of f.

Let now be given two functions
\begin{gather*}
	f\colon I \to \hSoR,\quad y= f(x) \\
	g\colon J \to \hSoR,\quad y= g(x)
\end{gather*}
with non disjoint domain I and J, then f+g, f-g, fg,

% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/17}
% ++++++++++++++++++++++++++++++++++++++

10. Find the distance between the given points. First express them as absolute value, and then compute.

    a) 2,72 and 5,16 \qquad b) 3,86 and -7,28

	c) -3,86 and 7,28\qquad d) -1,23 and -12,35

    11. $(i+3)^3$=? \qquad Ans.\qquad18+26i

    12. $\frac{2+i}{3-2i}=? \qquad Ans.\qquad \frac{4+7i}{13}$

    13. Write a polynomial of least degree with real coefficients having the roots 3, 1-2i.[$x^3-5x^2+11x-15$]

    14. Solve for real X and y :
    \begin{center}
	$\frac{2-i}{3+iy}=\frac{2x-3iy}{2+i}$\qquad Ans.\qquad x=5/6, y=0
	\end{center}
    15. If z=5+4i find $z^2-2z+z\bar{z}$\qquad Ans.\qquad 60+32i

    \subsection{SETS}
    \subsubsection{Definitions}
    \qquad Any collection of objects (concrete or abstract) is called a \underline{set}, and the objects in the set are its \underline{elements} or \underline{members}.

    \qquad The sets are usually represented by capital letters A, B, ... . Two sets formed by the same elements are said to be \underline{equal}.

    \qquad The set A consisting of elements, say, 2, a, Ankara, -7, is denoted either by listing the elements within two braces, or by a diagram (Venn diagram) in which the elements
% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/21}

$$A\subseteq B \ and \ B\subseteq A  \ \Longleftrightarrow \ A=B$$

\par \ \par This implication can be used to prove equality of sets.

Some subsets of R are in so frequent use that they bear special symbols, namely:

$$R^+=\{x: \ x>0,x\in R \}, \ R^-=\{x: \ x<0,x\in R \}, \ R^*=\{x: \ x\in R,x\neq 0 \}$$

In the same way we may talk about the subsets of $\mathbb{Q}$, $\mathbb{Z}$ and $\mathbb{N}$ (Why $\mathbb{N}^-=\emptyset$ ? However some authors use $\mathbb{N}^-$ for $\mathbb{Z}^-$. In our notation, $\mathbb{N}^-$ is the set of all negative elements of $\mathbb{N}$, which is the empty set.)

\begin{enumerate}
  \item[C.] \underline{Operations with sets}
\end{enumerate}

Given two sets A and B, by means of three operations "$\cap$", "$\cup$" and "$\setminus$" we define the three sets, namely

\begin{enumerate}
  \item $A\cap B=\{ x: x\in A \ and \ x\in B\}$  "A intersection B"
  \item $A\cup B=\{ x: x\in A \ or \ x\in B\}$  "A union B"
  \item $A\setminus B=\{ x: x\in A,\ x\not \in B\}$  "A minus B"
\end{enumerate}

Venn diagrams of these sets are indicated by shaded sets given below:

\par \

\includegraphics[scale=0.3]{images/b1p1-021-fig01}
% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/055}
% ++++++++++++++++++++++++++++++++++++++
\begin{exmp}
	\footnote{example enumeration continues from the previous page.}
	\begin{enumerate}
		\item condition is jointly written with the rule.
		\item \begin{align*}
			(\frac{f}{g})(x) = \frac{f(x)}{g(x)} = \frac{\hAbs{x}}{x^{2}\sqrt{1-x}}
		\end{align*}
		As to the composition $g \circ f$ and $f \circ g$ we have.
		\item \footnote{g(f(x) written for the first equation here in the original book, so I corrected them.}
		\begin{align*}
			(g \circ f)(x) = g(f(x)) &= g(\frac{\hAbs{x}}{x}) = \frac{\hAbs{x}}{x}\sqrt{1-\frac{\hAbs{x}}{x}} \\
			(f \circ g)(x) = f(g(x)) &= f(x\sqrt{1-x}) = \frac{\hAbs{x\sqrt{1-x}}}{x\sqrt{1-x}} = \frac{\hAbs{x}\sqrt{1-x}}{x\sqrt{1-x}} \\
			&= \frac{\hAbs{x}}{x} \quad (x \neq 1)
		\end{align*}
		and \begin{align*}
			D_{g \circ f} = (-\infty, 1] - \hPairingCurly{0}, \: D_{f \circ g} &= (-\infty, 1] - \hPairingCurly{0,1} \\
			&= (-\infty, 1) - \hPairingCurly{0} = (-\infty, 1)
		\end{align*}
	\end{enumerate}
\end{exmp}

\begin{exmp}
	Given the functions
	\begin{align*}
		\hFunction{f}{\hSoR}{\hSoR}, \quad f(x) = \frac{x}{x-2}; \quad \hFunction{g}{\hSoR}{\hSoR}, \quad g(x) = x^{2}-x
	\end{align*}
	find the rules for the composite functions $g \circ f$ and $f \circ g$, and then determine their domains.
	\begin{hSolution}
		\begin{align*}
			1.\: (g \circ f)(x) &= g(f(x)) = f^{2}(x)-f(x) = \frac{x^{2}}{(x-2)^{2}} - \frac{x}{x-2} \\
			&= \frac{x^{2}-x(x-2)}{(x-2)^{2}} = \frac{2x}{(x-2)^{2}} \\
		\end{align*}
		\begin{align*}
			2.\: (f \circ g)(x) = f(g(x)) = \frac{g(x)}{g(x)-2} = \frac{x(x-1)}{(x+1)(x-2)}
		\end{align*}
		\begin{align*}
			D_{g \circ f} = \hSoR - \hPairingCurly{2}, \qquad D_{f \circ g} = \hSoR - \hPairingCurly{-1, 2}
		\end{align*}
	\end{hSolution}
\end{exmp}
% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/53}
% ++++++++++++++++++++++++++++++++++++++

function given by the rule $ y = \hAbs{x-1} - 2\hAbs{x}+ x $ to be \\
a) a constant function, \\
b) an invertible function.

\begin{hSolution}
	The given function is the piecewisely defined function:
	\[
		y =
		\begin{cases}
			1+2x & \text{if }x \in(-\infty, 0] \\
			1-2x & \text{if }x \in(0, 1] \\
			-1 & \text{if }x \in(1, \infty).
		\end{cases}
	\]
\footnote{Corrected: "0)" in the first case of the equation must be closed interval "0]"}
\footnote{Corrected: Missing element of sign in the third case}
\end{hSolution}\\
% There must be    \end{exmp}     because the example and its solution is
%divided into two pages and i could not write it without \begin{exmp}
%which must be in the previous page.
a) A domain of restriction is $(1, \infty)$, \\
b) A domain of restriction is $(-\infty, 0]$ on which the function is increasing, or (0, 1] on which it is decreasing.

% =======================================
\subsection{Operation with functions}
Let
\[
	f\colon I \to \hSoR,\quad y = f(x)
\]
be a function with domain I. If $c \in \hSoR$, then the function
\begin{align}
	\label{eq:b1p1_053_scalarMultiple}
	cf\colon I \to \hSoR,\quad y = (cf)(x) = cf(x)
\end{align}
is called a \hDefined{scalar multiple} of f.

Let now be given two functions
\begin{gather*}
	f\colon I \to \hSoR,\quad y= f(x) \\
	g\colon J \to \hSoR,\quad y= g(x)
\end{gather*}
with non disjoint domain I and J, then f+g, f-g, fg,

% ++++++++++++++++++++++++++++++++++++++
\hPage{b1p1/124}
% ++++++++++++++++++++++++++++++++++++++

% =====================================

\begin{thm} \footnote{The theorem and the proof starts in the previous page.
                                      Begin tags should be removed.}

	\begin{proof}
		exists at $ x_0$ and it is the slope of the
		\hDefined{unique}
		tangent line at $x_0$. Consequently, if $f(x)$ has derivative at $x_0$,
		(then the curve represented by this function has (unique) tangent line with slope $f^\prime(x_0)$,
                     and normal line with slope $-1/f^\prime(x_0)$.
		Then we have the equations of tangent and the normal lines through $(x_0,f(x_0))$ with known slope:
		\[
			y - f(x_0) =
					f^\prime(x_0)
						\cdot
							(x-x_0)
		\]
		and
		\[
			y - f(x_0) =
					- \frac
						{1}
						{f^\prime(x_0)}
							\cdot
								(x-x_0)
		\]
	\end{proof}

\end{thm}

% =====================================

The slope of the tangent line at a point is the
\hDefined{slope of the curve}
$y = f(x)$ at the same point. Let $\alpha$ be the angle between the positive $x$-axis and the tangent line at $x_0$.
Then $\tan \alpha = f^\prime(x_0)$ where $\alpha = \arctan f^\prime(x_0)$ is the
\hDefined{slope angle}
of the curves at $x_0$.\\

% =====================================

The \hDefined{angle between two curves}
at a certain common point is defined to be the angle between the tangent lines at this point.
Two curves intersect each other
\hDefined{orthogonally}
at a point if the angle between them is $90^{\circ}$ at that point,
and they are tangent at $x_0$ if the angle of intersection is zero at $x_0$.\\

% =====================================

\begin{exmp}

	Find the equations of tangent and normal lines at the points of intersects of the following curves of
	$y = f(x) = x^2$,\\
	$y = g(x) = \sqrt{8x}$,
	and the angles between their point of intersection.

	\begin{hSolution}
		Equating $y$'s we have $x^4 = 8x
		\Rightarrow x_1 = 0$, $x_2 = 2
		\Rightarrow y_1 = 0$, $y_2 = 4$
		and the points of intersection are $O = (0,0)$, $A = (2,4)$.
	\end{hSolution}

\end{exmp}

  \hPage{b1p1/225}
    \begin{hEnumerateArabic}

        \setcounter{enumi}{180}
        \item {Find $m$, $M$ of the function $f(x) = ( {x} / {x+1} )$}

        \item{Same question for $f(x) = \sqrt[3]{ {x} / ({x^2+1})}$}

        \item{Same question for $f(x) = \sin({x}) + \sqrt{3} \cos({x})$}

        \item{If $m$, $n$ are positive integers with $m > n$, prove. }

            \begin{hEnumerateAlpha}
                \item $\frac{x^m - 1}{m} > \frac{x^n - 1}{n}$ , for $x > 1$
                \item $\frac{x^m - 1}{m} > \frac{x^n - 1}{n}$ , for $0 < x < 1$
            \end{hEnumerateAlpha}

        \item{Prove the inequalities is Exercise 184 for $m$, $n\in Q$ .}
        \item{If $f(x) = x + 2$ and $g(f(x)) = x^2 - 3x$, find $g(x)$. }
        \item{Defining }

        \[
            \max{\{ f(x), g(x) \}} =\begin{cases}
                                        f(x) \text { when } f(x) \ge g(x)\\
                                        g(x) \text { when } g(x) \ge f(x),
                                    \end{cases}
        \]

        \[
            \min{\{ f(x), g(x) \}} =\begin{cases}
                                        f(x) \text { when } f(x) \le g(x)\\
                                        g(x) \text { when } g(x) \le f(x),
                                    \end{cases}
        \]

        \noindent
        prove that if $f(x), g(x)$ are continuous, then

            \begin{hEnumerateAlpha}
                \begin{multicols}{2}
                    \item $\max{\{ f(x), g(x) \}}$
                \columnbreak
                    \item $\min{\{ f(x), g(x) \}}$
                \end{multicols}
            \end{hEnumerateAlpha}

        are continuous.

        \item{ Sketch $\max{\{ f(x), g(x) \}}$ where}

            \begin{hEnumerateAlpha}
                \begin{multicols}{2}
                    \item $f(x) = x^2 ,$ $ g(x) = x$
                \columnbreak
                    \item $f(x) = 1 ,$ $ g(x) = x^2$
                \end{multicols}

                \begin{multicols}{2}
                    \item $f(x) = x^2 ,$ $ g(x) = x^2 + 1$
                \columnbreak
                    \item $f(x) = x^3 - x ,$ $ g(x) = 2x - 2$
                \end{multicols}
            \end{hEnumerateAlpha}

        \item{For the given functions in Exercise 188, sketch $\min{\{ f(x), g(x) \}}$ }

        \item{Sketch: }
            \begin{hEnumerateAlpha}
                \begin{multicols}{2}
                    \item $\{(x , y) : max{\{x,y\}} = 2\}$
                \columnbreak
                    \item $\{(x , y) : min{\{x,y\}} = 2\}$
                \end{multicols}
            \end{hEnumerateAlpha}

    \end{hEnumerateArabic}
%%%%%%%%%%%%%%%
\hPage{b1p1/232}
%%%%%%%%%%%%%%%%%%5
\begin{hEnumerateArabic}
    \setcounter{enumi}{207}
    \item
        \begin{hEnumerateAlpha}
            \begin{multicols}{2}
                \item 1,
                \columnbreak
                \item -1
            \end{multicols}
        \end{hEnumerateAlpha}
    \setcounter{enumi}{209}
    \item $ r = (r_1 + \ldots + r_n ) / n. $
\end{hEnumerateArabic}
\end{document}


\subsection{Line integrals}\label{subsec:line_integrals}

\begin{definition}\label{def:length_of_parametric_curve}
  \begin{figure}
    \centering
    \text{\todo{Add diagram}}\iffalse\begin{mplibcode}
      input metapost/plotting;

      u := 4cm;

      beginfig(1)
      pair p[];

      vardef y(expr x) =
      if x < 1 / 3:
      -sqrt(1 - (2 * x * 4 / 3 - 1) ** 2) / 2
      else:
      -sqrt(1 - (x * 4 / 3 - 1 / 3) ** 2) / 2
      fi
      enddef;

      p[1] := (0, y(0)) scaled u;
      p[2] := (1 / 4, y(1 / 4)) scaled u;
      p[3] := (2 / 3, y(2 / 3)) scaled u;
      p[4] := (1, y(1)) scaled u;

      draw path_of_plot(y, 0, 1, 0.01, u);
      draw p[1] -- p[2] -- p[3] -- p[4];

      label.lft("$\gamma(0)$", p[1]);
      fill dot shifted p[1];

      label.bot("$\gamma(\tfrac 1 4)$", p[2]);
      fill dot shifted p[2];

      label.bot("$\gamma(\tfrac 2 3)$", p[3]);
      fill dot shifted p[3];

      label.rt("$\gamma(1)$", p[4]);
      fill dot shifted p[4];
      endfig;
    \end{mplibcode}\fi
    \caption{A rough approximation of a curve using three line segments.}\label{def:length_of_parametric_curve/approximation}.
  \end{figure}

  Let \( X \) be a \hyperref[def:banach_space]{Banach space} and let \( \gamma: [a, b] \to X \) be a \hyperref{def:parametric_curve}{parametric curve}. In order to find the curve's length, we use the following procedure:
  \begin{itemize}
    \item Fix a nonnegative integer \( n \).

    \item Choose \( n - 1 \) points \( c_1, \ldots, c_{n-1} \) in \( [0, 1] \) and order them ascendingly. Define \( c_0 \coloneqq 0 \) and \( c_n \coloneqq 1 \). We will call the tuple \( c \coloneqq (c_0, \ldots, c_n) \) a \term{partition} of \( [0, 1] \) because it partitions \( [0, 1] \) into the subintervals \( [c_{k-1}, c_k], k = 1, \ldots, n \).

          Note that this choice does not actually require the axiom of choice since we will universally quantify all partitions.

    \item Use the partition \( c \) to build linear approximation to \( \gamma \) using the \hyperref[def:convex_set/line_segment]{line segments} \( [\gamma(c_{k-1}), \gamma(c_k)], k = 1, \ldots, n \).

    \item Find the total length of the approximation as
          \begin{equation*}
            \len_c (\gamma) \coloneqq \sum_{k=1}^n \norm{\gamma(c_k) - \gamma(c_{k-1})}.
          \end{equation*}

    \item Build a \hyperref[def:directed_set]{directed set} of all partitions by introducing an order that depends only the size of the tuples (i.e. we declare all partitions with the same size as equal).

    \item Using the defined directed set, build a \hyperref[def:topological_net]{net} that assigns to each partition the length \( \len_c(\gamma) \). The \hyperref[def:net_convergence/limit]{limit} of this net, if it exists, is called the \term{length} of the curve \( \gamma \) and is denoted by \( \len(\gamma) \).
  \end{itemize}

  If the curve \( \gamma \) has a length, it is called \term{rectifiable}.
\end{definition}

\begin{proposition}\label{thm:length_of_smooth_curves}
  For a \hyperref[def:differentiability/frechet]{differentiable} parametric curve \( \gamma: [a, b] \to X \) we have
  \begin{equation*}
    \len(\gamma) \coloneqq \int_a^b \norm{\gamma'(x)} dx.
  \end{equation*}
\end{proposition}
\begin{proof}
  By the mean value theorem, when constructing the length in \fullref{def:length_of_parametric_curve}, for each \( k = 1, \ldots, n \) there exists a point \( \xi_k \in [c_{k-1}, c_k] \) such that
  \begin{equation*}
    \gamma(c_k) - \gamma(c_{k-1}) = \gamma'(\xi_k) (c_k - c_{k-1}).
  \end{equation*}

  Therefore,
  \begin{equation*}
    \len_n (\gamma)
    =
    \sum_{k=1}^{n+1} \norm{\gamma(c_k) - \gamma(c_{k-1})}
    =
    \sum_{k=1}^{n+1} \norm{\gamma'(\xi_k)} (c_k - c_{k-1})
    \to
    \int_a^b \norm{\gamma'(x)} dx.
  \end{equation*}
\end{proof}

\begin{corollary}\label{thm:length_of_function_graph}
  The \hyperref[def:length_of_parametric_curve]{length} of the \hyperref[def:multi_valued_function/graph]{graph} of a \hyperref[def:differentiability/frechet]{differentiable} function \( f: [a, b] \to \BbbR \), if it exists, is given by
  \begin{equation*}
    \len(\gph(f)) \coloneqq \int_a^b \sqrt{1 + f'(x)} dx.
  \end{equation*}
\end{corollary}
\begin{proof}
  Apply \fullref{thm:length_of_smooth_curves} for the parametric curve \( \gamma(x) \coloneqq = \gph(y^+(x)) = (x, f(x)) \).
\end{proof}


\documentclass[main.tex]{subfiles}
\begin{document}

\subsection{Quasi De Sitter solutions}

\marginpar{Wednesday\\ 2020-10-28, \\ compiled \\ \today}

Today we will see how to explicitly solve the equation
%
\begin{align}
u''_k (\tau )
+
\qty[k^2 - \frac{a''}{a} + a^2 m^2] u_k (\tau ) = 0
\,,
\end{align}
%
where \(\tau \) is the conformal time, while \(m^2 = \pdv*[2]{V}{\varphi }\).
The stage in which \(m^2 = 0\) is the quasi de-Sitter stage.

Now, we will not assume that \(H\) is constant, and instead we will consider the effect of a nonzero slow-roll parameter \(\epsilon = - \dot{H} / H^2 \ll 1\).
We will need the relation
%
\begin{align}
\frac{\ddot{a}}{a} = H^2 ( 1- \epsilon )
\,,
\end{align}
%
which can be proven by a straightforward manipulation.

\begin{claim}

Integrating the conformal time definition (we need to also integrate by parts) we can find
%
\begin{align}
\tau = - \frac{1}{a H (1 - \epsilon )}
\,.
\end{align}
\end{claim}

\begin{proof}
In this quasi-De-Sitter scenario the scale factor will be given, to first order, by
%
\begin{align}
a &= \exp(\int H \dd{t}) \approx \exp(\int H(t_i) + \dot{H}_i t \dd{t})  \\
&\approx \exp(\int H(t_i) - \epsilon H^2(t_i) t \dd{t} ) = \exp(H_i t - \epsilon H_i^2 t^2 /2)
\,,
\end{align}
%
so the conformal time will read
%
\begin{align}
\tau &= \int \frac{ \dd{t}}{a} = \int \exp(- H_i t + \epsilon \frac{H_i^2t^2}{2}) \approx \eval{\tau }_{\epsilon =0} + \epsilon \eval{\dv{\tau }{\epsilon }}_{\epsilon = 0}
\,.
\end{align}

The zeroth order term is just \(\tau^{(0)} = - 1/ aH\), while the derivative in the second term is
%
\begin{align}
\eval{\dv{\tau }{\epsilon }}_{\epsilon = 0} &= \eval{\dv{}{\epsilon } \int \exp(- H_i t + \epsilon \frac{H_i^2t^2}{2}) \dd{t}}_{\epsilon =0}   \\
&= \frac{1}{H_i} \eval{\dv{}{\epsilon }}_{\epsilon = 0} \int \exp(-x + \epsilon \frac{x^2}{2}) \dd{x}  \\
&= \frac{1}{H_i} \int \eval{\exp(- x + \epsilon \frac{x^2}{2})}_{\epsilon = 0 } \frac{x^2}{2} \dd{x}  \\
&= \frac{1}{H_i} \int e^{-x} \frac{x^2}{2} \dd{x}
= - \frac{1}{H_i} \int e^{-x} x \dd{x} = \frac{1}{H_i} \int e^{-x} \dd{x} = - \frac{1}{a H_i}
\,,
\end{align}
%
therefore the approximation reads
%
\begin{align}
\tau \approx - \frac{1}{a H_i} \qty(1 + \epsilon ) \approx - \frac{1}{a H_i (1 - \epsilon )}
\,.
\end{align}
\end{proof}

Using this, we find that to first order \((aH)^2 \approx (1 + 2 \epsilon ) / \tau^2\), therefore
%
\begin{align}
\frac{a''}{a} = a^2 H^2 (2- \epsilon )
=2 \frac{(1 + 2 \epsilon)}{\tau^2} \qty(1 - \frac{\epsilon}{2})
\approx \frac{2}{\tau^2} \qty(1 + \frac{3}{2} \epsilon )
\,.
\end{align}

Also, we have the expression \(\epsilon = 2 - a'' a / a^{\prime 2}\) --- all of these can be proven from the definition of \(H\) and \(\epsilon \).

Substituting this for \(a'' /a\) the equation becomes
%
\begin{align}
u''_k(\tau ) + \qty[k^2 - \frac{\nu^2 - 1/4}{\tau^2}] u_k (\tau )= 0
\,,
\end{align}
%
where \(\nu^2 = 9/4 + 3 \epsilon \).
This is a Bessel equation: these equations are generally in the form
%
\begin{align}
z^2 y'' (z) + z y' (z) + (z^2 - \nu^2) y(z) = 0
\,.
\end{align}

The solutions are called Hankel functions, and the general solution will read
%
\begin{align}
u_k (\tau ) = \sqrt{- \tau } \qty[ c_1 (k) H_\nu^{(1)} (-k\tau ) + c_2 (k) H_\nu^{(2)} (-k\tau )]
\,,
\end{align}
%
where \(H^{(2)}_\nu = H^{(1), *}_\nu\).
We want to impose the asymptotic behavior of the solution: let us start with the sub-horizon case \(k / aH \gg 1\).
This means that
%
\begin{align}
u_k (\tau ) = \frac{1}{\sqrt{2k}} e^{-ik \tau }
\,,
\end{align}
%
and the asymptotics of the Hankel functions are
%
\begin{align}
H^{(1)}_\nu  (x) \sim \sqrt{ \frac{2}{\pi x}} \exp(i \qty(x - \frac{\pi}{2} \nu - \frac{\pi}{4})) \sim \frac{e^{ix}}{\sqrt{x}}
\,
\end{align}
%
for \(x \gg 1\). This works well for us: we can set \(c_2 (k) = 0\) and only use \(c_1 (k)\).

We must choose
%
\begin{align}
c_1 (k) = \frac{\sqrt{\pi }}{2} \exp(i \qty(\nu + \frac{1}{2}) \frac{\pi}{2})
\,
\end{align}
%
in order to have the correct normalization.
Then, our solution will read
%
\begin{align}
u_k (\tau ) = \frac{\sqrt{\pi }}{2} \exp(i ( \nu + \frac{1}{2}) \frac{\pi}{2}) \sqrt{-\tau } H^{(1)}_\nu (- k \tau )
\,,
\end{align}
%
so in the \textbf{superhorizon} \(k /aH \ll 1\) (or \(-k \tau \ll 1\)) regime we have the asymptotic \(x \ll 1\) expansion of the Hankel function:
%
\begin{align}
H^{(1)}_\nu (x) \sim \sqrt{ \frac{2}{\pi }} e^{- i \pi /2}
2^{\nu - 3/2} \frac{\Gamma (\nu )}{\Gamma (3/2)} x^{-\nu } \sim x^{-\nu }
\,,
\end{align}
%
therefore
%
\begin{align}
u_k (\tau ) \approx \exp(i (\nu - \frac{1}{2}) \frac{\pi}{2})
2^{\nu - 3/2}
\frac{\Gamma (\nu )}{\Gamma (3/2)}
(- k \tau )^{1/2 - \nu } \frac{1}{\sqrt{2 k}}
\,,
\end{align}
%
so if we want the modulus \(\abs{ \delta \varphi _k} = \abs{u_k } / a\) we can make use of the fact that \(\tau \sim - 1/aH \propto 1/a\), therefore \(\abs{ \delta \varphi _k} \approx - H \tau \abs{u_k}\).
Inserting the expression we have for \(u_k\) yields
%
\begin{align}
\abs{ \delta \varphi _k}
&\approx 2^{\nu - 3/2} \frac{\Gamma (\nu )}{\Gamma (3/2)} \frac{H}{\sqrt{2 k^3}} \qty(\frac{k}{aH})^{3/2 - \nu }  \\
&\approx \frac{H}{\sqrt{2 k^3}} \qty( \frac{k}{aH})^{3/2 - \nu }
\approx \frac{H}{\sqrt{2 k^3}} \qty( \frac{k}{aH})^{-\epsilon }
\marginnote{Expanded to first order in \(\epsilon \), so that \(3/2 - \nu \approx - \epsilon \).}
\,,
\end{align}
%
which holds at super-horizon scales.
In the De Sitter case, the \textbf{exact} result reads
%
\begin{align}
u_k (\tau ) \propto \sqrt{- \tau } H^{(1)}_{3/2} (- k \tau )
= \frac{e^{-ik \tau }}{\sqrt{2k}} \qty(1 - \frac{i}{k \tau })
\,.
\end{align}

The next step is to generalize to a scalar field which is not massless anymore: we shall consider a mass \(m^2 = \pdv*[2]{V}{\varphi } \ll H^2\), so a ``light'' scalar field.
We require this because one of the slow-roll parameters is \(\eta _V = m^2 / (3 H^2) \ll 1\): a massive field (compared to \(H^2\)) would not be able to drive slow-roll inflation.

Then, the \(m^2 a^2\) term in the equation is nothing but
%
\begin{align}
m^2 a^2 = 3 \eta _V a^2 H^2 = \frac{3 \eta _V}{\tau^2}
\,,
\end{align}
%
but we also know that
%
\begin{align}
\frac{a''}{a} = \frac{2}{\tau^2 } \qty[ 1 + \frac{3}{2} \epsilon ]
\,,
\end{align}
%
so we can still recast the equation into the same Bessel form: only the coefficient of the \(\tau^{-2}\) term changes.

The equation will read
%
\begin{align}
u''_k (\tau ) + \qty[ k^2 - \frac{\nu^2 - 1/4}{\tau^2}] u_k (\tau ) = 0
\,,
\end{align}
%
with \(\nu^2 = 9/4 + 3 \epsilon - 3 \eta _V\).
Then, the solution has exactly the same form as before: on super-horizon scales, with \(k \ll aH\), we have
%
\begin{align}
\abs{ \delta \varphi _k} = \frac{H}{\sqrt{2 k^3}} \qty( \frac{k}{aH})^{3/2 - \nu }
&&
\nu \approx \frac{3}{2} + \epsilon - \eta _V
\,.
\end{align}

Note that we did not require the field to be anything but light: the computation we have done can apply to an inflaton field but also to any other scalar field evolving in this phase of the expansion of the universe.
If it is another scalar field, why should we require it to be light? It can be shown that if \(m^2\) is \textbf{large} compared to \(H^2\) the superhorizon-scale fluctuations of that field have a very hard time being excited: the field basically remains in its vacuum state.

The Klein-Gordon equation reads
%
\begin{align}
\ddot{\varphi} (\vec{x}, t)
+ 3 H \dot{\varphi} (\vec{x}, t)
- \frac{\nabla^2 \varphi (\vec{x},t)}{a^2}
= - \pdv{V}{\varphi }
\,,
\end{align}
%
and we have obtained is starting from the expression
%
\begin{align}
\square \varphi = \frac{1}{\sqrt{-g}} \partial_{\nu } \qty(\sqrt{-g} g^{\mu \nu } \partial_{\mu } \varphi )
\,,
\end{align}
%
where the metric is taken to be a FLRW one. We have neglected a crucial component: we should also \textbf{perturb the spacetime}, beyond the FLRW metric, if we want to have a consistent discussion.

This is important to do for the inflaton especially since \(\varphi \) dominates the energy density of the universe.
The Einstein equations,
%
\begin{align}
G_{\mu \nu } = 8 \pi G T_{\mu \nu }^{(\varphi )}
\,,
\end{align}
%
are perturbed with a variation in the field, \(\delta \varphi \), which perturbs the energy-momentum tensor \(\delta T_{\mu \nu }^{(\varphi )}\), which means that we must also perturb the Einstein tensor \(\delta G_{\mu \nu} \) and then finally the metric \(\delta g_{\mu \nu }\).

We can define the so-called Sasaki-Mukhanov variable \(Q_\varphi \) associated to \(\varphi \):
%
\begin{align}
Q_\varphi = \delta \varphi + \frac{\varphi }{H} \hat{\Phi}
\,,
\end{align}
%
where \(\hat{\Phi} = \Phi + (1/6) \nabla^2 \chi^{\parallel}\), where \(\Phi \) and \(\chi^{\parallel}\) are scalar perturbations of \(g_{ij}\):
%
\begin{align}
g_{ij} = a^2(\tau ) \qty[(1 - 2 \Phi ) \delta_{ij} + \chi_{ij}]
\,.
\end{align}

The perturbation \(\chi^{\parallel}\) is given in terms of \(\chi_{ij}\) as we shall see in equation \eqref{eq:traceless-perturbation-decomposition}.
The quantity \(\hat{\Phi}\) is gauge invariant.

The variable \(\hat{Q}_\varphi  = Q_\varphi / a\) obeys an equation in the form
%
\begin{align}
\hat{Q}_\varphi '' + \qty[ k^2 - \frac{a''}{a} + M^2a^2] \hat{Q}_\varphi  = 0
\,.
\end{align}

In this case we have
%
\begin{align}
\frac{M^2}{H^2} \approx 3 \eta _V - 6 \epsilon
\,,
\end{align}
%
therefore the parameter of the Bessel equation reads
%
\begin{align}
\nu^2 &= \frac{9}{4} + 9 \epsilon - 3 \eta _V  \\
\frac{3}{2} - \nu  &\approx \eta _V - 3 \epsilon
\,.
\end{align}

We then have the most general expression for the field perturbation, accounting for the gravitational perturbation to first order as well:
%
\begin{align}
\abs{ Q_\varphi} \approx \frac{H}{\sqrt{2 k^3}} \qty( \frac{k}{aH})^{3/2 - \nu }
\,.
\end{align}

We want to show how primordial GW are generated from the inflaton perturbations.
We consider a tensor-perturbed FLRW metric
%
\begin{align}
\dd{s^2} = a^2 (\tau )
\qty[- \dd{\tau}^2 + \qty(\delta_{ij} + h_{ij} (\vec{x}, \tau )) \dd{x^{i}} \dd{x^{j}}]
\,.
\end{align}

We are neglecting all scalar and vector perturbations for simplicity.
The symmetric tensor \(h_{ij}\) can be chosen to be traceless: \(h^{i}_{i} = \partial_{i}^{\text{BG}} h^{ij} = 0 \), where the derivative is that constructed from the background unperturbed spacetime.
This is basically the TT-gauge, but in a cosmological context the conditions come about naturally.

The equations of motion read
%
\begin{align}
h_{ij}'' + 2 \frac{a'}{a} - \nabla^2 h_{ij} = 0
\,,
\end{align}
%
where a prime denotes a derivative with respect to the conformal time \(\tau \).
If we wanted to use cosmic time instead, the equation would read
%
\begin{align}
\ddot{h}_{ij} + 3 H \dot{h}_{ij} - \frac{\nabla^2 h_{ij}}{a^2} = 0
\,.
\end{align}

We can see that this is the same as \(\square^{\text{BG}} h_{ij} = 0\). The equation is the same as a \textbf{massless, minimally coupled scalar field}.
We already know the solution for these equations: the mechanism of quantum vacuum amplification still works.
We have no source term --- a 0 on the right-hand side --- since we are working up to linear order, in full generality there will be other source terms, commonly denoted as \(\pi^{T}_{ij}\) (\(T\) for ``source of tensor modes'').
This term describes the tensor component of the anisotropic stresses, from the quadrupole up.

Measuring these primordial GWs would be the first probe of the quantum nature of gravity.

GWs start out with 6 degrees of freedom, but 4 are gauged away, so we are left with only 2.
We can then expand \(h_{ij}\) in a plane wave basis:
%
\begin{align}
h_{ij} (\vec{x}, \tau )
= \int  \sum_{\lambda = +, \times }
\frac{ \dd[3]{k}}{(2 \pi )^3}
e^{i k \cdot x}
h_\lambda (\vec{k}, \tau ) \epsilon^\lambda_{ij} (\vec{k})
\,,
\end{align}
%
so that in Fourier space the equations of motion for the coefficients read
%
\begin{align}
h_\lambda'' + 2 \frac{a'}{a} h_\lambda' + k^2 h_\lambda = 0
\,.
\end{align}

The polarization tensors are required to be symmetric, traceless, orthogonal to \(\vec{k}\), and to be orthonormal with respect to the product \((\epsilon_1, \epsilon_2 ) = \Tr(\epsilon_1 \epsilon_2^{*}) \). If \(\vec{k} \propto \hat{z}\), then they are given by the usual expressions
%
\begin{align}
\epsilon_{ij}^{+} = \left[\begin{array}{ccc}
1 & 0 & 0 \\
0 & -1 & 0 \\
0 & 0 & 0
\end{array}\right] &&
\epsilon_{ij}^{\times } = \left[\begin{array}{ccc}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 0
\end{array}\right]
\,.
\end{align}
%

This is exactly the same as the equations of motion for the scalar massless minimally coupled field.
We can then see that if \(k \gg aH\) we get
%
\begin{align}
h_\lambda \sim \frac{e^{-ik \tau }}{a}
\,,
\end{align}
%
while for \(k \ll aH\) the gravitational perturbation has a constant mode and a decaying mode.
We can treat the two coefficients like \(h_{+, \times } = \phi_{+, \times } \sqrt{32 \pi G}\), \marginnote{The normalization comes from the action.}
so that \(\phi \) has the dimension of a mass while \(h\) is dimensionless.
Then, like we saw before in the superhorizon regime \(k\ll aH\) we get
%
\begin{align} \label{eq:primordial-gw-power-spectral-amplitude}
\abs{h_{+, \times }} = \frac{H}{\sqrt{2 k^3}}
\qty( \frac{k}{aH})^{-\epsilon } \sqrt{32 \pi G}
\,.
\end{align}

We can distinguish GWs from inflation from those produced by single astrophysical events: inflation yields a \emph{stochastic background} of GWs.
These GWs are a crucial target of future experiments, both in interferometry and in CMB maps.

We need to introduce the power spectrum of perturbations:
the two-point correlation function, in real space, is given in terms of a generic stochastic perturbation field \(\delta (\vec{x})\): we can calculate
%
\begin{align}
\expval{ \delta (\vec{x} + \vec{r}) \delta (\vec{x})} = \xi (r)
\,.
\end{align}

In Fourier space, we define the power spectrum as the Fourier transform of the two-point correlation function: the field is written as
%
\begin{align}
\delta (\vec{x}) = \frac{1}{(2\pi )^3} \int \dd[3]{k} e^{i \vec{k} \cdot \vec{x}} \delta (\vec{k})
\,,
\end{align}
%
and the power spectrum \(P(k)\) is defined by
%
\begin{align}
\expval{ \delta (\vec{k}) \delta (\vec{k}')} = (2\pi )^3 \delta^{(3)} (\vec{k} + \vec{k}') P(k)
\,.
\end{align}

The plus is there since we wrote \(\delta (k) \delta (k')\) instead of \(\delta(k) \delta^{*}(k')\): if we included the conjugate than the argument of the \(\delta \) would be \(k - k'\), due to the fact that since \(\delta (x)\) is real we have \(\delta^{*}(k) = \delta (-k)\).

We have
%
\begin{align}
\sigma^2 &= \expval{ \delta^2(x)}
= \frac{1}{2 \pi^2} \int \dd{k} k^2 P(k)  \\
&= \frac{1}{2 \pi^2} \int \frac{ \dd{k}}{k} k^3 P(k)  \\
&= \int \dd{\log k } \Delta^2_\delta  (k)
\,,
\end{align}
%
where we define the dimensionless power spectrum:
%
\begin{align}
\Delta^2_\delta (k) = \frac{k^3}{2 \pi^2} P(k)
\,.
\end{align}

We can show that \(P(k)\) is indeed the Fourier transform of \(\xi (r)\):
%
\begin{align}
\expval{ \delta (x+r) \delta (x)} &= \frac{1}{(2 \pi )^6}
\int \dd[3]{k_1 } e^{i k_1 (x+r)} \int \dd[3]{k_2 } e^{i k_2 x}
\expval{\delta (k_1 ) \delta (k_2 )}  \\
&= \frac{1}{(2 \pi )^3} \int \dd[3]{k_1 } \dd[3]{k_2 } \delta^{(3)} (k_1 + k_2 ) P(k_1 ) e^{i k_1 (x+r) + i k_2 x}  \\
&= \frac{1}{(2 \pi )^3} \int \dd[3]{k_1 } e^{i k_1 r} P(k_1 )
\,,
\end{align}
%
as we wanted to show.
In the \(r = 0\) case we recover the expression from above for the variance.

\end{document}


% !TEX root = ../main.tex

\chapter{Abstract}
\thispagestyle{myheadings}

This paper utilises measurement errors to improve intraday volatility forecasting in the bitcoin market with Heterogeneous Autoregressive (HAR) model. Conjointly, metrics of cryptocurrencies are also included as additional explanatory variables. In that, Realized Volatility (RV) of intraday data from Bitfinex cryptocurrency exchange is constructed for evaluation of the volatility predictability of HAR model. The inclusion of blockchain metrics decreases the mean square error (MSE) at different time intervals. Intraday data from another Bitcoin exchange Bitstamp are used in the validation process, and the final model shrinks prediction deviation by 33.09\% compared to HAR model. Besides, Adjusted Transaction Volume in USD, Transaction Count, Market Cap in USD, Average Difficulty of mining, Median Value of Transaction in USD are metrics being found have a significant impact on the Realized Volatility.

\noindent\rule[0.25\baselineskip]{\textwidth}{1pt}
Keywords: Volatility forecasting, HAR, HARQ, Bitcoin


\chapter{Examples of MSN Function Interpolation}
\label{chap:func_interp}

In this chapter we present results using the fast MSN algorithms.
We begin by interpolating smooth functions before
attempting to interpolate rough functions (discontinuous functions
or functions with infinite derivatives).
Unless otherwise stated, all computations will be performed
in double precision.
In 1D, we compare the results with Lagrange interpolation on
Chebyshev nodes.
In 2D, we will compare MSN with interpolation on a tensor grid of
Chebyshev nodes; this is computed using the 2D IDCT.
When comparing against rough functions, we use some standard
filters (discussed below).


\documentclass[12pt]{article}
\usepackage{setspace}
\usepackage{amsmath}
\usepackage{titling}
\usepackage{mathtools}
\usepackage{nomencl}
\usepackage{algorithmicx}
\usepackage{algorithm,algpseudocode}
\makenomenclature
\setlength{\droptitle}{-10em}   % This is your set screw
\title{ODE solvers recursive equations}
\author{Aurelie Degletagne}

\begin{document}
\begin{doublespace}

\maketitle
\tableofcontents
\renewcommand{\nomname}{Notations}

\section{Notations}
In each following equation h is the time step, $x_{k}$,$v_{k}$,$a_{k}$   the position, velocity and acceleration at the time step k, K the stiffness, M the mass, $r_{m}$ the rayleigh mass, $r_{k}$ the rayleigh stiffness and $F_{ext}$ the external forces.

\section{Euler solver}

\subsection{EulerExplicit solver}
It is the simplest time integration solver.
\\The integration scheme is based on the following equations:
\\$ v_{k+1} = v_{k}+ha_{k} $
\\$ x_{k+1} = x_{k}+hv_{k} $

\subsection{EulerImplicit solver}
It is a semi-implicit time integrator using backward Euler scheme for first and second degree Ordinary Differential Equations (ODE).
This is based on [Baraff and Witkin, Large Steps in Cloth Simulation, SIGGRAPH 1998]
\\ The integration scheme is based on the following equations:
\\$ v_{k+1} = v_{k}+h\frac{Fext_{k}+v_{k}(-(r_{k}+h)K-r_{m}M)}{h(h+r_{k})K+(1+hr_{m})M} $
\\$ x_{k+1} = x_{k}+hv_{k} $

\section{Newmark solver}
It is an implicit time integrator using Newmark scheme.
The implementation computes $a_{k}$ directly then solves the first equation to compute $a_{k+1}$, and finally computes the new velocity $v_{k+1}$ and the new position $x_{k+1}$. In Sofa one uses for Newmark coefficients $\gamma=0.5$ and $\beta=0.25$.
\\$ a_{k+1} = \frac{Fext_{k} + h*cstAcc*a_{k}+cstVel*v_{k}}{(h^2\beta + h\gamma r_{k})K+(1+h\gamma r_{m})M} $
$\left\{
\begin{array}{r c l}
cstAcc &=& (-r_{m}(1-\gamma)M-h(0.5-\beta)K-rk(1-\gamma)K)\\
cstVel &=& (-r_{m}M-(h+r_{k})K)
\end{array}
\right.$
\\$ v_{k+1} = v_{k}+h(1-\gamma)a_{k}+h\gamma a_{k+1} $
\\$ x_{k+1} = x_{k}+hv_{k}+0.5h^2(1-2\beta)a_{k}+h^2\beta a_{k+1} $

\section{VariationalSymplectic solver}
It is explicit and implicit time integrator using the Variational Symplectic Integrator as defined in: Kharevych, L et al. “Geometric, Variational Integrators for Computer Animation.” ACM SIGGRAPH Symposium on Computer Animation 4 (2006): 43–51. p is the momentum.

\subsection{VariationalSymplecticExplicit solver}

$ v_{k+1} = \frac{2(Fext_{k}+p_{k}-hr_{m}v_{k}M)}{M} $
\\$ p_{k+1} = Mv_{k+1} $
\\$ x_{k+1} = x_{k}+hv_{k+1} $

\subsection{VariationalSymplecticImplicit solver}
The current implementation for implicit integration assume $alpha=0.5$ (quadratic accuracy) and uses several Newton steps to estimate velocity. We have 3 state variables: position $q_{t}$, the velocity $v_{t}$ and the momentum $p_{t}$ initialized such that $p_{0}=Mv_{0}$.
\\2 steps are required for this solver:
\\ \underline{Step 1:} \textbf{Find the new velocity $v_{k+1}$ by minimizing Lylian energy.}
\\ The Lilyan L energy is the sum of kinetic energy, elastic energy and damping:
$L(v_{k+1})=\frac{h}{2}v_{k+1}^{T}Mv_{k+1} + hW(q_{k}+\frac{h}{2}v_{k+1}) - hp_{k}v_{k+1}$
\\To minimize this energy we solve the non-linear system of equations:
\\$\partial L(v_{k+1}) = 0 = hMv_{k+1} - \frac{h^{2}}{2}F(q_{k}+\frac{h}{2}v_{k+1})-hp_{k}$ \\where F() is the force associated with the potential energy (opposite gradient)
\\ Finding the roots of the non-linear equations can be done performing several newton steps by linearizing the force around $q_{k}+\frac{h}{2}v_{k+1}=q^{*}$
\\ This is an iterative process:
\begin{itemize}
\item Define $ q_{i}^{*}$ as the current estimate of $q^{*}$. The objective is to find $q^{*}$ such that:
$2*M(q^{*}-q_{k})-\frac{h^2}{2}F(q^{*})-hp_{k}=0$
\item Search for $\partial q_{i} = q_{i+1}^{*}-q_{k}$ by linearizing the force around $q_{i}^{*}$
At the end we have: $(\frac{4}{h^{2}}M-K) \partial q_{i} = F(q_{i}^{*}) - K()\partial q_{i-1} + \frac{2}{h}p_{k}$
\end{itemize}
This iterative process stops when the maximal number of newton iterations is reached or when the required accuracy of the estimated position $q^{*}$ is reached.
\\ At the end we obtain the velocity for the next time step:
$v_{k+1}=\frac{2(q_{i+1}^{*}-q_{k})}{h}$
\\ \\ \\ \underline{Step 2:} \textbf{Update the new position q and the new momentum p}
\\$q_{k+1} = q_{k} + hv_{k+1}$
\\$ p_{k+1} = Mv{k+1}+\frac{h}{2}q_{i+1}^{*}$
\\ \\ \textbf{Energy conservation:}
\\This solver enables to conserve the Hamiltonian energy.
\\$E_{Hamiltonian} = \frac{p_{k+1}^{t}Mp_{k+1}}{2} + E_{potential}$
\\Some tests in modules/SofaImplicitOdeSolver/SofaImplicitOdeSolver\_test show the energy conservation for a mass spring-system but also for a planet-sun system.
\\For example you can have a look at the example scene:
\\examples/Components/solver/VariationalSymplecticSolver.scn
\\It is an embedded beam with FEM force field. This scene uses the implicit variational solver and as you can see on the generated file energy.txt the Hamiltonian energy is constant.
\section{RungeKutta}
It is a popular explicit time integration method, much more precise than euler explicit solver.

\subsection{Runge Kutta second order}
It is the Runge-Kutta method with order 2 or the middle point rule. Functions are evaluated two times at each step.
\\ \underline {At time t + h/2}
\\$ x_{k+\frac{1}{2}} = x_{k}+\frac{1}{2}hv_{k}$
\\$ v_{k+\frac{1}{2}} = v_{k}+\frac{1}{2}ha_{k} $
\\$ a_{k+\frac{1}{2}} = \frac{Fext_{k+\frac{1}{2}}}{m}$
\\ \underline {At time t+h}
\\$x_{k+1} = x_{k}+h*v_{k+\frac{1}{2}}$
\\$v_{k+1} = v_{k}+h*a_{k+\frac{1}{2}}$
\\$a_{k+1} = \frac{Fext_{k+1}}{m}$

\subsection{Runge Kutta fourth order}
It is the Runge-Kutta method with order four. Functions are evaluated four times at each step.
\\  \underline{Variables}
\\$stepBy2 = \frac{h}{2}$  $       $ $stepBy3 = \frac{h}{3}$ $       $  $stepBy6 = \frac{h}{6}$
\\ \underline{At time t :}
\begin{itemize}
\item \textbf{Step 1}
\\$k1v = v_{k}$
\\$k1a = a_{k}$
\item \textbf{Step 2}
\\$k2x = x_{k} + k1v*stepBy2$
\\$k2v  = v_{k} + k1a*stepBy2$
\\$k2a  = (Fext_{stepBy2}(k2x,k2v))/m$
\item \textbf{Step 3}
\\$k3x  = x_{k} + k2v * stepBy2$
\\$k3v  = v_{k} + k2a * stepBy2$
\\$k3a  = (Fext_{stepBy2}(k3x,k3v))/m$
\item \textbf{Step 4}
\\ $ k4x  = x_{k} + k3v * h $
\\ $ k4v  = v_{k} + k3a * h $
\\ $ k4a  = (Fext_{k+1}(k4x,k4v))/m $
\end{itemize}
 \underline{At time t + h :}
\\$x_{k+1} = x_{k} + k1v * stepBy6 + k2v * stepBy3 + k3v * stepBy3 + k4v * stepBy6$
\\$v_{k+1} = v_{k} + k1a * stepBy6 + k2a * stepBy3 + k3a * stepBy3 + k4a * stepBy6$
\\$a_{k+1} = (Fext{k+1})/m$

\section{CentralDifference solver}
It is an explicit time integrator using central difference (also known as Verlet or Leap-frog). The equations are separated in two cases: either the rayleigh mass is null or not.
\begin{itemize}
\item \underline {if $rm=0$}
\\$a_{k+1} = \frac{Fext_{k+1}}{m}$
\\$v_{k+1} = v_{k}+ha_{k+1}$
\\$x_{k+1} = x_{k}+hv_{k+1}$
\item \underline{if $rm!=0$}
\\$a_{k+1} = \frac{Fext_{k+1}}{m}$
\\$v_{k+1} = cstVel * v_{k} + cstAcc*a_{k}$
$\left\{
\begin{array}{r c l}
cstVel &=&  \cfrac{\cfrac{1}{h}-\cfrac{r_{m}}{2}}{\cfrac{1}{h}+\cfrac{r_{m}}{2}}\\
cstAcc &=& \cfrac{1}{\cfrac{1}{h}+\cfrac{r_{m}}{2}}
\end{array}
\right.$
\\$x_{k+1} = x_{k}+hv_{k+1}$
\end{itemize}
\end{doublespace}
\end{document}