\documentclass[11pt,letterpaper]{article}
\usepackage{amssymb,amsmath}
\usepackage{xfrac}
\usepackage{mathrsfs}
\usepackage{bm}
\usepackage{color}
\usepackage{listings}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{float}
\graphicspath{{./fig/}{./png/}}
\usepackage{cancel}
\usepackage{amsthm}
\usepackage{cancel}
\usepackage{hyperref}
\usepackage{titlesec}
\usepackage{fancyvrb}
\usepackage{dsfont}
\usepackage{scrextend}
%\usepackage{subfigure}
\usepackage{subcaption}
\usepackage{empheq}
\usepackage{enumitem}
\usepackage{framed}
\titlelabel{\thetitle.\quad}
\parskip 1ex 
\setlength\parindent{0pt}
\usepackage[margin=0.8in]{geometry}

\def \ul{\underline}
\def \ds{\displaystyle}
\def \pa{\partial}

%\usepackage[T1]{fontenc}
%\usepackage{newtxmath,newtxtext}
%\renewcommand{\familydefault}{\sfdefault}
%\usepackage[cm]{sfmath}

\newcommand{\dbar}{d\hspace*{-0.08em}\bar{}\hspace*{0.1em}}


\pagenumbering{arabic}
\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\pagestyle{fancy}
\rhead{\thepage}
\cfoot{}
\rhead[<even output>]{\thepage}
\chead[<even output>]{EB Modes}
\lhead[<even output>]{Sayan Mandal}


\usepackage[auth-lg]{authblk}
\author{Sayan Mandal}
\begin{document}
\title{Calculation of $E$ and $B$ Polarization}
\date{\today\vspace{-2ex}}
\maketitle



\noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\section{Our Calculations}
We take an electric field $\mathbf{E}$ and a magnetic field $\mathbf{B}$, and construct the combined field,
\begin{equation}\label{e1.1}
\mathbf{F}=\alpha\mathbf{E}+\beta\mathbf{B}
\end{equation}
Now, we create the quantity,
\begin{equation}\label{e1.2}
P(x,y)=(F_x+iF_y)^2
\end{equation}
In Fourier space, we have,
\begin{equation}\label{e1.3}
\tilde{\mathcal{E}}(k)+i\tilde{\mathcal{B}}(k)=\tilde{P}(k)e^{-2i\psi_k},\quad\quad\psi_k=\tan^{-1}\frac{k_y}{k_x}
\end{equation}
Going back to \textit{physical} space, we get the E and B polarizations.

\subsection{A Single Function $f$}

We take a single function $f(x,y)$ and get the fields as,
\begin{equation}\label{e1.4}
E_i=\partial_if,\quad\quad B_i=\epsilon_{ij}\partial_jf
\end{equation}
This gives us the following \textit{real} and \textit{imaginary} parts of $P(x,y)$,
\begin{equation}\label{e1.5}
\begin{aligned}
\mathrm{Re}\left[P(x,y)\right]&=\left(\alpha^2-\beta^2\right)\bigg[(\partial_xf)^2-(\partial_yf)^2\bigg]+4\alpha\beta\bigg[(\partial_xf)(\partial_yf)\bigg]\\
\mathrm{Im}\left[P(x,y)\right]&=2\bigg[\left(\alpha^2-\beta^2\right)(\partial_xf)(\partial_yf)+\alpha\beta\bigg\{(\partial_yf)^2-(\partial_xf)^2\bigg\}\bigg]
\end{aligned}
\end{equation}
We can see that the cases $(\alpha,\beta)=(1,0)$ and $(\alpha,\beta)=(0,1)$ differ only by a sign, as far as $P(x,y)$ is concerned. And so, with the choice,
\begin{equation}\label{e1.6}
f(x,y)=\cos x\cos y
\end{equation}
we get the polarization patterns in Fig.\ref{onlyF}.

\begin{figure}[h]
    \centering
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{Pol_alpha1_beta0}
        \caption{$\alpha=1$,\,$\beta=0$}
        \label{f10}
    \end{subfigure}
    \quad
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{Pol_alpha0_beta1}
        \caption{$\alpha=0$,\,$\beta=1$}
        \label{f01}
    \end{subfigure}
    
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{Pol_alpha1_beta1}
        \caption{$\alpha=1$,\,$\beta=1$}
        \label{f11}
    \end{subfigure}
    \quad
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{Pol_alpha1_beta-1}
        \caption{$\alpha=1$,\,$\beta=-1$}
        \label{f1-1}
    \end{subfigure}
    \caption{$E$ and $B$ Polarization when $\mathbf{E}$ and $\mathbf{B}$ are both derived from a single function $f(x,y)$.}
    \label{onlyF}
\end{figure}





\subsection{Two Functions $f$ and $g$}

If have two functions $f(x,y)$ and $g(x,y)$, such that,
\begin{equation}\label{e1.7}
E_i=\partial_if,\quad\quad B_i=\epsilon_{ij}\partial_jg
\end{equation}
we get,
\begin{equation}\label{e1.8}
\begin{aligned}
\mathrm{Re}\left[P(x,y)\right]&=\alpha^2\bigg[(\partial_xf)^2-(\partial_yf)^2\bigg]-\beta^2\bigg[(\partial_xg)^2-(\partial_yg)^2\bigg]+2\alpha\beta\bigg[(\partial_xf)(\partial_yg)+(\partial_xg)(\partial_yf)\bigg]\\
\mathrm{Im}\left[P(x,y)\right]&=2\bigg[\alpha^2(\partial_xf)(\partial_yf)-\beta^2(\partial_xg)(\partial_yg)+\alpha\beta\bigg\{(\partial_yf)(\partial_yg)-(\partial_xf)(\partial_xg)\bigg\}\bigg]
\end{aligned}
\end{equation}
In this case, with,
\begin{equation}\label{e1.9}
f(x,y)=\cos x\cos y,\quad\quad g(x,y)=\sin x\sin y
\end{equation}
we get the polarization patterns in Fig.\ref{FandG}.

\begin{figure}[h]
    \centering
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{2Pol_alpha1_beta0}
        \caption{$\alpha=1$,\,$\beta=0$}
        \label{2f10}
    \end{subfigure}
    \quad
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{2Pol_alpha0_beta1}
        \caption{$\alpha=0$,\,$\beta=1$}
        \label{2f01}
    \end{subfigure}
    
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{2Pol_alpha1_beta1}
        \caption{$\alpha=1$,\,$\beta=1$}
        \label{2f11}
    \end{subfigure}
    \quad
    \begin{subfigure}[b]{0.45\textwidth}
        \includegraphics[width=\textwidth]{2Pol_alpha1_beta-1}
        \caption{$\alpha=1$,\,$\beta=-1$}
        \label{2f1-1}
    \end{subfigure}
    \caption{$E$ and $B$ Polarization when $\mathbf{E}$ and $\mathbf{B}$ are both derived from respectively from $f(x,y)$ and $g(x,y)$.}
    \label{FandG}
\end{figure}
The bottom row of Fig.\ref{FandG} is a bit strange. However, if we skew the ratioo a bit ($\alpha=1$,\,$\beta=4$), we get something like Fig.\ref{FandGSkew}.

\begin{figure}[h]
\begin{center}
\includegraphics[width=0.45\textwidth]{2Pol_alpha1_beta4}
\caption{$E$ and $B$ Polarization when $\mathbf{E}$ and $\mathbf{B}$ are both derived from respectively from $f(x,y)$ and $g(x,y)$, and $\alpha=1$,\,$\beta=4$.}
\label{FandGSkew}
\end{center}
\end{figure}





\noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\section{Formulae in Durrer Book}

Let us start with eq.\eqref{e1.1} where the fields are given either by eq.\eqref{e1.7} (and by eq.\eqref{e1.4}). We now construct the tensor,
\begin{equation}\label{e2.1}
\begin{aligned}
P_{ij}=F_iF_j&=\big(\alpha E_i+\beta B_i\big)\big(\alpha E_j+\beta B_j\big)\\
&=\alpha^2E_iE_j+\alpha\beta(E_iB_j+B_iE_j)+\beta^2B_iB_j
\end{aligned}
\end{equation}
We now plan to use \textbf{eq. (5.83)} in Durrer's book to calculate $\mathcal{E}$ and $\mathcal{B}$ ($\tilde{\mathcal{E}}$ and $\tilde{\mathcal{B}}$ in the book.)
$$
\begin{aligned}
\mathcal{E}=&\,2\,\mathrm{div}\,\mathrm{div}\,P=2\pa_i\pa_jP_{ij}=2\pa_i\pa_j\bigg[\alpha^2E_iE_j+\alpha\beta\left(E_iB_j+B_iE_j\right)+\beta^2B_iB_j\bigg]\\
=&\,2\pa_i\bigg[\alpha^2\bigg\{(\pa_jE_i)E_j+E_i(\pa_jE_j)\bigg\}+\beta^2\bigg\{(\pa_jB_i)B_j+B_i(\pa_jB_j)\bigg\}\\
&+\alpha\beta\bigg\{(\pa_jE_i)B_j+E_i(\pa_jB_j)+(\pa_jB_i)E_j+B_i(\pa_jE_j)\bigg\}\bigg]\\
=&\,2\alpha^2\bigg[(\pa_i\pa_jE_i)E_j+E_i(\pa_i\pa_jE_j)+(\pa_jE_i)(\pa_iE_j)+(\pa_iE_i)^2\bigg]\\
&+2\beta^2\bigg[(\pa_i\pa_jB_i)B_j+B_i(\pa_i\pa_jB_j)+(\pa_jB_i)(\pa_iB_j)+(\pa_iB_i)^2\bigg]\\
&+2\alpha\beta\bigg[(\pa_i\pa_jE_i)B_j+(\pa_jE_i)(\pa_iB_j)+(\pa_iE_i)(\pa_jB_j)+E_i(\pa_i\pa_jB_j)\\
&\quad\quad\quad+(\pa_i\pa_jB_i)E_j+(\pa_jB_i)(\pa_iE_j)+(\pa_iB_i)(\pa_jE_j)+B_i(\pa_i\pa_jE_j)\bigg]
\end{aligned}
$$
Using the facts,
$$\pa_i\pa_j\equiv\pa_j\pa_i,\quad\quad\nabla\cdot\mathbf{B}=0$$
we can considerably simplify the above expression,
\begin{equation}\label{e2.2}
\begin{aligned}
\mathcal{E}=&\,2\alpha^2\bigg[(\pa_i\pa_jE_i)E_j+E_i(\pa_i\pa_jE_j)+(\pa_jE_i)(\pa_iE_j)+(\pa_iE_i)^2\bigg]+2\beta^2(\pa_jB_i)(\pa_iB_j)\\
&+2\alpha\beta\bigg[(\pa_i\pa_jE_i)B_j+(\pa_jE_i)(\pa_iB_j)+(\pa_jB_i)(\pa_iE_j)+B_i(\pa_i\pa_jE_j)\bigg]
\end{aligned}
\end{equation}

\subsection{Two Functions $f$ and $g$}
We consider the expressions term by term:
\begin{itemize}
\item \ul{The $\beta^2$ term:}
$$(\pa_jB_i)(\pa_iB_j)=(\epsilon_{im}\pa_j\pa_mf)(\epsilon_{im}\pa_j\pa_mf)$$
Using $\epsilon_{im}\epsilon_{jn}=\delta_{in}\delta{mn}-\delta_{in}\delta_{jm}$, we get,
\begin{equation}\label{e2.3}
\beta^2(\pa_jB_i)(\pa_iB_j)=\beta^2\bigg[(\pa_i\pa_mg)(\pa_i\pa_mg)-(\nabla^2g)^2\bigg]
\end{equation}

\item \ul{The $\alpha\beta$ term:}


\item \ul{The $\alpha^2$ term:}

\end{itemize}






\end{document}