\documentclass{report}

\input{preamble}
\input{macros}
\input{letterfonts}
\usepackage{physics}
\usepackage{circuitikz}

\title{\Huge{Engineering Electromagnetics}}
\author{\huge{Aidan Sharpe}}
\date{Fall 2023}

\begin{document}

\maketitle
\newpage% or \cleardoublepage
% \pdfbookmark[<level>]{<title>}{<dest>}
\pdfbookmark[section]{\contentsname}{toc}
\tableofcontents
\pagebreak

\chapter{Maxwell's Equations in Integral Form}

\section{Vector Analysis}

\dfn{Scalar}{
A measure described by one real number. Examples include temperature, size, and mass. A scalar is a $1 \times 1$ matrix.
}

\dfn{Vector}{
A measure described by more than one real number (direction and magnitude). Examples include force, velocity, and it's derivatives. Vectors are often described by $n \times 1$ or $1 \times n$ matricies.
}

\dfn{Unit Vector}{
A unit (direction or normalized) vector is signified with a $\hat{ }$ symbol. Common unit vectors include $\hat{x}$, $\hat{y}$, and $\hat{z}$. The normalized version of any vector is defined as: 
$$\hat{a} = \frac{\vec{A}}{\lVert\vec{A}\rVert}$$
}

\dfn{The Dot Product}{
The dot product is a measure of how \emph{parallel} two vectors are, scaled by the magnitudes of the two vectors. To compute it, find the sum of the products of the like components of two vectors. It is also defined as the product of the magnitudes of the vectors normalized by the cosine of the angle between them. It is defined as:
$$W = \vec{F} \cdot \vec{r} =  \lVert\vec{F}\rVert\lVert\vec{r}\rVert \cos{\alpha}$$
}

\dfn{The Cross Product}
{
The cross product is a measure of how \emph{perpendicular} two vectors
are. This operation yeilds a vector quantity \emph{orthoganal} to both
original vectors. The direction vector for the cross product is
\(\hat{a}_c\), and its magnitude is the product of the magnitudes and
the sine of the angle between them. It is defined as:
$$\vec{C} = \vec{A} \times \vec{B}
= \lVert\vec{A}\rVert \lVert\vec{B}\rVert \sin(\alpha) \hat{a}_c =
\begin{vmatrix} 
    \hat{x} & \hat{y} & \hat{z} \\
    A_x & A_y & A_z \\
    B_x & B_y & B_z
\end{vmatrix}$$
}

\mthd{The Right Hand Rule}{
The right hand rule is a quick way to find \(\hat{a}_c\).
\[\overrightarrow{thumb} = \overrightarrow{pointer} \times \overrightarrow{middle}\]
}

\section{Vector Calculus}\label{vector-calculus}

The differential along some path, \(d\vec{l}\), is defined as:
\[d\vec{l} = dx\hat{x} + dy\hat{y} + dz\hat{z} = d\vec{x} + d\vec{y} + d\vec{z}\]

\dfn{The "Del" ($\bs{\nabla}$) operator}{
The gradient of a scalar field.
\\
\\
The gradient in cartesian coordinates:
$$\nabla f = \del{}{x} \hat{x} + \del{}{y} \hat{y} + \del{}{z} \hat{z}$$
The gradient in cylindrical coordinates:
$$\nabla f = \del{f}{\rho}\hat{\rho} + {1\over\rho}\del{f}{\varphi}\hat{\varphi} \del{f}{z}\hat{z}$$
The gradient in spherical coordinates:
$$\nabla f = \del{f}{r}\hat{r} + {1\over r}\del{f}{\theta}\hat{\theta} + {1\over r\sin(\theta)}\del{f}{\varphi}\hat{\varphi}$$
}

\dfn{The Directional Derivative}{
The \emph{directional derivative} is used to find the change of a
function along some infinatesimal direction and is defined as:
\[\Delta \varphi = {\nabla}_l \varphi \cdot \Delta \vec{l}\]
\[\therefore {\nabla}_l \varphi = \frac{\Delta \varphi}{\delta \vec{l}} = \frac{d \varphi}{d \vec{l}} = \nabla \varphi \cdot \frac{\vec{l}}{\lVert\vec{l}\rVert}\]
}

\ex{}{
A function, \(f(x,y,z) = x^2 y^2 + xyz\). Find \(\nabla f\).
\[f(x,y,z) = f(r)\] \[r = \sqrt{x^2 + y^2 + z^2}\]
\[\nabla f = (2xy^2)\hat{x} + (2x^2y + xz)\hat{y} + xy\hat{z}\]
}

\ex{}{
Consider a function, \(w = x^2y^2 + xyz\). Find \(\nabla_l w\) at
\((2, -1, 0)\) in the direction,
\(\vec{l} = 3\hat{x} + 4\hat{y} + 12\hat{z}\).
\[\lVert\vec{l}\rVert = \sqrt{3^2 + 4^2 + 12^2} = 13\]
\[{\nabla}_l w = \nabla w \cdot \frac{\vec{l}}{\lVert\vec{l}\rVert}\]
Solving at \((2, -1, 0)\):
\[\nabla w = 2(2)(-1)^2\hat{x} + 2(2)^2(-1)\hat{y} + 2(-1)\hat{z} = 4\hat{x} - 8\hat{y} - 2\hat{z}\]
\[{\nabla}_l w= (4\hat{x} - 8\hat{y} - 2\hat{z}) \cdot \left(\frac{3}{13}\hat{x} + \frac{4}{13}\hat{y} + \frac{12}{13}\hat{z}\right) = \frac{-44}{13}\]
}

\subsection{Divergence and Curl}

\dfn{Divergence}{
The divergence of a vector field is a measure of outward flux. It is given by:
$$\text{div } \vec{A} = \nabla \cdot \vec{A}$$

Divergence in cartesian coordinates:
$$\text{div } \vec{A} = \del{A_x}{x} + \del{A_y}{y} + \del{A_z}{z}$$

Divergence in cylindrical coordinates:
$$\text{div } \vec{A} = {1\over\rho}\del{(\rho A_\rho)}{\rho} + {1\over\rho}\del{A_\varphi}{\varphi} + \del{A_z}{z}$$

Divergence in spherical coordinates:
$$\text{div } \vec{A} = {1\over r^2}\del{(r^2 A_r)}{r} + {1\over r\sin\theta}\del{}{\theta}(A_\theta \sin\theta)+ {1\over r\sin\theta}\del{A_\varphi}{\varphi}$$
}

\dfn{Curl}
{
    The curl of a vector field is a measure of circulation in each infinatesimally small region of the field.

$$\text{curl } \vec{A} = \nabla \times \vec{A}$$

Curl in cartesian coordinates:
$$\text{curl } \vec{A} = \left(\del{A_z}{y} - \del{A_y}{z}\right)\hat{x} + \left(\del{A_x}{z} - \del{A_z}{x}\right)\hat{y} + \left(\del{A_y}{x} - \del{A_x}{y}\right)\hat{z}$$

Curl in cylindrical coordinates:
$$\text{curl } \vec{A} = \left({1\over \rho}\del{A_z}{\varphi} - \del{A_\varphi}{z}\right)\hat{\rho} + \left(\del{A_\rho}{z} - \del{A_z}{\rho}\right)\hat{\varphi} + {1\over\rho}\left(\del{(\rho A_\varphi)}{\rho} - \del{A_\rho}{\varphi}\right)\hat{z}$$

Curl in spherical coordinates:
$$\text{curl } \vec{A} = {1 \over r \sin \theta}\left(\del{}{\theta}(A_\varphi \sin \theta) - \del{A_\theta}{\varphi}\right)\hat{r} + {1\over r}\left({1\over\sin\theta}\del{A_r}{\varphi} - \del{}{r}(r A_\varphi)\right)\hat{\theta} + {1\over r}\left(\del{}{r}(r A_\theta) - \del{A_r}{\theta}\right)\hat{\varphi}$$
}

\dfn{Solenoidal Field}
{
    A solenoidal field is a vector field without divergence.
    $$\nabla \cdot \vec{f} = 0$$
}

\dfn{Conservative Field}
{
    A conservative field is a vector field without curl.
    $$\nabla \times \vec{f} = 0$$
}

\ex{}{
Consider the vector field, \(\vec{F} = k \hat{x}\), where both the direction and magnitude are uniform in all space.
$$\nabla \cdot \vec{F} = 0$$
$$\nabla \times \vec{F} = 0$$
}

\ex{}{
    Consider the vector field, \(\vec{F} = k \hat{r}\), where magnitude is constant and direction is away from a central point.
    $$\hat{r} = \sqrt{\hat{x}^2 + \hat{y}^2 + \hat{z}^2}$$
    $$\nabla \cdot \vec{F} = \sqrt{3} k$$
    $$nabla \times \vec{F} = 0$$
}

\ex{}{
    Consider the vector field, $\vec{F} = \vec{k} \times \hat{r}$, where magnitude is uniform and the direction is perpendicular to the distance from a central point for all space.
    $$\nabla \cdot \vec{F} = 0$$
    $$\nabla \times \vec{F} = 2k$$
}

\subsubsection{Curl and Divergence Identities}
\begin{enumerate}
\item
  The Laplacian: can operate on a scalar or vector field
  \[\nabla \cdot (\nabla f) = \nabla^2 f\]
  \[\frac{\partial^2 f}{\partial x} + \frac{\partial^2 f}{\partial y} + \frac{\partial^2 f}{\partial z}\]
\item
  The curl of a gradient is \(0\) \[\nabla \times (\nabla f) = 0\]
\item
  The gradient of divergence is a scalar
  \[\nabla (\nabla \cdot \vec{f})\]
\item
  The divergence of curl is \(0\)
  \[\nabla \cdot (\nabla \times \vec{v}) = 0\]
\item
  Curl of curl
  \[\nabla \times (\nabla \times \vec{A}) = \nabla(\nabla \cdot \vec{A}) - \nabla^2 \vec{A}\]
\end{enumerate}

\subsection{Line and Surface Integrals}
\dfn{The Line Integral}
{
    The line integral is the integral of the tangential component of a vector field along a path.

    $$\int \vec{A} \cdot d\vec{l} = \int \lVert \vec{A} \rVert \cos(\alpha) \lVert d\vec{l} \rVert$$
    Where:
    \begin{itemize}
        \item[$\vec{A}$] is some vector field
        \item[$d\vec{l}$] is defined as $dx\hat{x} + dy\hat{y} + dz\hat{z}$
    \end{itemize}
}
\noindent
If the path of the integral is a closed curve, it is said to be the circulation of \(\vec{A}\) around \(\vec{l}\), defined as:

$$\oint_c \vec{A} \cdot d\vec{l}$$

\ex{}{
Calculate the circulation of \(\vec{F}\) around the path.

\(\vec{F} = x^2 \hat{x} - xy\hat{y} - y^2\hat{z}\)

Circulation of \(\vec{F}\) around the path:
\[\oint \vec{F} \cdot d \vec{l} = \int_1 + \int_2 + \int_3 + \int_4\]

\hypertarget{path-1}{%
\subparagraph{Path 1}\label{path-1}}

Straight line from \((1,0,0)\) to \((0,0,0)\)

\(x\) varies, \(z=0\), \(y=0\).

Plug into \(\vec{F}\):
\[\vec{F}_1 = x^2\hat{x} - x(0)\hat{y} - (0)^2\hat{z} = x^2\hat{x}\]

Since \(x\) varies at some rate, \(dx\) exists, and since \(y\) and
\(z\) are constant, \(dy\) and \(dz\) are both \(0\).

Plug into \(d\vec{l}\):
\[d\vec{l} = dx\hat{x} + (0)\hat{y} + (0)\hat{z} = dx\hat{x}\]
\[\int \vec{F}_1 \cdot d\vec{l}_1 = \int x^2\hat{x} \cdot dx\hat{x} = \int x^2dx\]

For this specific path:
\[\int_{1}^{0} x^2dx = \left. \frac{x^3}{3} \right\vert_1^0 = 0 - \frac{1}{3} = -\frac{1}{3}\]

\hypertarget{path-2}{%
\subparagraph{Path 2}\label{path-2}}

Straight line from \((0,0,0)\) to \((0,1,0)\)

\(y\) varies, \(x=0\), \(z=0\)

Plug into \(\vec{F}\):
\[\vec{F}_2 = (0)^2\hat{x} - (0)y\hat{y} - y^2\hat{z} = -y^2\hat{z}\]

Since \(y\) varies at some rate, \(dy\) exists, but since \(x\) and
\(z\) are constant, \(dx\) and \(dz\) are both \(0\).

Plug into \(d\vec{l}\):
\[d\vec{l}_2 = (0)\hat{x} + dy\hat{y} + (0)\hat{z} = dy\hat{y}\]
\[\int \vec{F}_2 \cdot d\vec{l} = \int -y^2\hat{z} \cdot dy\hat{y} = \int\limits_0^1 0 = 0\]

\hypertarget{path-3}{%
\subparagraph{Path 3}\label{path-3}}

Straight line from \((0,1,0)\) to \((1,1,1)\)

\(x\) and \(z\) vary at the same rate and always have the same value,
\(y=1\)
}

\dfn{The Surface Integral}
{
    Evaluating a surface integral yields the total flux crossing a surface:
    $$\int_s \vec{F} \cdot d\vec{s}$$
}

\noindent
$\vec{F} \cdot d\vec{s}$ evaluates the flux for a small surface area vector, $d\vec{s}$. The surface area vector has the magnitude of the area in the direction normal to the surface.
\\
\\
For a surface of area, $\Delta s$, with a uniform vector field, the flux is given by:
$$\Delta s \left[ \lVert \vec{F} \rVert \cos(\alpha)\right] = \vec{F} \cdot \hat{n} \Delta s$$
\\
In a discrete context, the total flux crossing an area, $\Delta s$:
$$\sum_{i=1}^N \vec{F}_i \cos(\alpha_i) \Delta s_i$$


\thm{Gradient Theorem}{
    The line integral through a gradient field is the difference of the values a the end points.
    $$\int\limits_{r_1}^{r_2} \nabla \varphi \cdot d\vec{l} = \varphi(r_2) - \varphi(r_1)$$
    $$\oint \nabla \varphi \cdot d\vec{l} = 0$$
}

\thm{Divergence Theorem}
{
    The divergence in some volume is the same as the flux through its surface.
    $$\iiint_{vol} \nabla \cdot \vec{A} d\tau = \oiint \vec{A} \cdot d\vec{s}$$
}

\thm{Stokes Theorem}
{
    The curl in some region is the same as the circulation of the region's border.
    \[\iint_A (\nabla \times \vec{A}) \cdot d\vec{s} = \oint \vec{A} \cdot d\vec{l}\]
}

\section{The Electric Field}
\subsection{Coulomb's Law}
Initial observation:
$$\vec{F} \propto q_1 q_2$$
Vacuum Permittivity:
$$\varepsilon_0 = 8.854 \times 10^{-12}$$
Coulomb's Constant:
$$k = \frac{1}{4 \pi \varepsilon_0} = 9 \times 10^{-9}$$
\dfn{Coulomb's Law}
{
    For the force of a point charge, $q_2$, on another point charge, $q_1$:
    $$\vec{F}_{1 2} = k \frac{q_1 q_2}{r^2} \hat{a}_{1 2}$$
    For the net force of a finite number of point charges on a charge, $Q$:
    $$\vec{F}_\text{Net} = \sum_{i=1}^{N} k_i \frac{Q q_i}{r_i^2} \hat{r}$$
}

\nt{
    $k_i$ depends on material properties. When in a vacuum, $k_i = k$.
}

\ex{}{
Two point charges, \(q_1\) and \(q_2\) are spaced 2cm apart on the
x-axis. A third charge, \(q_3\) is placed between the first two with a
distance \(x_1\) between it and \(q_1\) and \(x_2\) between it and
\(q_2\) such that \(q_3\) is in static equilibrium.

Known: \[\vec{F}_{1 3} + \vec{F}_{2 3} = 0\] By Coulomb's Law:
\[\vec{F}_{1 3} = \frac{k_1 q_3 q_1}{r_{1 3}^2} \hat{z}\]
\[\vec{F}_{2 3} = -\frac{k_2 q_3 q_2}{r_{1 3}^2} \hat{z}\]
\[\therefore \vec{F}_{1 3} + \vec{F}_{2 3} = k q_3 \left( \frac{q_1}{r_{1 3}^2} - \frac{q_2}{r_{2 3}^2} \right)\hat{z} = 0\]
\[\therefore \frac{q_1}{r_{1 3}^2} - \frac{q_2}{r_{2 3}^2} = 0\]

Solve for \(r_{1 3}\): \[r_{1 3} = \pm r_{2 3}\sqrt{\frac{q_1}{q_2}}\]

Known: \[r_{1 3} + r_{2 3} = 2\] \[\therefore r_{2 3} = 2 - r_{1 3}\]

Plug into first equation:
\[r_{1 3} = \pm (2 - r_{1 3}) \sqrt{\frac{q_1}{q_2}}\]

Expand:
\[r_{1 3} = \pm \left(2 \sqrt{\frac{q_1}{q_2}} - r_{1 3}\sqrt{\frac{q_1}{q_2}} \right)\]
\[\therefore r_{1 3} \left(1 \pm \sqrt{\frac{q_1}{q_2}} \right) = \pm 2\sqrt{\frac{q_1}{q_2}}\]
\[\therefore r_{1 3} = \pm 2\sqrt{\frac{q_1}{q_2}} \left( 1 \pm \sqrt{\frac{q_1}{q_2}} \right)^{-1}\]
}

\subsection{Electric Field Intensity}
Consider a test charge, $Q_2$, at the point of measurement. The force this charge feels due to a point charge, $Q_1$, is given by Coulomb's law:
\[\vec{F}_{1 2} = \frac{Q_1 Q_2}{4 \pi \varepsilon_0 R^2} \hat{a}_{1 2}\]

\dfn{Electric Field Intensity}
{
    The electric field due to a point charge is defined as the force a test charge feels normalized by the magnitude of the test charge:
    $$\vec{E} = {\vec{F} \over Q} = {q \over 4 \pi \veps_0}\hat{r}$$
}
\noindent
The net electric field 
\[\vec{E}_{NET} = \sum_{i=0}^{N} \frac{k_i Q_i}{R_i^2} \hat{a}_{R_i}\]
Force due to electric field: \[\vec{F} = q \vec{E}\]
Always in the same direction as the electric field force.

\ex{Electric Field of a Dipole}{
At a point equidistant to each pole:
\[\lVert \vec{r}_1 \rVert = \lVert \vec{r_2} \rVert = r\]

By Coulomb's Law: \[\vec{E}_1 = \frac{kq}{r^2} \hat{r}_1\]
\[\vec{E}_2 = \frac{kq}{r^2} \hat{r}_2\]
\[\therefore \lVert \vec{E}_1 \rVert = \lVert \vec{E}_2 \rVert\]

In terms of the component distances: \[r^2 = a^2 + y^2\]
\[\therefore E = \frac{kq}{a^2 + y^2}\]

\[\vec{E}_{NET_y} = \vec{E}_{1_y} + \vec{E}_{2_y} = 2E\cos{\theta}\]

By definition: \[\cos(\theta) = \frac{a}{r}\]
\[\therefore \vec{E}_{NET_y} = \frac{2kq}{a^2 + y^2} \frac{a}{\sqrt{a^2 + y^2}}\hat{y}\]
\[\vec{E}_{NET_y} = 2 \frac{kqa}{(x^2 + y^2)^{3/2}} \hat{y}\]

If \(y \gg a\) (far field): \[\vec{E}_{NET} = 2 \frac{kqa}{y^3}\]

\textbf{Takeaway}: \[\vec{E}_{monopole} \propto \frac{1}{r^2}\]
\[\vec{E}_{dipole} \propto \frac{1}{r^3}\]
}

\dfn{Charge Density}
{
    Charge per unit $n$-dimensional volume.
    \begin{itemize}
        \item[$\lambda, \rho_l$] Linear charge density
        \item[$\sigma, \rho_s$] Surface charge density
        \item[$\rho, \rho_v$] Volume charge density
    \end{itemize}
}
\noindent
Given an $\vec{E}$-field intensity:
\[\vec{E} = \lim_{\Delta q \to 0} \frac{k \sum_i \Delta q_i}{\lVert \vec{r}_i \rVert ^2} \hat{r}_i = \int \frac{k}{\lVert \vec{r}_i \rVert ^2} dq\]
It's corresponding electric flux density, $\vec{D}$ is:
$$\vec{D} = \veps \vec{E}$$


\ex{}
{
A straight line segment of length \(L\) with uniform charge density
\(\lambda\) extends from the origin in the \(\hat{x}\) direction. Find
the strength of the electric field, \(\vec{E}\) at some arbitrary point,
\(p\) along the ray from the origin in the \(\hat{z}\) direction.

The distance along the line segment in the \(\hat{x}\) direction is
denoted as \(x\), and the distance from the origin to point \(p\) is
denoted as \(z\). The vector, \(\vec{r}\) has length
\(\sqrt{x^2 + z^2}\) and makes an angle \(\theta\) with the ray in the
\(-\hat{z}\) direction.

The contribution \(d\vec{E}\) to the total electric field, \(\vec{E}\),
at point \(p\) is defined as:
\[d\vec{E} = \frac{k dq}{\lVert \vec{r} \rVert ^2} \hat{r}\]

For a linear charge distribution: \[dq = \lambda dl\] The distance,
\(r\), to each \(x\) alond the line:
\[\lVert \vec{r} \rVert ^2 = x^2 + z^2\] The components of the
\(\vec{E}\)-field at point \(p\):
\[d\vec{E}_x = \lVert d\vec{E} \rVert \sin(\theta) \hat{x}\]
\[d\vec{E}_z = \lVert d\vec{E} \rVert \cos(\theta) \hat{z}\]
}
\section{The Magnetic Field}
\subsection{Biot-Savart Law}
The magnetic flux density, $d\vec{B}$, from an element of current carrying conductor, $d\vec{l}$ is:
\begin{enumerate}
    \item Proportional to the current, $I$
    \item Inversely proportonal to the square of the distance from the conductor
\end{enumerate}
The force given by the magnetic field is given by:
$$d\vec{F}_B = m d\vec{B}$$
Where:
\begin{itemize}
    \item[$m$] is the magnetic pole strength
\end{itemize}
The magnetic flux density, $d\vec{B}$, is given by:
$$d\vec{B} = {\mu_0 I d\vec{l} \over 4 \pi r^2} \times \hat{r}$$
Therefore, the total magnetic flux density, $\vec{B}$, is:
$$\vec{B} = {\mu_0 \over 4\pi} \int {I d\vec{l} \over r^2} \times \hat{r}$$

\ex{}
{
    A circular loop of current carrying wire with radius, $a$, exists in the xy-plane, centered at the origin. Find the total magnetic field strength at a point along the z-axis.

    $$\vec{B}_\text{Net} =  {\mu_0 I \over 4 \pi} \int {d\vec{l} \times \hat{r} \over r^2}$$

    For a circular loop:
    $$d\vec{l} = ad\vec{\varphi}$$
    The distance from a point on the z-axis to any point on the loop of wire is:
    $$r = \sqrt{a^2 + z^2}$$

    The distance vector from a point on the z-axis to a point on the loop of wire is:
    $$\vec{r}(\varphi) = a\hat{r} + z\hat{z}$$

    As a unit vector:
    $$\hat{r}(\varphi) = {a\hat{r} + z\hat{z} \over \sqrt{a^2 + z^2}}$$
    
    Evaluating the cross product:
    $$d\vec{l} \times \hat{r} = {1 \over \sqrt{a^2 + z^2}}
    \begin{vmatrix}
        \hat{r} & \hat{\varphi} & \hat{z} \\
        0 & ad\varphi & 0\\
        a & 0 & z
    \end{vmatrix} = {azd\varphi\hat{r} - a^2d\varphi\hat{z} \over \sqrt{a^2 + z^2}}$$
    
    Evaluating the integral:
    $$\vec{B}_\text{Net} = {\mu_0 I \over 4\pi} \int\limits_0^{2\pi} {a^2 \over (a^2 + z^2)^{3/2}}d\varphi$$
}   


\section{Gauss's Law for $\vec{E}$-fields}

\section{EMF}
Measured in \emph{volts}, electromotive force (EMF), is denoted by
\(\mathcal{E}\). The value for EMF is defined as:
\[\mathcal{E} = \oint \vec{E} \cdot d \vec{l} = -\frac{d}{dt} \int_s B_z(t) \cdot ds = -\frac{d}{dt}\psi_m\]

Where:

\[\psi_m = \int_s \vec{B} \cdot d\vec{s}\]

A perfectly conducting ring with radius, \(\rho_0\), centered on the
origin in the x-y plane.

The charge distribution: \[\rho = \rho_0 + \rho_0 \sin(\omega t)\]
\[\vec{B}(t) = B_0 \cos(\omega t)\hat{z}\]
\[\mathcal{E} = \oint \vec{E} \cdot d\vec{l} = \iint\limits_{\phi R} B_0 \cos(\omega t) dr d\phi\]

Where:

\(\varphi: [0, 2\pi]\)

\(R: [0, \rho(t)]\)

Therefore: \[\psi_m = (B_0 \cos(\omega t) \hat{z})(2\pi \rho(t))\]

\[\mathcal{E} = -\frac{d}{dt} B_0 2\pi \cos(\omega t)(\rho_0 + \rho_0\sin(\omega t))\]

\hypertarget{filling-in-some-gaps}{%
\subsubsection{Filling in some Gaps}\label{filling-in-some-gaps}}

\[\vec{F} = -\nabla \vec{u}\] Where: \(\vec{u}\) is potential.

\[\vec{E} = -\nabla \vec{v}\] Where: \(\vec{v}\) is electric potential.

\[W = \vec{F} \cdot \vec{d} = q\vec{E} \cdot \vec{d}\]

Work done by the \(\vec{E}\)-field on a charge will reduce the electric
potential:

\[-\Delta u = u_B - u_A = -\Delta W = -qEd\]

The total change is:

\[\Delta u = -q \int\limits_A^B \vec{E} \cdot d\vec{l}\]

\[\therefore \frac{\Delta u}{q} = \int\limits_A^B \vec{E} \cdot d\vec{l} = \Delta V\]

\[W = q \int \vec{E} \cdot d\vec{l}\]

\[V(r) = \frac{kq}{r}\]

For \(N\) discrete charges,
\[V = \sum\limits_{i=1}^{N} \frac{k q_i}{r_i}\]

In cartesian coordinates:

\[\vec{F} = F_x\hat{i} + F_y\hat{j} + F_z\hat{z}\]

Where:

\(F_x = \frac{dw}{dx}\)

\(F_y = \frac{dw}{dy}\)

\(F_z = \frac{dw}{dz}\)

Therefore:
\[\vec{F} = \frac{\partial w}{\partial x}\hat{i} + \frac{\partial w}{\partial y}\hat{j} + \frac{\partial w}{\partial z}\hat{k} = \nabla \vec{w}\]

\[q\vec{E} = \nabla (-\vec{u})\]

\[\vec{F} = -\nabla \vec{u}\]

\[\vec{E} = -\nabla \left( \frac{\vec{u}}{q} \right) = -\nabla \vec{V}\]

\hypertarget{electric-flux-density}{%
\paragraph{Electric Flux Density}\label{electric-flux-density}}

\[\vec{D} = \varepsilon \vec{E}\] Where
\(\varepsilon = \varepsilon_r \varepsilon_0\) (permittivity).

\hypertarget{magnetic-flux-density}{%
\paragraph{Magnetic Flux Density}\label{magnetic-flux-density}}

\[\vec{B} = \mu\vec{H}\] Where \(\mu = \mu_r \mu_0\) (permeability).

\hypertarget{amperes-law}{%
\subsubsection{Ampere's Law}\label{amperes-law}}

The total current crossing an area, \(s\), that is enclosed by the
contour \(C\): \[\oint_C \frac{\vec{B}}{\mu_0} \cdot d\vec{l}\]

The total current is the sum of the current due to charge flow and the
current due to the time rate of change of the electric flux crossing an
area, \(s\). Maxwell was able to unify electricity and magnetism by
adding the current due to the time rate of change of electric flux.
\[\oint_C \vec{H} \cdot d\vec{l} = \int_S \vec{J} \cdot d\vec{s} + \frac{d}{dt}\int \varepsilon_0\vec{E} \cdot d\vec{s}\]

\hypertarget{simplified-amperes-law}{%
\paragraph{Simplified Ampere's Law}\label{simplified-amperes-law}}

\[\oint_C \vec{H} \cdot d\vec{l} = I = \int_s \vec{J} \cdot d\vec{s}\]

The charge density, \(J = \rho v\), has units
\(\left[ \frac{A}{m^2} \right]\).

\hypertarget{example}{%
\paragraph{Example}\label{example}}

A current, \(I\), in an infinitely long cylindrical wire with radius,
\(R\). \[\int \vec{B} \cdot d\vec{l} = \mu_0 I_{enc}\]

Measuring the magnetic field at some distance, \(r\), from the center of
the conductor: \[B\int dl = \mu_0 I\] Where \(\int dl\) is the
circumfrece of measurement. \[B(2\pi r) = \mu_0 I\]
\[B_{out} = \frac{\mu_0 I}{2\pi r} \hat{\varphi}\] Inside the wire:
\[\int \vec{B} \cdot d\vec{l} = \mu_0 I\]
\[B\int dl = \frac{\mu_0 I r^2}{R^2} = 2\pi rB\]
\[B = \frac{\mu_0 I}{2\pi R^2} r\]
\[\vec{B} = \frac{\mu_0 I}{2\pi R^2}r \hat{\varphi}\]

\hypertarget{coulombs-law-1}{%
\subsubsection{Coulomb's Law}\label{coulombs-law-1}}

The total displacement flux of charge:
\[\int_s \varepsilon_0 \vec{E} \cdot d\vec{s}\]

The total current (charge with respect to time):
\[I = \frac{d}{dt} \int_s \varepsilon_0 \vec{E} \cdot d\vec{s}\]

\hypertarget{faradays-law}{%
\subsubsection{Faraday's Law}\label{faradays-law}}

Work done in moving a unit positive test charge around a closed path,
\(C\): \[\oint_C \vec{E} \cdot d\vec{l}\]

Magnetic force on a poving charge and is directed perpendicular to both
the direction of the motion of the charge and the magnetic field.
\[\oint_C \vec{B} \cdot d\vec{l}\]

\hypertarget{solenoid-ideal}{%
\subsubsection{Solenoid (Ideal)}\label{solenoid-ideal}}

For an ideal solenoid with constant current, \(I\), assume uniform
\(\vec{B}\) inside, \(\vec{B} = 0\) outside, and infinite length.

By Ampere's Law: \[\oint \vec{B} \cdot d\vec{l} = \mu_0 I_{enc}\]

For a square loop with one side in the solenoid, and it's parallel side
outside the loop:
\[\oint \vec{B} \cdot d\vec{l} = \int_1 + \int_2 + \int_3 + \int_4\]

Sides 2 and 4 are parallel, and side 3 is outside the solenoid, so:
\[\oint \vec{B} \cdot d\vec{l} = \int_1 = Bl\]

Back to Ampere's Law: \[Bl = \mu_0 I N\]
\[\therefore B = \frac{\mu_0 I N}{l} = \mu_0 I n\] Where:

\(N\) is the total number of windings,

\(l\) is the sidelength of the Amperian loop,

\(n\) is the number of windings per unit length \(\frac{N}{l}\)

\hypertarget{toroid-ideal}{%
\subsubsection{Toroid (Ideal)}\label{toroid-ideal}}

From a symmetric \(\vec{B}\)-field, lines form concentric circles inside
the toroid. For an ideal toroid, assume \(\vec{B} = 0\) outside, and
Ampere's law inside.

\[\oint \vec{B} \cdot d\vec{l} = \mu_0 I_{enc}\] For some circular
Amperian loop inside the toroid: \[\vec{B} = B\hat{\varphi}\]
\[d\vec{l} = 2\pi r \vec{\varphi}\] \[B(2\pi r) = \mu_0 N I\]
\[\therefore B = \frac{\mu_0 N I}{2\pi r}\]

\chapter{Maxwell's Equations in Differential Form}
\[\int \vec{E} \cdot d\vec{s} = \frac{Q_{enc}}{\varepsilon_0} \xleftrightarrow{\text{divergence}} \nabla \cdot \vec{E} = \frac{\rho}{\varepsilon_0}\]
\[\int \vec{B} \cdot d\vec{s} = 0 \xleftrightarrow{} \nabla \cdot \vec{B} = 0\]
\[\int \vec{E} \cdot d\vec{l} = -\frac{d}{dt}\vec{B} \xleftrightarrow{\text{stokes}} \nabla \times \vec{E} = -\frac{d}{dt}\vec{B}\]
\[\int \vec{B} \cdot d\vec{l} = \mu_0\left( \vec{J} + \varepsilon_0 \frac{d\vec{E}}{dt}\right) \xleftrightarrow{} \nabla \times \vec{B} = \mu_0 J + \mu_0 \varepsilon_0 \frac{\partial \vec{E}}{\partial t}\]

Before Maxwell (only true for magnetostatics):
\[\nabla \times \vec{B} = \mu_0\vec{J}\]
\[\nabla \cdot (\nabla \times \vec{B}) = \mu_0(\nabla \cdot \vec{J})\]
\[\nabla \cdot \vec{J} = 0\]

For changing magnetic fields:
\[\nabla \cdot \vec{J} = -\frac{\partial}{\partial t} \rho_v\]
\[\nabla \cdot \vec{J} + \frac{\partial}{\partial t} \rho_v = 0\]

\hypertarget{example-2.1}{%
\subsubsection{Example 2.1}\label{example-2.1}}

\[\vec{J} = e^{-x^2}\hat{x}\] Find the time rate of change of charge
densisty at \(x=1\):
\[\nabla \cdot \vec{J} = -\frac{\partial}{\partial t} \rho_v\]
\[\frac{\partial \rho}{\partial t} = -\nabla \cdot \vec{J} = -\frac{d}{dx}e^{-x^2} = 2xe^{-x^2}\]
\[\therefore 2 e^{-1}\]

\hypertarget{example-2.2}{%
\subsubsection{Example 2.2}\label{example-2.2}}

For some spherical current density:
\[\vec{J} = \frac{J_0 e^{-t/\tau}}{\rho}\hat{\rho}\] Find the total
current that leaves the surface of radius, \(t = \tau\):
\[I = \int \vec{J} \cdot d\vec{s} = 4\pi a^2 \left(\frac{J_0 e^{-t/\tau}}{a}\right)\]
\[I = 4\pi a J_0 e^{-1}\]

Find \(\rho_v(\rho, t)\):
\[\nabla \cdot \vec{J} = -\frac{\partial \rho}{\partial t} = \frac{1}{\rho^2} \frac{\partial}{\partial \rho}(\rho^2 J)\]
Plug in for \(J\):
\[\nabla \cdot \vec{J} = \frac{1}{\rho^2} \frac{\partial}{\partial \rho}\left(\rho^2 \frac{J_0 e^{-t/\tau}}{\rho}\right) = \frac{J_0}{\rho^2} e^{-t/\tau} = -\frac{\partial}{\partial t} \rho_v\]
Solve for \(\rho_v\):
\[\rho_v = \int -\frac{J_0}{\rho^2}e^{-t/\tau} dt\]
\[\rho_v = \frac{J_0}{\rho^2} e^{-t/\tau} \tau\]

\hypertarget{wave-propagation}{%
\subsection{Wave Propagation}\label{wave-propagation}}

\[\nabla \times \vec{E} = -\frac{\partial}{\partial t} \vec{B}\]
\[\nabla \times \vec{B} = \mu_0 (\vec{J} + \varepsilon_0 \frac{\partial}{\partial t} \vec{E})\]
\[\nabla \cdot \vec{E} = \frac{\rho_v}{\varepsilon_0}\]
\[\nabla \cdot \vec{B} = 0\]

Take the curl of the first equation:
\[\nabla \times (\nabla \times \vec{E}) = -\frac{\partial}{\partial t}(\nabla \times \vec{B})\]
\[\nabla (\nabla \cdot \vec{E}) - \nabla^2\vec{E} = -\frac{\partial}{\partial t}(\nabla \times \vec{B})\]

Substitute the second equation into the one directly above:
\[\nabla(\nabla \cdot \vec{E}) - \nabla^2\vec{E} = -\frac{\partial}{\partial t} \left( \mu_0 \vec{J} + \mu_0\varepsilon_0 \frac{\partial}{\partial t}\vec{E} \right)\]

\hypertarget{homogenious-vector-wave-for-vece-fields}{%
\paragraph{\texorpdfstring{Homogenious vector wave for
\(\vec{E}\)-fields}{Homogenious vector wave for \textbackslash vec\{E\}-fields}}\label{homogenious-vector-wave-for-vece-fields}}

Lets say we are considering wave propagation in a source free region
(\(\rho_v =0\)).
\[\nabla \cdot \vec{E} = \frac{\rho_v}{\varepsilon_0} =0\]
\[\vec{J} = -\frac{\partial}{\partial t} \rho_v = 0\]

Now we have:
\[-\nabla^2\vec{E} = -\mu_0\varepsilon_0 \frac{\partial}{\partial t} \vec{E}\]
\[\therefore \nabla^2\vec{E}-\mu_0\varepsilon_0 \frac{\partial}{\partial t}\vec{E} = 0\]

\hypertarget{homogeneous-vector-wave-for-vecb-fields}{%
\paragraph{\texorpdfstring{Homogeneous vector wave for
\(\vec{B}\)-fields}{Homogeneous vector wave for \textbackslash vec\{B\}-fields}}\label{homogeneous-vector-wave-for-vecb-fields}}

\[\nabla^2\vec{B} - \mu_0\varepsilon_0 \frac{\partial^2}{\partial t^2}\vec{B} = 0\]

\hypertarget{phasor-representations}{%
\subsubsection{Phasor representations}\label{phasor-representations}}

In general, all fields and their sources vary as a function of position
and time. If the time variations are sinusoidal, with angular frequency,
\(\omega\), then each of their quantities can be represented by a time
independent phasor.

\[\vec{E}(x,y,z,t) = \Re\{\vec{E}(x,y,z)e^{j \omega t}\}\]
\[\vec{E}(r,t) = \Re\{\hat{E}(r) e^{j \omega t}\}\]
\[\vec{B}(r,t) = \Re\{\hat{B}(r) e^{j \omega t}\}\]

\(\hat{E}\) and \(\hat{B}\) are the complex time variations in vector
form. (\(\hat{E} = \hat{\vec{E}}\)) .

If \(\hat{E}(r) = E_0 e^{j \theta}\),
\[\vec{E}(r, t) = \Re\{E_0 e^{j \theta} e^{j \omega t}\} = E_0\cos(\omega t + \theta)\]

Consider a plane wave in the x-direction only (\(E_y = E_z = 0\)), and
does ont vary the x or y direction
(\(\frac{\partial}{\partial x}\hat{E} = \frac{\partial}{\partial y}\hat{E} = 0\)).
Assume free space for propagation (\(\hat{J} = \hat{\rho}_v = 0\)).

\[\nabla \times \vec{E} = \begin{vmatrix} \hat{x} & \hat{y} & \hat{z} \\ \frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\ \hat{E}_x & \hat{E}_y & \hat{E}_z \end{vmatrix} = -j\omega (\hat{B}_x\hat{x} + \hat{B}_y \hat{y} + \hat{B}_z \hat{z}\]
\[\therefore \begin{Bmatrix} -\frac{\partial}{\partial z}\hat{E} = -j\omega\hat{B}_x \\ \frac{\partial}{\partial z}\hat{E} = -j\omega\hat{B}_y \\ 0 = -j\omega\hat{B}_z \end{Bmatrix}\]

Similarly, Ampere's Law:
\[\begin{Bmatrix} -\frac{\partial \hat{B}_y}{\partial z} = j\omega\varepsilon_0\mu_0\hat{E}_x \\ \frac{\partial \hat{B}_x}{\partial z} = j\omega\varepsilon_0\mu_0\hat{E}_y \\ 0 = j\omega\varepsilon_0\mu_0\hat{E}_z\end{Bmatrix}\]

Therefore, \(B_x\) and \(E_y\) are related to each other. \(B_x\) acts
as the source for generating \(E_y\), and \(E_y\) acts as the source for
generating \(B_x\). Solving for \(\hat{E}_x\) and \(\hat{B}_y\):
\[\frac{\partial^2 \hat{E}_x}{\partial z^2} = -j\omega\frac{\partial \hat{B}_y}{\partial z} = -\omega^2\mu_0\varepsilon_0\hat{E}_x\]
\[\therefore \frac{\partial^2}{\partial z^2}\hat{E}_x + \mu_0\varepsilon_0\omega^2\hat{E}_x = 0\]

The general solution:
\[\hat{E}_x = \hat{C}_1 e^{-j \beta_0 z} + \hat{C}_2 e^{j \beta_0 z}\]
Where \(\hat{C}_1\) and \(\hat{C}_2\) are complex.

\[\therefore \hat{E}_x = \hat{E}_m^+ e^{-j \beta_0 z} + \hat{E}_m^- e^{j \beta_0 z}\]
Where \(E_m^+\) and \(E_m^-\) are wave amplitudes (volts per meter).

\hypertarget{the-phase-constant}{%
\subparagraph{The phase constant:}\label{the-phase-constant}}

\[\beta_0 = \omega \sqrt{\mu_0 \varepsilon_0} = \frac{2\pi}{\lambda} = \frac{2\pi f}{C}\]

\hypertarget{real-time-form-of-the-solution}{%
\paragraph{Real time form of the
solution:}\label{real-time-form-of-the-solution}}

\[E_x(z,t) = \Re\{\hat{E}_x e^{j \omega t}\} = \Re\{E_m^+ e^{j(\omega t - \beta_0 z)} + E_m^- e^{j(\omega t + \beta_0 z)}\}\]
\[\therefore E_x(z,t) = E_m^+ \cos(\omega t - \beta_0 z) + E_m^- \cos(\omega t + \beta_0  z)\]

If \(E_m^+ = E_m^-\), the magnitude and direction is \(E_0\).
\[\therefore E_x(z,t) = E_0\cos(\omega t \pm \beta_0 z)\] Where:

\(\omega = 2\pi f\)

\(v_0\) is the phase velocity

\hypertarget{the-phase-velocity}{%
\subparagraph{The phase velocity}\label{the-phase-velocity}}

\[v_0 = \frac{1}{\sqrt{\mu \varepsilon}}\] In a vacuum: \[v_0 = c\]

\hypertarget{also}{%
\paragraph{Also}\label{also}}

\[\hat{B}_y = \frac{\hat{E}_x}{c}\]

Common \(\vec{E}\) and \(\vec{B}\) field ratio is:
\[\mu_0 \hat{H}_y = \frac{\hat{E}_x}{c}\]
\[\therefore \frac{\hat{E}_x}{\hat{H}_y} = \mu_0 c = \frac{\mu_0}{\sqrt{\mu_0 \varepsilon_0}} = \sqrt{\frac{\mu_0}{\varepsilon_0}} = \eta_0 \approx 120\pi = 377\Omega\]

Where \(\eta_0\) is the intrinsic wave impedance.

\[\therefore \hat{E}_x = \hat{H}_y \eta_0\]
\[\therefore \hat{H}_y = \frac{\hat{E}_x}{\eta_0}\]

Therefore, both \(\vec{H}\) and \(\vec{E}\) fields are in phase.

In general: \[\hat{H} = \frac{\hat{k}}{\eta_0} \times \hat{E}\]
\[\hat{E} = -\eta_0 \hat{k} \times \hat{H}\]

\hypertarget{example-2.3}{%
\subsubsection{Example 2.3}\label{example-2.3}}

\[\vec{E} = 50\cos(10^8t + \beta_0 x)\hat{y} \text{[v/m]}\]
\[E_y = E_0\cos(\omega t + \beta x)\] \(E_y\) propagates in the
\(-\hat{x}\) direction.
\[\beta_0 = \omega \sqrt{\mu_0 \varepsilon_0} = \frac{\omega}{c} = \frac{10^8}{3 \times 10^8} = \frac{1}{3}\]
What is the time it takes to travel a distance of \(\frac{\lambda}{2}\)?
\[\omega = 2\pi f = \frac{2\pi}{T}\] \[T = \frac{2\pi}{\omega}\]
\[\therefore t_{\lambda/2} = \frac{T}{2} = \frac{\pi}{\omega} = \frac{\pi}{10^8} \approx 31.42\text{[ns]}\]

The refractive index of a medium is given by the ratio of \(c\) and
\(v_p\): \[c = \frac{1}{\sqrt{\mu_0 \varepsilon_0}}\]
\[v_p = \frac{1}{\sqrt{\mu \varepsilon}}\]
\[n = \frac{c}{v_p} = \sqrt{\frac{\mu \varepsilon}{\mu_0 \varepsilon_0}} = \sqrt{\mu_r \varepsilon_r}\]

For a non-magnetic material: \[\mu_r \approx 1\]
\[\therefore n = \sqrt{\varepsilon_r}\]

\hypertarget{polarization}{%
\subsection{Polarization}\label{polarization}}

\[\begin{rcases}
\nabla \cdot \vec{E} = {\rho \over \varepsilon_0} \\
\nabla \cdot \vec{B} = 0
\end{rcases} \text{Gauss}\]

\[\begin{rcases}
\nabla \times \vec{E} = -{\partial \over \partial t} \vec{B}
\end{rcases} \text{Faraday}\]

\[\begin{rcases}
\nabla \times B = \mu_0 \vec{J} + \mu_0 \varepsilon_0{\partial \over \partial t}\vec{E}
\end{rcases} \text{Ampere}\]

Polarization of a uniform plane wave describes the shape and olcus of
the tip of the \(\vec{E}\)-field vector in the plane orthoganal to the
direction of propagation. There are two pairs of \(\vec{E}\) and
\(\vec{B}\) fields (\(\hat{E}_x\), \(\hat{H}_y\)) and (\(\hat{E}_y\),
\(\hat{H}_x\)). When both pairs are present, we can evaluate
polarization of plane waves. The \(\vec{E}\)-field has components in the
\(\hat{x}\) and \(\hat{y}\) directions and travels in \(\hat{z}\).

\[\hat{E} = (\hat{E}_x \hat{x} + \hat{E}_y \hat{y})e^{-j \beta z}\]
\[\hat{E}_x = \lvert \hat{E}_{x_0} \rvert e^{-j \beta a}\]
\[\hat{E}_y = \lvert \hat{E}_{y_0} \rvert e^{-j \beta b}\]

\hypertarget{locus}{%
\paragraph{Locus}\label{locus}}

The shape the tip of the \(\vec{E}\)-field vector traces out while in
motion.

\hypertarget{phase}{%
\paragraph{Phase}\label{phase}}

Typically defined relative to a reference point such as \(z=0\) or
\(t=0\) or some combination.

\hypertarget{polarization-characteristics}{%
\subsubsection{Polarization
Characteristics}\label{polarization-characteristics}}

\hypertarget{linear-polarization}{%
\paragraph{Linear polarization}\label{linear-polarization}}

\(\hat{E}_x\) and \(\hat{E}_y\) have the same phase angle: \(a = b\), so
the x and y components of the \(\vec{E}\)-field will be in phase.

\[\hat{E} = (\lvert \hat{E}_x \rvert \hat{x} + \lvert \hat{E}_y \rvert \hat{y} ) e^{-j( \beta z - a)}\]

In real time:
\[\hat{E} = (\lvert \hat{E}_x \rvert \hat{x} + \lvert \hat{E}_y \rvert \hat{y} ) \cos(\omega t - \beta z + a)\]

As the wave continues to propagate in the \(\hat{z}\) direction, the
\(\vec{E}\)-field vector maintains its direction with angle, \(\theta\),
with respect to the y-axis.
\[\tan(\theta) = {\lvert \hat{E}_x \rvert \over \vert \hat{E}_y \rvert}\]

When \(z=0\), the \(\vec{E}\) field is given by:
\[\vec{E}(0, t) = (\lvert \hat{E}_x \rvert \hat{x} + \lvert \hat{E}_y \rvert \hat{y} ) \cos(\omega t + a)\]
\[\vec{E}(0, 0) = (\lvert \hat{E}_x \rvert \hat{x} + \lvert \hat{E}_y \rvert \hat{y} ) \cos(a)\]

\hypertarget{elliptical-polarization}{%
\paragraph{Elliptical Polarization}\label{elliptical-polarization}}

\(\hat{E}_x\) and \(\hat{E}_y\) have different phase angles. \(\vec{E}\)
is no longer in one plate.

\[\hat{E} = \hat{x} \lvert \hat{E}_x \rvert e^{j (a - \beta z)} + \hat{y} \lvert \hat{E}_y \rvert e^{j(b - \beta z)}\]

Where:

\(E_x = \lvert \hat{E}_x \rvert \cos(\omega t - a + \beta z)\)

\(E_y = \lvert \hat{E}_y \rvert \cos(\omega t - b + \beta z)\)

If \(a=0\) and \(b = {\pi \over 2}\):
\[\vec{E}_x(z,t) = \lvert \hat{E}_x \rvert \cos(\omega t - a + \beta z)\]
\[\vec{E}_y(z,t) = \lvert \hat{E}_y \rvert \cos(\omega t - b + \beta z)\]

\hypertarget{circular-polarization}{%
\paragraph{Circular Polarization}\label{circular-polarization}}

\(\hat{E}_x\) and \(\hat{E}_y\) have the same magnitude with a phase
angle difference of \({\pi \over 2}\).

\hypertarget{example}{%
\subsubsection{Example}\label{example}}

Determine the real-valued \(\vec{E}\)-field.
\[\hat{E}(z) = -3j\hat{x} e^{-j\beta z}\]
\[\vec{E}(z, t) = -3j\hat{x} e^{-j \beta z} e^{j\omega t}\]
\[3 \hat{x} e^{-j \beta z} e^{j \omega t} e^{-\pi \over 2}\]
\[3 \cos\left(\omega t- \beta z - {\pi \over 2}\right)\]

\hypertarget{example-1}{%
\subsubsection{Example}\label{example-1}}

What are \(E_x\) and \(E_y\)
\[\hat{E}(z) = (3\hat{x} + 4\hat{y})e^{j\beta z}\]
\[\vec{E}(z, t) = (3\hat{x} + 4\hat{y})e^{j\beta z}e^{j\omega t}\]
\[E_x = 3\cos(\omega t + \beta z)\] \[E_y = 4\cos(\omega t + \beta z)\]

\hypertarget{example-2}{%
\subsubsection{Example}\label{example-2}}

\[\hat{E}(z) = (-4\hat{x} + 3\hat{y})e^{-j\beta z}\]
\[\hat{E}(z, t) = (-4\hat{x} + 3\hat{y})e^{-j\beta z}e^{j\omega t}\]
\[E_x = 4\cos(\omega t - \beta z + \pi)\]
\[E_y = 3\cos(\omega t - \beta z)\]

\hypertarget{non-sinusoidal-waves}{%
\subsection{Non-Sinusoidal Waves}\label{non-sinusoidal-waves}}

Analytical solution of a 1-D traveling wave.
\[{\partial^2 \over \partial z^2}\vec{E} - {1\over c^2}{\partial^2 \over \partial t^2}\vec{E} = 0\]

\hypertarget{dalemberts-solution}{%
\subsubsection{D'Alemberts Solution}\label{dalemberts-solution}}

\[\vec{E}(z, t) = E(z - ct) + E'(z + ct)\]

Show that the function, \(F(z - ct) = F_0 e^{-(z+ct)^2}\) is a solution
of the wave equation.

Let \(\gamma = z - ct\), and \({\partial \gamma \over \partial z} = 1\):
\[F(z-ct) = F_0 e^{-\gamma^2}\] \[F'(z + ct) = 0\]
\[{\partial F \over \partial z} = {\partial F \over \partial \gamma} {\partial \gamma \over \partial z} = F_0 e^{-\gamma^2}(-2\gamma)\]
\[{\partial^2 F \over \partial z^2} = {\partial \over \partial z}\left({\partial F \over \partial \gamma}{\partial \gamma \over \partial z}\right)\]
\[G = \left({\partial F \over \partial \gamma}{\partial \gamma \over \partial z}\right)\]

Don't forget chain rule:
\[{\partial G \over \partial \gamma}{\partial \gamma \over \partial z} = {\partial \over \partial z}\left({\partial F \over \partial \gamma}{\partial \gamma \over \partial z}\right){\partial \gamma \over \partial z}\]

\[{\partial \over \partial \gamma} - 2\gamma F_0 e^{-\gamma^2} = -2F_0 {\partial \over \partial \gamma} \gamma e^{-\gamma^2}\]

By product rule:
\[-2F_0 (\gamma (-2\gamma e^{-\gamma^2}) + e^{-\gamma^2})\]

\[F_0 (4\gamma^2 e^{-\gamma^2} - 2e^{-\gamma^2}) = F_0(-2 + 4\gamma^2)e^{-\gamma^2}\]
\[={\partial^2 \over \partial \gamma^2}F \left({\partial \gamma \over \partial z}\right)^2\]
\[\therefore {\partial^2 \over \partial t^2}F = {\partial^2 F \over \partial \gamma^2} \left({\partial \gamma \over \partial t}\right)^2 = F_0(-2 + 4\gamma^2)e^{-\gamma^2}(C^2)\]

This solution satisfies:
\[{\partial^2 \over \partial z^2}\vec{E} - {1\over c^2}{\partial^2 \over \partial t^2}\vec{E} = 0\]


\chapter{Maxwell's Equations in Materials}
\rvw{Maxwell's Equations in Differential Form}
{
    Gauss's Law for Electric Fields
    $$\nabla \cdot \vec{E} = {\rho \over \veps_0}$$

    Gauss's Law for Magnetic Fields
    $$\nabla \cdot \vec{B} = 0$$

    Farraday's Law
    $$\nabla \times \vec{E} = -\del{}{t}\vec{B}$$

    Ampere's Law
    $$\nabla \times \vec{B} = -\mu_0(\vec{J} + \veps_0 \del{}{t} \vec{E})$$
}

\subsection{Derivation of Ohm's Law}
To drive current, a force must be applied to the charge carriers.
$$\vec{J} \propto \vec{f}$$
Where:\\
\indent$\vec{f}$ is the force per unit charge.

$$\vec{J} = \sigma \vec{f}$$
Where:\\
\indent$\sigma$ is the conductivity of a material.
\\
\\
For electromagnetic force:
$$\vec{F}_E = q \vec{E}$$
$$\vec{F}_M = q \vec{v} \times \vec{B}$$
Combining yields the total force per unit charge:
$$\vec{f} = \vec{E} + \vec{v} \times \vec{B}$$

\dfn{Ohm's Law}
{
    The exact form of Ohm's Law can be written as:
    $$\vec{J} = \sigma\left(\vec{E} + \vec{v} \times \vec{B}\right)$$

    In most cases, $\vec{v}$ is very small, so we get
    $$\vec{J} = \sigma \vec{E}$$
}

    At the macroscopic scale, the conductivity of a material is given by:
    $$\sigma = {n e^2 \tau_c \over m}$$
    Where:\\
    $n$ is the number of electrons per unit volume\\
    $e$ is the charge of the electron\\
    $m$ is the mass of the electron\\
    $\tau_c$ is the mean free time (average time between collisions)

\section{Dielectric Materials and Polarization}

\ex{}{Consider an electron cloud with constant charge density, $\rho$, and radius, $a$, the total charge in the electron cloud is $-q$.

$$\rho = {-q \over {4\over3} \pi r^3} = -{3q \over 4 \pi a^3}$$

Find the $\vec{E}$-field inside:
$$\oint_s \vec{E} \cdot d\vec{s} = {q_{enc} \over \veps_0} = {1\over \veps_0}\int_V \rho d\tau$$

Integrating yields:
$$E(4\pi r^2) = {1\over \veps_0} \rho {4\over3} \pi r^3$$

Solve for $E$:
$$E = {\rho r \over 3 \veps_0}$$

In terms of the total charge, $-q$:
$$E = - {qr \over 4 \pi \veps_0 a^3}$$

Since the $\vec{E}$-field is a radial vector:
$$\vec{E} = -{qr \over 4 \pi \veps_0 a^3} \hat{r}$$ 
}

\ex{}{
When an external field is applied, suppose that the nucleus moves a distance, $d$, with respect to the center of the cloud.

The force exerted on the nucleus by the $e^-$ cloud is:
$$\vec{F} = q \vec{E}$$

Since the system is in equilibrium:
$$\vec{F}_\text{cloud} + \vec{F}_\text{ext} = 0$$
$$q \vec{E}_\text{ext} = - {q^2 \vec{d} \over 4 \pi \veps_0 a^3} = -k {q^2 \vec{d} \over a^3}$$

Solve for the displacement, $\vec{d}$:
$$\vec{d} = {4 \pi \veps_0a^3 \vec{E}_\text{ext} \over q}$$
}

This displacement is a measure of the seperation of the centers of positive and negative charge. Since they are no longer concentric, there now exists a dipole.

\dfn{The Dipole Moment}{
The dipole moment induced by $\vec{E}_\text{ext}$ is:
$$\vec{p} = q \vec{d} = 4 \pi \veps_0 a^3 \vec{E}_\text{ext}$$
}

Seperating two point charges, one with $+q$ and the other with $-q$, causes the system to be polarized. The dipole moment, $\vec{p}$, is a measure of this polarity.

\dfn{The Atomic Polarizability}{
    The atomic polarizability, $\alpha$, is given by:
    $$\alpha = 4 \pi \veps_0 a^3$$

    It simplifies the dipole moment, yielding:
    $$\vec{p} = \alpha \vec{E}_\text{ext}$$
}

For a dielectric material containing many atoms with equal charge, a much larger polarization is created. The total polarization of the dielectric is simply the sum of the polarizations of the atoms. This can be computed by computing a volume integral over the volumetric polarization denstity, $\vec{P}$.

\dfn{Polarization}
{
    The total polarization, $\vec{P}$, is the ratio of dipole moments to the volume.
    $$\vec{p} = \int_V \vec{P} d\tau$$
}

\begin{claim}
For a linear dielectric material, the volumetric polarization density and the electric field are proportional.
\end{claim}

$$\vec{P} = \veps_0 \chi_e \vec{E}$$

Where $\chi_e$ is the susceptability of the dielectric.

The electric field inside the dielectric is given by:
$$\vec{E}_\text{local} = \vec{E}_\text{ext} + \vec{E}_p$$

$${\vec{D} \over \veps} = {\vec{D} \over \veps_0} - {\vec{P} \over \veps_0}$$
$$\vec{P} = \vec{D} - {\veps_0 \over \veps} \vec{D}$$
$$\vec{P} = \vec{D}\left(1 - {\veps_0 \over \veps}\right) = \vec{D}\left(1 - {1\over\veps_r}\right) = \veps\vec{E}\left({\veps_r - 1 \over \veps_r}\right)$$
$$\vec{P} = \veps_0 \vec{E}(\veps_r - 1)$$

If
$$\vec{P} = \veps_0 \chi_e \vec{E}$$
$$\veps_r = 1 + \chi_e = {\veps \over \veps_0}$$

Then
$$\veps = \veps_0(1 + \chi_e)$$
$$\vec{D} = \veps \vec{E} = \veps_0(1 + \chi_e) \vec{E}= \veps_0 \vec{E} + \veps_0 \chi_e \vec{E}$$
$$\therefore \vec{D} = \veps_0\vec{E} + \vec{P}$$

\subsection{Polarization Current}
Consider a small element of a surface $d\vec{a}$ inside the dielectric under the influence of an $\vec{E}$-field. An average separation, $s$, is produced in the moluecules.
\\
\\
Assumptions:
\begin{itemize}
    \item The negative charges are fixed in space while the positive charges move a distance, $s$.
    \item The total number of positive charges, $dq$, that crosses $d\vec{a}$ is equal to total positive charge in the box.

    \item Voume of this parallel pipe is $d\tau = \vec{s} \cdot d\vec{a}$.
\end{itemize}
$$dQ = N \cdot q \cdot \vec{s} \cdot d\vec{a}$$
Where:
\begin{itemize}
    \item[$N$] is the ratio of moles per unit volume.
    \item[$s$] is the length.
    \item[$d\vec{a}$] is the ratio of area per unit length.
\end{itemize}

$$N\vec{p} = \vec{P}$$
$$dQ = \vec{P} \cdot d\vec{a}$$

The net charge, $dQ$, that flows out of a volume $d\tau$ is the same as across the element, $d\vec{a}$. This total charge is given by:
$$Q = \int_s \vec{P} \cdot d\vec{a}$$
\dfn{Surface Charge Density}{
    $$\sigma_p = {dQ \over da} = \vec{P} \cdot \hat{n}$$

    Where:
    \begin{itemize}
        \item[$\hat{n}$] is the surface normal vector.
    \end{itemize}
}
A dielectric is electrically neutral, so the net charge remaining in the volume must be $-Q$.
$$\int \rho_p d\tau = -\int (\nabla \cdot \vec{P})d\tau$$
$$\therefore \rho_p = -\nabla \cdot \vec{P}$$

\ex{}
{
    A sphere of radius, $r$, carries some polarization, $\vec{P}(r) = k\vec{r}$. Where $k$ is a constant. Find $\rho_p$ and $\sigma_p$.

    $$\rho_p = -\nabla \cdot \vec{p} = -{1\over r^2}\del{}{r}r^2 (k\vec{r})$$
    $$= -{1\over r^2} 3r^2 k = -3k$$

    $$\sigma_p = \vec{P} \cdot \hat{r} = k \vec{r} \cdot \hat{r} = k\| \vec{r} \|$$
}

\subsection{Displacement of Polarization Charges}
Displacement of polarization charges in the presence of an $\vec{E}$-field that is a function of time and gives rise to displacement current.

For any volume, $d\tau$, the rate at which plarization chargesflow out through $s$ must equal the rate of decrease of polarization charge.

$$\int_s \vec{J}_p \cdot d\vec{p} = -\del{}{t} \int \rho_p d\tau$$
$$\vec{J}_p = \del{\vec{P}}{t}$$

$$\vec{E}_\text{surface} = {1\over 4\pi\veps_0} {4\pi R^2 \over r^2} \sigma_p \hat{r} = {k R^3 \over \veps_0 r^2} \hat{r}$$

$$\vec{E}_\text{volume} = {1\over 4\pi\veps_0} {4\over3} {\pi R^2 \over r^2} \rho_p \hat{r} = - {kR^3 \over \veps_0 r^2} \hat{r}$$

\ex{}{
    The electric field:
    $$\vec{E} = (0.1)\cos(2\pi \times 10^6 t) \hat{x} \text{ [V/m]}$$
    Is applied to a cross section area of 1m$^2$. Assume $\veps_r = 81$. Find the polarization current density across the material.

    $$\vec{J}_p = \del{}{t} \vec{P}$$
    $$\vec{P} = \veps_0 \chi_e \vec{E}$$
    $$\chi_e = \veps_r - 1 = 80$$
    
    Solve for the polarization:
    $$\vec{P} = \veps_0 (80)\left[0.1 \cos(2 \pi \times 10^6 t)\right]\hat{x}$$

    Solve for the polarization current:
    $$\vec{J}_p = -80 \veps_0 (0.1)(2\pi \times 10^6) \sin(2\pi \times 10^6 t)\hat{x}$$
}

Incorporate the result into Ampere's Law:
$$\nabla \times \vec{B} = \mu_0 \vec{J} + \mu_0 \veps_0 \del{}{t}\vec{E} + \mu_0 \vec{J}_p$$

Replace polarization current, working backwards. 
$$\nabla \times \vec{B} = \mu_0 \vec{J} + \mu_0 \del{}{t} \left[ (\veps_0 + \veps_0 \chi_e) \vec{E}\right]$$

Reducing the terms in the brackets gives Ampere's law in a material medium.
$$\veps_0 + \veps_0 \chi_e = \veps_0 (1 + \chi_e) = \veps_0 \veps_r$$

\dfn{Ampere's Law in a Material Medium}
{
    $$\nabla \times \vec{B} = \mu_0 \vec{J} + \mu_0 \del{}{t}\vec{D}$$
}

Next, let's find Gauss's law for $\vec{E}$-fields inside a material.

$$\nabla \cdot \vec{E} = {\rho_\text{enc} \over \veps_0} = {\rho_\text{free} + \rho_p \over \veps_0}$$

$\rho_\text{free}$ is the same as $\rho_v$. External free charge distribution due to an external source. $\rho_p$ is the charge distribution due to an external $\vec{E}$-field.

$$\rho_p = -\nabla \cdot \vec{P}$$
$$\nabla \cdot \vec{E} = {\rho_\text{free} \over \veps_0} - {1\over \veps_0}(\nabla \cdot \vec{P})$$
$$\rho_\text{free} = \nabla \cdot \veps_0 \vec{E} + \nabla \cdot (\veps_0 \chi \vec{E})$$
$$\therefore \nabla \cdot \left[\veps_0 (1 + \chi_e) \vec{E}\right] = \rho_\text{free}$$

Simplifying the terms in the square brackets gives Gauss's law in a material medium.
$$\veps_0(1 + \chi_e) = \veps_0 \veps_r$$

\dfn{Gauss's Law for $\vec{E}$-fields in a Material Medium}
{
    $$\nabla \cdot \vec{D} = \rho_\text{free}$$
    $$\oiint \vec{D} \cdot d\vec{a} = Q_\text{free}$$
}

\ex{}
{
    A sphere of linear dielectric material has embedded in it a uniform free charge density, $\rho$. Fidn the potential at the center of the sphere if its radius is $R$ with dielectric constant, $\veps_r$.

    $$\vec{P} = \veps_0 \chi_e \vec{E}$$
    $$V = -\int\limits_\infty^0 \vec{E} \cdot d\vec{r} = - \int\limits_\infty^R \vec{E} \cdot d\vec{r} - \int\limits_R^0 \vec{E} \cdot d\vec{r}$$

    $$\oint \vec{D} \cdot d\vec{a} = Q_\text{free, enclosed}$$

    Inside the sphere:
    $$\int d\vec{a} = 4 \pi r^2 \therefore D 4\pi r^2 = \rho {4\over3} \pi r^3$$
    $$\vec{D} = {\rho r \over 3} \hat{r}$$

    Outside the sphere:
    $$D 4\pi r^2 = \rho {4\over3} \pi R^3$$
    $$\vec{D} = {\rho R^3 \over 3r^2}\hat{r}$$

    The corresponding $\vec{E}$-field for the result is simply the conversion from $D$ to $E$.
    $$\vec{E} = {1\over\veps}\vec{D}$$

    Inside the sphere:
    $$\vec{E} = {\rho r \over 3\veps_0\veps_r} \hat{r}$$

    Outside the sphere, since the outside is free space:
    $$\vec{E} = {\rho R^3 \over 3\veps_0 r^2}\hat{r}$$

    Use the definition of potential to calculate $V$ based on $E$.

    $$V = -\int\limits_\infty^R {\rho R^3 \over 3\veps_0 r^2} dr - \int\limits_R^0 {\rho R^3 \over 3\veps_0 r^2} dr$$

    Evaluating the integrals yields:
    $$V = {\rho R^2 \over 3 \veps_0}\left(1 + {1\over 2\veps_r}\right)$$
}

\section{Magnetic Materials}
Any microscopic object consists of many atoms/molecules each having electric charges in motion. With each electron in an atom or molecule, we associate a tiny dipole moment.

$$\vec{m} = Id\vec{s} = \int_V \vec{M} dV$$
Where:
\begin{itemize}
    \item[$\vec{m}$] is the magnetic dipole moment normal to the surface enclosed by the path of a moving charge.
\end{itemize}
$$\vec{p} = q \vec{d}$$

When $\vec{m}$ is parallel to the external $\vec{B}$-field, the material is called \emph{paramagnetic}. If $\vec{m}$ is instead anti-parallel, the material is called \emph{diamagnetic}. Ferromagnetic materials retain magnetic properties after the $\vec{B}$-field has been removed.

$$\vec{M} = \lim_{\Delta v \to \infty} {1\over \Delta v} \sum_{i=1}^{n} \vec{m}_i = n\vec{m}_a = nId\vec{s}$$

\begin{Example}
    Consider a rectangular loop current, $I$, with an angled $\vec{B}$-field. Find the torque applied to the loop due to the magnetic field.

    $$d\vec{F} = \rho_l dl (\vec{v} \times \vec{B})$$
    $$d\vec{F}_1 = I dx (\hat{x} \times \vec{B}) = Idx\hat{x} \times (B_x \hat{x} + B_y \hat{y} + B_z \hat{z})$$
    $$d\vec{F}_1 = I dx \begin{vmatrix}
        \hat{x} & \hat{y} & \hat{z} \\
        1 & 0 & 0 \\
        B_x & B_y & B_z
    \end{vmatrix} = I dx (B_y \hat{z} - B_z \hat{y})$$

    $$d\vec{R}_1 = -{1\over2}dy\hat{y}$$

    The torque applied to the loop current is:
    $$d\vec{\tau}_1 = d\vec{R}_1 \times d\vec{F}_1 = -{1\over2}dy\hat{y} \times I (B_y \hat{z} - B_z \hat{y}) = {1\over2} dx dy I B_y \hat{x}$$

    By inspection, the torque on the bottom of the loop is the same as the torque on the top of the loop. 
    $$d\vec{\tau}_1 = d\vec{\tau}_3 \therefore d\vec{\tau}_1 + d\vec{\tau}_3 = dx dy I B_y \hat{x}$$

    For the vertical sides:
    $$d\vec{F}_2 = I dy \hat{y} \times \vec{B} = I dy (B_z \hat{x} - B_x \hat{z})$$
    $$d\vec{\tau}_2 = d\vec{R}_2 \time d\vec{F}_2 = {1\over2} dx \hat{x} \times d\vec{F_2} = {1\over2} dx dy I B_x \hat{y}$$

    Again by inspection, the torque on the right of the loop is the same as the torque on the right.
    $$ d\vec{\tau}_2 = d\vec{\tau}_4 \therefore d\vec{\tau}_2 + d\vec{\tau}_4 = dx dy I B_x \hat{y}$$
    The total torque, $d\vec{\tau}$ is:
    $$d\vec{\tau} = d\vec{\tau}_1 + d\vec{\tau}_2 + d\vec{\tau}_3 + d\vec{\tau}_4 = I dx dy (B_x \hat{y} - B_y\hat{x}) = I dx dy \hat{z} \times \vec{B} = I d\vec{s} \times \vec{B}$$

    $$\boxed{d\vec{\tau} = \vec{m} \times \vec{B}}$$
\end{Example}

\noindent
Consider change in magnetization in the $\hat{y}$ direction.
$$\vec{K}_m = \vec{M} \times \vec{n}$$
\\
Two blocks, $M_z(y)$ and $M_z(y + dy)$, have non-uniform magnetization. On the surface, there is a net current in the $\hat{x}$ direction.
$$I_x = [M_z(y+dy) - M_z(y)] dz$$
$$I_x = \del{}{y} M_z dy dz$$
\\
The current density $J_{mx}$ due to magnetization in the $\hat{x}$ direction.
$${I_x \over dy dz} = J_{mx} = \del{}{y} M_z$$
\\
By the same token, a non-uniform magnetization in the $\hat{z}$ direction would contribute an amount of $(-\del{}{y} m_y)$.
$$-I_x = [M_y(z + dt) - M_y(z)] = \del{}{z}M_y dy dz$$
$$J_{mx} = -\del{}{z}M_y$$
$$J_{mx} = \del{}{y} M_z - \del{}{z}M_y = \nabla \times \vec{M}$$
\\
For steady state:
$$\nabla \cdot \vec{J}_m = 0$$
\\
In integral form:
$$\vec{J} \cdot d\vec{s} = nId\vec{s} \cdot d\vec{l} = \vec{M} \cdot d\vec{l}$$
$$\iint \vec{J} \cdot d\vec{s} = \oint \vec{M} \cdot d\vec{l}$$

\dfn{Ampere's Law \& Magnetic Current}{
    From Gauss's Law:
    $$\rho_\text{total} = \rho_\text{free} + \rho_p = \rho_\text{free} -(\nabla \cdot \vec{P})$$
    $$\rho_\text{free} = \nabla \cdot \vec{D}$$
    Definition of current densities:
    $$\vec{J}_\text{total} = \vec{J}_\text{free} + \vec{J}_\rho + \vec{J}_m$$
    $$\vec{J}_p = \del{}{t}\vec{P}$$
    $$\vec{J}_m = \nabla \times \vec{M}$$

    Big Ol' Ampere's Law:
    $$\nabla \times \vec{B} = \mu_0 \vec{J}_\text{total} + \mu_0 \veps_0 \del{}{t}\vec{E} = \mu_0 \left[ \vec{J}_\text{free} + \vec{J}_m + \vec{J}_p \right] + \mu_0 \veps_0 \del{}{t}\vec{E}$$

    $$\vec{M} = {\vec{B} \over \mu_0} - \vec{H}$$
    $$\vec{P} = \vec{D} - \veps_0 \vec{E}$$

    $$\nabla \times \vec{B} = \mu_0 \left[\vec{J}_\text{free} + \nabla \times ({\vec{B} \over \mu_0}- \vec{H}) + \del{}{t} \vec{P} \right] + \mu_0 \veps_0 \del{}{t} \vec{E}$$

    $$0 = \vec{J}_\text{free} - (\nabla - \vec{H}) + \del{}{t}\vec{D}$$

    Ampere's Law in a Material
    $$\boxed{\nabla \times \vec{H} = \vec{J}_\text{free} + \del{}{t}\vec{D}}$$
}

\nt{
    $$\nabla \cdot \vec{D} = \rho_\text{free} \longleftrightarrow \oiint \vec{D} \cdot d\vec{a} = Q_\text{free}$$
    $$\nabla \cdot \vec{B} = 0 \longleftrightarrow \oiint \vec{B} \cdot d\vec{a} = 0$$
    $$\nabla \times \vec{E} = -\del{}{t} \vec{B} \longleftrightarrow \oint \vec{E} \cdot d\vec{l} = -\iint \del{}{t}\vec{B} \cdot d\vec{a}$$
    $$\nabla \times \vec{H} = \vec{J}_\text{free} + \del{}{t}\vec{D} \longleftrightarrow \oint \vec{H} \cdot d\vec{l} = I_\text{free} + \iint \del{}{t} \vec{D} \cdot d\vec{Q}$$
}

\ex{}
{
    An infinitely long cylinder of radius, $R$, carries a magnetezation parallel to the axis.
    $$\vec{M} = Ar\hat{z}$$
    Where:\begin{itemize}
        \item[$A$] is a constant
        \item[$r$] is the distance from the axis
    \end{itemize}
    Find all magnetization current densities ($J_m$)
    $$\vec{J}_m = \nabla \times \vec{M} = {1\over r}\del{}{\varphi}M_z \hat{r} - \del{}{r}M_z \hat{\varphi}$$
    $$\vec{J}_m = -\del{}{r}A r \hat{\varphi} = -A\hat{\varphi}$$
    $$\vec{K}_m = \vec{M} \times \vec{n}$$
    $$\vec{K}_m = A r \hat{z} \times \hat{r} = A r \hat{\varphi}$$
    $$\oint \vec{H} \cdot d\vec{l} = I_\text{free}$$
    $$\vec{H} = {\vec{B} \over \mu_0} - \vec{M} = 0$$
    $$\vec{B} = \mu_0 \vec{M} \therefore \vec{B} = \mu_0 A r \hat{z}$$
}

\section{Boundary Conditions}

The elctric and magnetic fields must be continuous for all time and space, including at boudaries. Here, we will use Maxwell's equations in materials to understand how these fields behave at material boundaries.

\ex{$\vec{E}$-field Boundary}
{
    Consider two materials meeting at a boundary along the y-axis.

    $$V = -\int \vec{E} \cdot d\vec{l}$$
    $$V_{ab} = -\int\limits_a^b \vec{E} \cdot d\vec{l}$$
    $$V_{ba} = -\int\limits_b^a \vec{E} \cdot d\vec{l}$$

    For a closed loop:
    $$V_{ab} = V_{ba}$$
    $$\vec{E} \cdot d\vec{l} = 0$$
    
    The sum around the loop:
    $$E_{y_1}dy + {1\over2}E_{x_1}dx + {1\over2}E_{x_2}dx - E_{y_2}dy - {1\over2}E_{x_y}dx - {1\over2}E_{x_3}dx = 0$$
    The y components must be equal to allow for this equality to hold.
    $$\therefore E_{y_1} = E_{y_2}$$
    The tangential component of the $\vec{E}$-field at the interface between two materials is continuous.

    In general:
    $$E''_1 = E''_2$$
    $$\hat{n} \times (\vec{E}_1 - \vec{E}_2) = 0$$
}

\ex{}
{
    A cylindrical region of height $dh$ and base area $\Delta s$. Consider the interface between two regions with permittivity $\veps_1$ and $\veps_2$. The top base of the cylinder has a surface normal vector, $\hat{n}$, and an electric flux density, $D_1$, that has both normal and tangential components. The bottom face of the cylinder has a surface normal antiparallel to the top, and a electric flux density, $D_2$, with both normal and tangential components. The label of the cylinder only has a tangential component, $D_{3_n}$.
    \\
    \\
    Consider the surface charge:
    $$(D_{n_1})(\Delta s) - (D_{n_2})(\Delta s) + (D_{n_3})(\Delta s_l) = \rho_s \Delta s + \rho_{s_l} \Delta s_l$$
    To get the boundary condition, set $dh$ to 0.
    $$\rho_{s_l} \Delta s_l \to 0$$
    $$D_{n_3} \Delta s_l \to 0$$
    $$\therefore (D_{n_1} - D_{n_2}) \Delta s = \rho_s \Delta s$$
    $$\therefore D_{n_1} - D_{n_2} = \rho_s$$
    The normal component of the flux density is discontinuous by an amount, $\rho_s$. In general, however:
    $$\hat{n} \cdot (\vec{D}_1 - \vec{D}_2) = \rho_s$$
    Alternatively:
    $$\hat{n} \cdot (\veps_1 \vec{E}_1 - \veps_2 \vec{E}_2) = \rho_s$$
}

\ex{}
{
    Two $\vec{E}$-fields, $\vec{E}_1$ and $\vec{E}_2$. The field, $\vec{E}_1$ is oriented at an angle $\theta_1$ with respect to the $\hat{y}$ direction, and $\vec{E}_2$ is oriented at an angle, $\theta_2$ with respect to the $-\hat{y}$ direction. Consider the $\hat{x}$ direction to be the tangential direction, and the $\hat{y}$ direction to be the normal direction.
$$E_{1_T} = E_1 \sin(\theta_1)$$
$$E_{2_T} = E_2 \sin(\theta_2)$$
$$E_{1_T} = E_{2_T} \therefore E_1 \sin(\theta_1) = E_2 \sin(\theta_2)$$

}

\subsection{Magnetization Boundary Conditions}

$$\nabla \times \vec{M} = \vec{J}_m$$

$$\int (\nabla \times \vec{M}) \cdot d\vec{a} = \int \vec{J}_m \cdot d\vec{a}$$

By Stokes theorem, the curl of the magnetization is the same as the closed loop line integral of the magnetization:
$$\int (\nabla \times \vec{M}) \cdot d\vec{a} = \oint \vec{M} \cdot d\vec{l} = \int \vec{J}_m \cdot d\vec{a}$$
Evaluating the line integral:
$$M_{1_t}\Delta l - M_{2_t} \Delta l + M_{1_n} {\Delta h \over 2} + M_{2_n} {\Delta h \over 2} - M_{2_n} {\Delta h \over 2} - M_{1_n} {\Delta h \over 2} = \int \vec{J}_m \cdot d\vec{a}$$
Since the normal components cancel out and $J_m$ exists on the line inside the loop parallel to $\Delta l$:
$$M_{1_t} \Delta l - M_{2_t} \Delta l = \vec{J}_{m_s} \Delta l$$
Simplifying:
$$\vec{J}_{m_s} = \vec{M}_{1_t} - \vec{M}_{2_t} = \hat{n} \times (\vec{M}_1 - \vec{M}_2)$$

\ex{}
{
    A coaxial cable consists of two very long cylindrical tubes suspended by a linear insulating material of magnetic susceptability $\chi_m$. A current, $I$, flows down the inner tube and returns along the outer one. Find the $\vec{B}$-field between the conductors.

    By Ampere's Law:
    $$\oint \vec{H} \cdot d\vec{l} = I_\text{free-enc}$$
    $$H(2\pi \rho) = I_f$$
    Since we integrate around the $\varphi$ direction.
    $$\vec{H} = {I \over 2\pi \rho}\hat{\varphi}$$
    Convert from $\vec{H}$ to $\vec{B}$:
    $$\vec{B} = \mu \vec{H} = \mu_0 \mu_r \vec{H}$$
    $$\mu_r = 1 + \chi_m$$
    $$\vec{B} = \mu_0(1 + \chi_m){I \over 2\pi \rho}\hat{\varphi}$$
    Check for the same result by calculating the bound currents or magnetic currents:
    $$\vec{M} = \chi_m \vec{H}$$
    $$\vec{M} = \chi_m {I \over 2\pi \rho}$$
    $$\vec{J}_m = \nabla \times \vec{M}$$
    Evaluating the curl in cylindrical coordinates
    $$\text{curl } \vec{M} = \left({1\over \rho}\del{M_z}{\varphi} - \del{M_\varphi}{z}\right)\hat{\rho} + \left(\del{M_\rho}{z} - \del{M_z}{\rho}\right)\hat{\varphi} + {1\over\rho}\left(\del{(\rho M_\varphi)}{\rho} - \del{M_\rho}{\varphi}\right)\hat{z}$$
    $\vec{M}$ only exists in the $\hat{\varphi}$ direction:
    $$\text{curl } \vec{M} = -\del{M_\varphi}{z}\hat{\rho} + {1\over \rho}\del{}{\rho}(\rho M_\varphi)\hat{z}$$
    Since $\vec{M}$ is uniform in the z direction:
    $$\text{curl } \vec{M} = {1\over \rho} \del{}{\rho}\left(\rho \chi_m {I \over 2\pi \rho}\right) = 0$$
    Therefore:
    $$\vec{J}_m = 0$$
}


\section{Wave Equation in a Conductive, Lossy Medium}
\nt{
$$\nabla \times \vec{H} = \vec{J}_\text{free} + \del{}{t}\vec{D}$$
$$\nabla \cdot \vec{B} = 0$$
$$\nabla \times \vec{E} = -\del{}{t}\vec{B}$$
$$\nabla \cdot \vec{D} = \rho_\text{free}$$
}

$$\nabla \times \nabla \times \vec{E} = -\del{}{t}(\nabla \times \vec{B})$$
$$\nabla (\nabla \cdot \vec{E}) - \nabla^2\vec{E} = -\del{}{t}(\nabla \times \vec{B})$$
$$\nabla^2\vec{E} = \mu\del{}{t}(\nabla \times \vec{H})$$
$$\nabla^2 \vec{E} = \mu\del{}{t}\left(\vec{J}_\text{free} + \del{}{t}\vec{D}\right)$$
Using the generalized Ohm's law:
$$\vec{J} = \sigma \vec{E}$$
$$\nabla^2 \vec{E} = \mu\del{}{t}\left(\sigma \vec{E} + \veps\del{}{t}\vec{E}\right)$$
Assume the variation of all fields is given by $e^{j\omega t}$:
$$e^{j\omega t} \nabla^2 \vec{E} = \left(j\omega\mu\sigma\vec{E} + \veps j^2\omega^2 \vec{E}\right)e^{j\omega t}$$

\dfn{Wave Equation in a Lossy Medium for a Single Sinusoidal Wave}
{
$$\nabla^2\vec{E} = j\omega\mu(\sigma + j\omega\veps)\vec{E}$$
$$\nabla^2\vec{H} = j\omega\mu(\sigma + j\omega\veps)\vec{H}$$
}
\noindent
Solving the wave equation in a lossy medium
$$\hat{\gamma}^2 = j\omega\mu(\sigma + j\omega\veps)$$
$$\nabla^2\vec{E} = \hat{\gamma}^2\vec{E}$$
Where:
\begin{itemize}
    \item[$\hat{\gamma}$] is the complex propagation constant
\end{itemize}

For a plane polarized $\vec{E}$-field in the $\hat{x}$-direction, the solution to the wave equation is:

$$E_x(z) = E_0 e^{-\gamma z} + E_0'e^{+\gamma z}$$
Where:
\begin{itemize}
    \item[$E_0$] is a constant for propagation in the $+\hat{z}$ direction
    \item[$E_0'$] is a constant for propagation in the $-\hat{z}$ direction
\end{itemize}
\\
\\
Considering only the $+z$ for now:
$$E_x(z) = E_0 e^{-\hat{\gamma} z}$$
$$\hat{\gamma}^2 = j\omega\mu(\sigma + j\omega\veps) \equiv (\alpha + j\beta)^2$$
$$E_x(z) = E_0e^{-(\alpha + j\beta)z} = E_0 e^{-\alpha z} e^{-j\beta z}$$
Where:
\begin{itemize}
    \item[$\alpha$] is the attenuation constant
    \item[$\beta$] is the phase constant
    \item[$\gamma$] is the propagation constant
\end{itemize}

$$(\alpha + j\beta)^2 = j\omega\mu(\sigma + j\omega\veps)$$
$$\alpha^2 - \beta^2 + j2\alpha\beta = j\omega\mu\sigma - \omega^2\mu\veps$$
Separate the real and complex components to solve:
$$\alpha^2 - \beta^2 = -\omega^2\mu\veps$$
$$j2\alpha\beta = j\omega\mu\sigma$$
\noindent
Real time form of the $\vec{E}$-field in a lossy medium:
$$\hat{E}_x(z) = E_x(z, t) = \Re{E_x(z)e^{j\omega t}} = E_0e^{\alpha z}\cos(\omega t - \beta z + \varphi)\hat{x} + E_0'e^{\alpha z} \cos(\omega t + \beta z + \varphi)$$
Due to the lossy medium, the wave amplitude degrades over time. This degradation is called attenuation. The rate of attenuation is given by $\delta$, the attenuation constant.

$$H(z,t) = \Re{H_0e^{-\gamma z + j(\omega t - \beta z)}\hat{y}}$$
In general:
$$H_0 = {E_0 \over \eta}$$
$${\hat{E}_x \over \hat{H}_y} = \hat{\eta}$$
Unlike the real ratio of $\hat{E}_x$ and $\hat{H}_y$ in free space, the wave impedance, $\hat{\eta}$ in a conductive medium exists in $\mathbb{C}$ and is given by:
$$\hat{\eta} = \sqrt{{j \omega \mu \over \sigma + j\omega \veps}} = |\eta| \angle \theta_n = \eta e^{j\theta_n}$$
In terms of $\mu$ and $\veps$:
$$\hat{\eta} = \sqrt{{\mu \over \veps - j{\sigma \over \omega}}} = {\sqrt{\mu \over \veps} \over \left[1 + \left({\sigma \over \omega \veps}\right)^2 \right]^{1/4}} e^{j {1\over2} \arctan\left({\sigma \over \omega \veps}\right)$$
\noindent
This means that the electric and magnetic fields are not in phase with the angle between them.
$$\theta = {1\over2}\arctan\left({\sigma \over \omega \veps}\right)$$
And the phase velocity is given by:
$$v_p = {\omega \over \beta}$$

\subsection{Good Conductors}
In a good conductor:
$${\sigma \over \omega \veps} \gg 1$$
$$\alpha \gg \omega \veps$$
Using this definition, the definition of $\gamma$ can be simplified from:
$$\gamma = \sqrt{j\omega \mu (\sigma + j \omega \veps)}$$
To:
$$\gamma = \sqrt{j\omega\mu\sigma} = \sqrt{j}\sqrt{\omega\mu\sigma} = \left[{1\over\sqrt{2}} + {j\over\sqrt{2}}\right] \sqrt{\omega \mu \sigma}$$
This simplified form can be used to solve for $\alpha$ and $\beta$:
$$\gamma = \alpha + j\beta = \sqrt{{\omega \mu \sigma \over 2}}(1 + j)$$
Therefore, in a good conductor, the wave impedance is:
$$\eta = \sqrt{{\omega \mu \over \sigma}} \angle {\pi \over 4}$$
The angle of the wave impedance is the same angle that $E$ leads $H$ by. In this case, $E$ leads $H$ by ${\pi \over 4}$.
$$\vec{E} = E_0e^{-\alpha z} \cos(\omega t - \beta z)\hat{x}$$
$$\vec{H} = {E_0 \over \sqrt{\omega \mu \over \sigma}} e^{-\alpha z} \cos(\omega t - \beta z - {\pi \over 4})\hat{y}$$
The distance it takes the wave to attenuate by $1 \over e$ is called the \emph{skin depth}, $\delta$.
$$\delta = {1\over\alpha} = \sqrt{2 \over \omega \mu \sigma}$$
For copper at 300[MHz], the skin depth is $\delta = 3.82$[$\mu$m]. In a good conductor the wave attenuates rapidly with distance, therefore the skin depth is very thin.
\\
\\
For a perfect conductor, $\sigma \to \infty$, $\alpha \to \infty$, and $\delta \to 0$. Conversely, in an insulator, $\sigma \to 0$, $\alpha \to 0$, $\delta \to \infty$.
\\
\\
Some common materials:
\begin{enumerate}
    \item Sea Water & $\veps_r = 81$, $\sigma = 4$[s/m]
    \item Wet Earth & $\veps_r = 10$, $\sigma = 10$[s/m]
    \item Dry Earth & $\veps_r = 3$, $\sigma = 10^{-4}$[s/m]
\end{enumerate}
\\
\\
\noindent
Maxwell's Equations in Phasor Notation in Free Space:
    $$\nabla \times \hat{E} = -\del{}{t}\hat{B} = -\mu_0 \del{}{t}\hat{H} = -\mu_0 \del{}{t}H(z)e^{j\omega t}$$
    $$\nabla \times \hat{E} = -j\omega \mu_0 \hat{H}$$
    $$\nabla \times \hat{H} = j\omega \veps_0 \hat{E}$$
\noindent
Maxwell's Equations in Phasor Notation in a Conductive Material:
$$\nabla \times \vec{E} = -j\omega\mu\hat{H}$$
$$\nabla \times \vec{H} = \hat{J} + \del{}{t}\hat{D} = \sigma\hat{E} + \veps\del{}{t}\hat{E} + j\omega\left(\veps - {j\sigma \over \omega}\right)\hat{E}$$

By taking the curl, we arrive at the wave equation for a conductive material:
$$-\nabla^2\hat{E} = j\omega\mu\left[j\omega\left(\veps - {j\sigma \over \omega}\right)\hat{E}\right] = \omega^2\mu\left(\veps - {j\sigma \over \omega}\right)\hat{E}$$
$$\therefore \nabla^2\hat{E} + \omega^2\mu\left(\veps - {j\sigma \over \omega}\right)\hat{E} = 0$$
Where:
\begin{itemize}
    \item[$\veps - {j\sigma \over \omega}$] is the complex permittivity of the material.
\end{itemize}

$$\veps^* = \veps' - j\veps''$$
Where:
\begin{itemize}
    \item[$\veps'$] is related to the polarization characteristics of the material
    \item[$\veps''$] is related to varius power losses and heating mechanisms in a lossy dielectric.
\end{itemize}

$$\alpha = {\omega \sqrt{\mu \veps} \over \sqrt{2}} \lt[\sqrt{1 + \lt({\sigma \over \omega \veps}\rt)^2 - 1\rt]^{1/2}$$
$$\beta = {\omega \sqrt{\mu \veps} \over \sqrt{2}} \lt[\sqrt{1 + \lt({\sigma \over \omega \veps}\rt)^2 + 1\rt]^{1/2}$$

\noindent
$\veps$ in this case is intended to represent polarization properties which we now call $\veps' = \veps_0\veps_r'$, and the conduction losses due to $\sigma$ are now generalized to include other kinds of losses.
$$\nabla \times \hat{H} = \sigma\hat{E} + j\omega(\veps' - j\veps'')\hat{E}$$
$$= r\hat{E} + j\omega \veps' \hat{E} + \omega \veps'' \hat{E}$$
$$= j\omega\veps'\hat{E} + \omega\veps_\text{eq}''\hat{E}$$
$\veps_\text{eq}''$ accounts for all power losses.

$${\sigma \over \omega \veps} = {\sigma \over \omega \veps'} = {\omega \veps_\text{eq}'' \over \omega \veps'} = {\veps_0\veps_r'' \over \veps_0\veps'$$
$$\boxed{\veps^* = \veps_0\veps_r^* = \veps_0(\veps_r' - j\veps_r'')}$$

$$\alpha = {\omega \sqrt{\mu \veps'} \over \sqrt{2}} \lt[\sqrt{1 + \lt({\veps_r'' \over \veps_r'}\rt)^2 - 1\rt]^{1/2}$$
$$\beta = {\omega \sqrt{\mu \veps'} \over \sqrt{2}} \lt[\sqrt{1 + \lt({\veps_r'' \over \veps_r'}\rt)^2 + 1\rt]^{1/2}$$

\noindent
Similarly, the wave impedance, $\eta$, in a lossy medium becomes:
$$\eta^* = {\sqrt{\mu \over \veps} \over \lt[1 + \lt(\sigma \over \omega \veps\rt)^2 \rt]^{1/4}}e^{j\theta_\eta} = {\sqrt{\mu_0 \over \veps_0} \sqrt{\mu_r \over \veps_r'} \over \lt[1 + \lt({\veps_r'' \over \veps_r'\rt)^2\rt]^{1/4}}} e^{j {1\over2} \arctan\lt({\veps_r'' \over \veps_r'}\rt)$$

\section{Poynting's Theorem}
The rate of energy transmitted by an EM wave can be obtained from Maxwell's equations.
$$\nabla \times \vec{E} = -\mu\del{}{t}\vec{H}$$
$$\nabla \times \vec{H} = \sigma\vec{E} + \veps\del{}{t}\vec{E}$$
$$\vec{E} \cdot (\nabla \times \vec{H}) = \sigma \vec{E}^2 + \vec{E}\cdot\veps\del{}{t}\vec{E}$$
$$\vec{H} \cdot (\nabla \times \vec{E}) = -{\mu\over2} \del{}{t}(\vec{H} \cdot \vec{H})$$
$$-{\mu\over2} \del{}{t}(\vec{H} \cdot \vec{H}) + \nabla \cdot(\vec{H} \times \vec{E}) = \sigma\vec{E}^2 + {\veps\over2}\del{}{t}(\vec{E} \cdot \vec{E})$$
$$\int \nabla \cdot (\vec{E} \times \vec{H}) d\tau = -\del{}{t}\int \lt({\veps\over2}\vec{E}^2 + {\mu\over2}\vec{H}^2\rt)d\tau - \int \sigma \vec{E}^2d\tau$$
The net power through a region is the sum of the rate of increase of electric and magnetic energies stored in a volume and the conduction or Ohmic loss.

$$\veps^* = \veps' - j\veps''$$
$$\veps^* = \veps_r - j{\sigma \over \omega \veps_0}$$
Loss tangent:
$$\tan(\delta_c) = {\sigma \over \omega \veps_0 \veps_r}$$
For a good conductor:
$$\delta_c \gg 1$$
For a dielectric:
$$\tan(\delta_c) \lesssim 10^{-4}$$
\noindent
If EM energy is generated within the volume:
$$\int \sigma \vec{E} \cdot d\tau = \int (\vec{E} \cdot \vec{J})d\tau \int \vec{E} \cdot \vec{J}_c d\tau + \int(\vec{E} \cdot \vec{J}_g)d\tau$$
Where:
\begin{itemize}
    \item[$\vec{J}_c$] is the conductor current
    \item[$\vec{J}_g$] is the generator current
\end{itemize}
\noindent
Total power leaving a volume:
$$P_d = \oint(\vec{E} \times \vec{H})\cdot d\vec{s}$$
The power density in [W/m$^2$] traveling in the direction orthoganal to $\vec{E}$ and $\vec{H}$ is:
$$\vec{P}_d = \vec{E} \times \vec{H}$$
The plane wave equations break down to:
$$\vec{P}_d = \vec{E}_x \times \vec{H}_y$$
$$\|\vec{E}_x\| = \eta \|\vec{H}_y\|$$
$$P_d = {\|\vec{E}_x\|^2 \over \eta}$$

\subsection{Average RMS Power}
$$P_\text{RMS} = \vec{P}_\text{avg} = {1\over2} {\|\vec{E}\|^2 \over \eta}$$
$$\vec{E} = E_0 \cos(\omega t - \beta z)\hat{x}$$
$$\vec{H} = {\E_0 \over \eta} \cos(\omega t - \beta z) \hat{y}$$
$$\vec{P}_d = \vec{E} \times \vec{H} = {E_0^2 \over \eta} \cos^2(\omega t - \beta z)\hat{z}$$
$$\vec{P}_\text{avg} = {1\over T} \int\limits_0^T \vec{P}_d(z_0 t)dt = {1\over T} \int\limits_0^T {E_0^2 \over \eta}\cos^2{\omega t - \beta z)dt$$
$$\vec{P}_\text{avg} = {E_0^2 \over 2 \eta_0}\hat{z}$$

$$E(z,t) = \Re{E(z)e^{j\omega t}}\hat{x}$$
$$H(z,t) = \Re(H(z)e^{j\omega t)}\hat{y}$$
$$\hat{E}(z) = E_r + jE_i$$
$$\vec{P}_d(z,t) = \Re{E(z) e^{j\omega t}}\hat{x} \times \Re{H(z) e^{j\omega t}}\hat{y} = {1\over2}\Re{E(z) \times H^*(z) + E(z) \times H(z)e^{j\omega t}}$$
$$\vec{P}_\text{avg} = {1\over2}\Re{E(z) \times H^*(z)}$$

Complex conjugate identity:
$$(G\times F^*)^* = G^* \times F$$

\chapter{Static Fields}
In a static field:
$$\del{}{t} \to 0$$

\noindent
In a static field, Maxwell's Equations become:

\begin{center}
    \begin{tabular}{c | c}
        Differential Form & Integral Form \\
        \hline 
        $$\nabla \cdot \veps\vec{E} = \rho_v$$ & $$\oint_s \veps\vec{E} \cdot d\vec{s} = \int_V \rho_V dV$$ \\
        $$\nabla \cdot \vec{B} = 0$$ & $$\int_s \vec{B} \cdot d\vec{s} = 0$$ \\
        $$\nabla \times \vec{E} = 0$$ & $$\oint_c \vec{E} \cdot d\vec{l} = 0$$ \\
        $$\nabla \times \vec{H} = \vec{J}$$ & $$\oint_c \vec{H} \cdot d\vec{l} = \int_s \vec{J} \cdot d\vec{s}$$
    \end{tabular}
\end{center}

\noindent
Boundary Conditions:
$$\hat{n} \cdot (\veps_0\veps_{r_1} \vec{E}_1 - \veps_0 \veps_{r_2}\vec{E}_2) = \rho_s$$
$$\hat{n} \times (\vec{E}_1 - \vec{E}_2) = 0$$

$$\hat{n} \cdot (\vec{B}_1 - \vec{B}_2) = 0$$
$$\hat{n} \cdot (\vec{H}_1 - \vec{H}_2) = \vec{J}_s$$

\noindent
In the presence of an $\vec{E}$-field, work must be done to move a test charge against it. Using a positive test charge:
$$W = q\vec{E} \cdot \vec{d} = q\int\vec{E} \cdot d\vec{l} = -\Delta U$$
$$\Delta U = U_B - U_A = \int_A^B q\vec{E} \cdot d\vec{l}$$
$${\Delta U \over q} = \Delta V = -\int_A^B \vec{E} \cdot d\vec{l}$$

\noindent
Zero potential (reference potential) is defined at infinity:
$$\Delta V = V_B - \infty = -\int_\infty^B \vec{E} \cdot d\vec{l}$$
$$V = {kq \over r} = {q \over 4\pi\veps r}$$
$$E = - \nabla V$$
$$W_e = \int \vec{F}_e \cdot d\vec{l} = \int q\vec{E} \cdot d\vec{l}$$
In Cartesian coordinates:
$$W = \int F_x dx$$
$$\nabla W = F$$
$$W = -\nabla U$$
$$F = -\nabla U = qE$$

\ex{Electric Dipole}
{
    Consider two test charges, $q_1$ and $q_2$, with equal and opposite charge that are equidistant from the origin, a distance, $d$, apart, and existing on the x-axis. Also consider a point, $p$ at some distance from $q_1$ and some other distance from $q_2$. Let $\hat{r}_1$ be the distance vector from $q_1$ and $p$, $\hat{r}_2$ be the distance vector between $q_2$ and $p$, and $\hat{r}$ be the distance vector from the origin to $p$. Also let $\theta_1$ be the angle $\hat{r}_1$ makes with the x-axis, $\theta_2$ be the angle that $\hat{r}_2$ makes with the x-axis, and $\theta$ be the angle that $\hat{r}$ makes with the x-axis. 
\\
\\
Assume that for $r \gg d$:
$$\theta_1 = \theta_2 = \theta$$

$$V_p = {k q_1 \over r_1} + {k q_2 \over r_2}$$
Since $q_1 = -q_2$, we will define the absolute value of each charge as simply $q$.
$$V_p = {k q \over r_1} - {k q \over r_2} = kq({1\over r_1} - {1\over r_2})$$

$$r_1 = r - {d \over 2} \cos(\theta)$$
$$r_2 = r + {d \over 2} \cos(\theta)$$

$$V_p = kq\lt( {1\over r - {d\over 2} \cos(\theta)} - {1\over r + {d\over 2} \cos(\theta)}\rt)$$
$$V_p = kq\lt[ {d \cos(\theta) \over r^2 - ({d\over2} \cos(\theta))^2} \rt]$$
With a far field assumption ($r \gg d$):
$$V_\text{dipole} = kq {d\cos(\theta) \over r^2}$$
}

$$\nabla \times \vec{A} = 0$$
$$\nabla \cdot \vec{F} = 0$$
$$\nabla \times \nabla(\varphi) = 0$$
$$\vec{A} = \nabla(\varphi)$$
$$\nabla \cdot (\nabla \times \vec{G}) = 0$$
$$\vec{F} = \nabla \times \vec{G}$$

\thm{Helmholtz Theorem}
{
    Any vector field can be completely defined if we know the curl and the gradient everywhere. Any general vector field can be represented as a sum of conservative and solenoidal components.
}

$$\vec{F} = \vec{F}_i + \vec{F}_s$$
$$\nabla \times \vec{F} = \nabla \times \vec{F}_s$$
$$\nabla \times \vec{F}_i$$
$$\vec{F}_i = \nabla \varphi$$
$$\nabla \cdot \vec{F} = \nabla \cdot \vec{F}_i$$
$$\nabla \cdot \vec{F}_s = 0$$
$$\vec{F}_s = \nabla \times \vec{A}$$
$$\vec{F} = \nabla \varphi + \nabla \times \vec{A}$$

For static electromagnetic fields:
$$\nabla \times \vec{E} = 0$$
$$\nabla \cdot \vec{B} = 0$$
$$\nabla \cdot \vec{E} = V$$
$$\nabla \times \vec{B} = \mu \vec{J}$$

$$V_r = {\omega_0 e^{-\alpha r} \over r}$$
Where:
\begin{itemize}
    \item[$\omega_0$] is a constant
    \item[$\alpha$] is a constant
\end{itemize}

\noindent
A capacitor depends on geometry and dielectric:
$$\vec{E} = -\nabla V = -\omega_0 \del{}{r} \lt( {e^{-\alpha r} \over r} \rt) \hat{r}$$
$$\boxed{\vec{E} = \omega_0 e^{-\alpha r} (1 + \alpha r){1 \over r^2}\hat{r}}$$
$$\veps \nabla \cdot \vec{E} = \rho = \veps \omega_0 \lt(e^{-\alpha r}(1+\alpha r) \nabla \cdot {\hat{r} \over r^2} + {\hat{r} \over r^2} \cdot \nabla(e^{-\alpha r} (1 + \alpha r)) \rt)$$
$$\rho = \veps \omega_0 \lt( 4\pi \delta(\vec{r}) - {\alpha^2 e^{-\alpha r} \over r} \rt)$$
For a parallel plate capacitor:
$$\Delta V = Ed = {Q d \over A \veps}$$
$$E = {\sigma \over \veps}$$
$$Q = CV$$
$$\therefore C = {Q \over \Delta V} = {A \veps \over d}$$

\section{Electrostatic Energy Density}
Consider a system of distributed charges. Each charge has an absolute position vector (position with respect to the origin) and as many relative position vectors (position with respect to another charge) as there are other charges. Ignoring all charges except two, say $q_1$ and $q_2$, the work required to bring $q_2$ from infinity to $r_2$ is given by:
$$U_{1 2} = q_q V_1 = {k q_1 q_2 \over r_{1 2}$$
This process can be repeated for all combinations of two charges, and the total potential energy is the sum of all the two charge potential energies. Additionally since each relative position vector is just the difference of the absolute position vectors for any two charges, the total potential energy is given by:
$$U = {k \over 2}\sum_{i=1}^N \sum_{j=1}^N {q_i q_j \over \|\vec{r}_j - \vec{r}_i\|}; i\ne j$$
The total sum is halved because each pairing of $i$ and $j$ show up twice. For example, $U_{1 2} = U_{2 1}$, so this energy would have otherwise been counted twice. The double sum can be simplified in terms of a voltage:
$$U = {k\over 2} \sum{i=1}^N q_i V_i$$

\noindent
For a continuous charge distribution:
$$dW = {1\over2} (\rho d\tau) \cdot V$$
$$W = {1\over2} \int \rho_v V d\tau$$
Since $\nabla \cdot \veps_0 \vec{E} = \rho$:
$$W = {\veps_0 \over 2} \int (\nabla \cdot \vec{E}) V d\tau$$
Through the divergence theorem and the product rule:
$$\boxed{W = {\veps_0\over2} \int \vec{V} (\vec{E} \cdot \hat{n}) ds - {\veps_0 \over 2} \int \vec{E} \cdot \nabla \vec{V} d\tau}$$

\noindent
The surface, $ds$ is arbitrary, one can make the closed surface a great distance away from the system of charges.
$$V \propto {1\over r}$$
$$E \propto {1\over r^2}$$
$$VE \propto {1 \over r^3}$$
$$VEds \propto {1 \over r}$$
So as $r\to\infty$, $(VE)ds \to 0$.
$$W = {\veps_0 \over 2} \int |E^2|d\tau$$

\section{Laplace's and Poisson's Equation}
$$\vec{E} = - \nabla V$$
$$\nabla \cdot \vec{E} = {\rho \over \veps_0}$$
By the Laplacian:
$$\nabla \cdot (- \nabla V) = -\nabla^2 V = {\rho \over \veps_0)$$
Poisson's Equation:
$$\nabla^2 V = -{\rho \over \veps_0}$$
Laplace's Equation works on a charge free region:
$$\nabla^2 V = 0$$

\ex{}
{
    Consider a semi-finite ($x, y \to \infty$) parallel plate capacitor:
    $$\nabla^2 V = 0$$
    As no boundary condition can be met in the x and y direction, the Laplacian becomes:
    $$\Del{2}{}{z}V = 0$$
    Since the second derivative is 0, the first derivative must be a constant:
    $$\del{}{z}V = C_1$$
    Taking the anti-derivative again:
    $$V = C_1 z + C_2$$

    Boundary conditions:
    \begin{enumerate}
        \item At $z=0$, $V = 0$
        \item At $z = d$, $V = V_0$
    \end{enumerate}

    By boundary condition 1:
    $$C_2 = 0$$
    $$V = C_1 z$$
    
    By boundary condition 2:
    $$V = V_0 = C_1 d$$
    $$C_1 = {V_0 \over d}$$
    
    Therefore:
    $$V = {V_0 \over d} z$$
    $$\boxed{\vec{E} = -\vec{\nabla} V = - {V_0 \over d} \hat{z}}$$
}

\ex{}
{
    Consider a coaxial line along the z axis. The outer cylinder is grounded, and the inner cylinder has voltage $V_0$.

    $$\nabla^2 V = 0$$
    The laplacian in cylindrical:
    $${1 \over r} \del{}{r}\lt(r \del{V}{r}\rt) + {1 \over r^2} \Del{2}{V}{\varphi} + \Del{2}{V}{z}$$
    If the coaxial line is infinitely long in the z direction:
    $$\del{V}{z} = 0$$

    The line is circularly symmetric, so it is uniform in the $\varphi$ direction. Therefore:
    $$\del{V}{\varphi} = 0$$
    
    $${1\over r} \del{}{r} r \del{}{r}V = 0$$
    $$r \del{}{r} V = A$$
    Where:
    \begin{itemize}
        \item[$A$] is some constant
    \end{itemize}

    $$\del{}{r} V = {A \over r}$$
    $$V = A \ln |r| + B$$
    When $V = 0$, $r = b$:
    $$V = A\ln|r| - A\ln|b| = A\ln\left|{r \over b}\right|$$
    When $V = V_0$, and $r = a$:
    $$V_0 = A\ln\lt|{a \over b}\rt|$$
    $$\therefore A = {V_0 \over \ln\lt|{a \over b}\rt|}$$
    Putting the boundary conditions together:
    $$V = {V_0 \ln \lt|{r \over a}\rt| \over \ln \lt|{a \over b}\rt|}$$
    
    To find the capacitance of the coaxial line:
    $$C = {Q \over V}$$
    $$E = -\nabla V$$
    $$\int \vec{E} \cdot d\vec{a} = \int \rho dl = {q \over \veps_0}$$
    $$\vec{E} = -{V_0 \over \ln\lt|{a \over b\rt|}} \cdot {1\over r}\hat{r}$$
    $$\vec{D}_{n_1} - \vec{D}_{n_2} = \rho_\text{free}$$
    Since the charge enclosed by a conductor is 0:
    $$\vec{D}_{n_1} = 0$$
    $$-\vec{D}_{n_2} = \rho_\text{free} = \veps_1 E_r$$
    $$\rho_\text{free} = {\veps_1 V_0 \over r \ln\lt|{a \over b}\rt|}$$
    Solving for $q$:
    $$q = 2\pi a l \rho_\text{free} = {2 \pi l \veps_1 V_0 \over \ln\lt|{a \over b}\rt|}$$
    Going back to the capacitance equation:
    $$C = {Q \over V} = {2 \pi \veps_1 l \over \ln\lt|{a\over b}\rt|}$$
    $${C \over l} = {2 \pi \veps_1 \over \ln\lt|{a\over b}\rt|}$$

}

\section{Numerical Computation of Laplace's (Poisson's) Equation}
Consider a spatially varying voltage, $V(x)$. To approximate the derivative, there are three common methods: forward-difference, backward-difference, and center difference.

\noindent
To use these methods, consider three points, $V_1$, $V_2$, and $V_3$, where $V_2$ is a distance, $h$ to the right of $V_1$, and $V_3$ is a horizontal distance, $h$, to the right of $V_2$.

\begin{figure}[h]
    \begin{center}
        \fbox{\includegraphics[width=0.5\textwidth]{FEA.png}}
    \end{center}
    \caption{Finite Difference Methods}
    \label{fig:fea-methods}
\end{figure}

\noindent
Forward Difference Method:
$$\del{}{x}V \approx {V_3 - V_2 \over h}$$
Backward Difference Method:
$$\del{}{x}V \approx {V_2 - V_1 \over h}$$
Center Difference Method
$$\del{}{x}V \approx {V_3 - V_1 \over 2h}$$

For a two-dimensional case, $V(i,j)$, the center difference method:
$$V(i,j) = {1\over 2h}\lt[V(i-1,j) + V(i+1,j) + V(i, j-1) + V(i, j+1)\rt]$$

\ex{}
{
    Find the potential difference between two surfaces if $V(x=0) = 0$ and $V(x=1) = 3$. Assume no charge distribution.
    \\
    \\
    Using the center difference method in 1 dimension:
    $$\Del{2}{}{x}V = 0$$
    If $h=1$ and $j=1$:
    $$V(i,j) = {1\over 2h} \lt[V(i-1) + V(i+1)\rt]$$
    $$V_1 = {1\over2}(0 + V_2) \therefore 2V_1 = V_2$$
    $$V_2 = {1\over2}(V_1 + V_3) \therefore 2V_2 = V_1 + V_3$$
    $$V_3 = {1\over2}(V_2 + 3) \therefore 2V_3 = V_2 + 3$$
    $$\begin{bmatrix}
        2 & -1 & 0 \\
        -1 & 2 & -1 \\
        0 & -1 & 2
    \end{bmatrix} 
    \begin{bmatrix} V_1 \\ V_2 \\ V_3 \end{bmatrix} =
    \begin{bmatrix} 0 \\ 0 \\ 3 \end{bmatrix}$$
}

\noindent
For second order systems, use the Taylor series expansion.
$$V(x_0 + h) = V(x_0) + h\del{}{x}V\Big|_{x_0} + {h^2 \over 2}\Del{2}{}{x}V\Big|_{x_0} + {h^3 \over 3}\Del{3}{}{x}V\Big|_{x_0} + \cdots$$
For most cases, third order terms and higher are neglected.
\\
\\
\noindent
Using the forward difference method:
$${dV \over dx}\Big|_{x_0} = {V(x_0 + h) - V(x_0) \over h} - {h\over2}\Del{2}{V}{x}\Big|_{x_0}$$
The second derivative is considered an error term.
\\
\\
\noindent
Using the center difference method is much better:
$$\Del{2}{V}{x}\Big|_{x_0} \approx \del{}{x}V\Big|_{x_0 + {h\over2}} - \del{}{x}V\Big|_{x_0 - {h\over2}} = {V_3 + V_1 -2V_0 \over h^2}$$

\subsection{Method of Moments}
Potential can be computed from known charge distribution.
$$V(x,y,z) = k\int_V {\rho(x',y',z') \over R}dx'dy'dz'$$
Where:
\begin{itemize}
    \item[$R$] is the distance between charge and field plot
\end{itemize}

\noindent
For numerical evaluations, convert integrals to discrete summations. Often $\rho$ is unknown, but potential is.
\\
\\
\noindent
Method of moments solves for capacitance of various objects including transmission lines.

\ex{}
{
    Consider four charges, $Q_1$, $Q_2$, $Q_3$, and $Q_4$ in free space. For a unique solution, four independent equations for potential are required. $Q_1$ and $Q_2$ are given a potential of $-1$ and $Q_3$ and $Q_4$ have a potential of $+1$.

    $$-1 = k\lt[{Q_1 \over \|\vec{r}_1 - \vec{r}_1\|} + {Q_2 \over \|\vec{r}_1 - \vec{r}_2\|} + {Q_3 \over \|\vec{r}_1 - \vec{r}_3\|} + {Q_4 \over \|\vec{r}_1 - \vec{r}_4\|}\rt]$$
    $$-1 = k\lt[{Q_1 \over \|\vec{r}_2 - \vec{r}_1\|} + {Q_2 \over \|\vec{r}_2 - \vec{r}_2\|} + {Q_3 \over \|\vec{r}_2 - \vec{r}_3\|} + {Q_4 \over \|\vec{r}_2 - \vec{r}_4\|}\rt]$$
    $$1 = k\lt[{Q_1 \over \|\vec{r}_3 - \vec{r}_1\|} + {Q_2 \over \|\vec{r}_3 - \vec{r}_2\|} + {Q_3 \over \|\vec{r}_3 - \vec{r}_3\|} + {Q_4 \over \|\vec{r}_3 - \vec{r}_4\|}\rt]$$
    $$1 = k\lt[{Q_1 \over \|\vec{r}_4 - \vec{r}_1\|} + {Q_2 \over \|\vec{r}_4 - \vec{r}_2\|} + {Q_3 \over \|\vec{r}_4 - \vec{r}_3\|} + {Q_4 \over \|\vec{r}_4 - \vec{r}_4\|}\rt]$$

    $$V_i = {1 \over 4\pi\veps_0} \sum_{j=1}^4 {Q_j \over \|\vec{r}_i - \vec{r}_j\|}$$
    $$[V] = [P][Q]$$
    $$[P] = k
    \begin{bmatrix}
        {1 \over \|\vec{r}_1 - \vec{r}_1\|} & {1 \over \|\vec{r}_1 - \vec{r}_2\|} & {1 \over \|\vec{r}_1 - \vec{r}_3\|} & {1 \over \|\vec{r}_1 - \vec{r}_4\|} \\
        {1 \over \|\vec{r}_2 - \vec{r}_1\|} & {1 \over \|\vec{r}_2 - \vec{r}_2\|} & {1 \over \|\vec{r}_2 - \vec{r}_3\|} & {1 \over \|\vec{r}_2 - \vec{r}_4\|} \\
        {1 \over \|\vec{r}_3 - \vec{r}_1\|} & {1 \over \|\vec{r}_3 - \vec{r}_2\|} & {1 \over \|\vec{r}_3 - \vec{r}_3\|} & {1 \over \|\vec{r}_3 - \vec{r}_4\|} \\
        {1 \over \|\vec{r}_4 - \vec{r}_1\|} & {1 \over \|\vec{r}_4 - \vec{r}_2\|} & {1 \over \|\vec{r}_4 - \vec{r}_3\|} & {1 \over \|\vec{r}_4 - \vec{r}_4\|} \\
   \end{bmatrix}$$
    
    The matrix is symmetric, and each element on the diagonal will produce a singularity. Assume that the potential at these singular points are evaluated at the edge of the spherical charge distribution. Doing this turns $1 \over \|\vec{r}_i \vec{r}_i\|$ into $1 \over a$, where $a$ is the radius of the charge. 

    For $i=j$:
    $$P_{i,j} = {1 \over 4 \pi \veps_0 a}$$

    $$V = \begin{bmatrix}
        -1 \\
        -1 \\
        1 \\
        1 \\
    \end{bmatrix}$$

    $$a = 1/2$$
    $$P = k \begin{bmatrix}
        2 & 1 & {1\over3} & {1\over\sqrt{10}} \\
        1 & 2 & {1 \over\sqrt{10}} & {1\over3} \\
        {1\over3} & {1\over \sqrt{10}} & 2 & 1 \\
        {1\over\sqrt{10}} & {1\over3} & 1 & 2 \\
    \end{bmatrix}$$
}

\ex{}
{
    Consider a charge distribution over a line. The charge on the $j^\text{th}$ segment is given by:
    $$Q_j = 2\pi a \Delta l_j \rho_{L, j}$$
    Singularities will be encountered in cylindrical coordinates.

    $$\lt({Q \over \Delta L}\rt) =
    \begin{bmatrix}
        \rho_{L,1} \\
        \rho_{L,1} \\
        \vdots \\
        \rho_{L,N}
    \end{bmatrix}$$

    Off diagonal terms of the square matrix, $P$, is:
    $$P = {2 \pi a \over 4 \pi \veps_0} {\Delta l_j \over |x_i - x_j|}$$
    $$V = {1 \over 4 \pi \veps_0} \int_V {\rho \over r} d\tau = k {\rho 2 \pi a \over r} \Delta l_i$$
    The singularity when $r_i = r_j$ is eliminated by evaluating potential at the surface.

    $$V_j = k\int\limits_{-\Delta l_j \over 2}^{\Delta l_j \over 2} \int\limits_0^2\pi {\rho_L a d\varphi dx' \over \sqrt{a^2 + (x')^2}}$$
    $$P_{ij} = k 2\pi a \ln(x' + \sqrt{a^2 + (x')^2})\Big|_{-\Delta l_j \over 2}^{\Delta l_j \over 2} = {a \over 2 \veps_0} \ln\lt({{\Delta l_j \over 2} + \sqrt{a^2 + \lt({\Delta l_j \over 2}\rt)} \over {\Delta l_j \over 2} + \sqrt{a^2 + \lt({\Delta l_j \over 2}\rt)^2}}\rt)$$
    
    If $a \ll \Delta l_j$:
    $$P_{i,j} = {a \over \veps_0} \ln\lt({\Delta l_j \over a}\rt)$$
}

\section{Magnetic Vector Potential}
For electric fields generated by stationary charges:
$$\nabla \times \vec{E} = {\rho \over \veps_0} = 0$$
$$\vec{E} = -\nabla V$$
Similarly, for magnetic fields generated by steady currents:
$$\nabla \cdot \vec{B} = 0$$
$$\nabla \times \vec{B} = \mu_0 \vec{J}$$
To get the magnetic potential, $\vec{A}$:
$$\vec{B} = \nabla \times \vec{A}$$
$$\nabla \cdot (\nabla \times \vec{A}) = 0$$

The magnetic field in a current carrying conductor:
$$\vec{B} = {\mu_0 \over 4\pi}\int_{\tau'} \lt(\vec{J}_f \times {\hat{r} \over r^2}\rt)d\tau'$$
$$\nabla\lt({1 \over r}\rt) = -{\hat{r} \over r^2}$$
Using vector identities:
$$\nabla\lt({1\over r}\rt) \times \vec{J}_f = \nabla \times {\vec{J}_f \over r} - {1 \over r}\nabla \times \vec{J}_f$$
The second term goes to zero:
$$\nabla\lt({1\over r}\rt) \times \vec{J}_f = \nabla \times {\vec{J}_r \over r}$$
This simplifies the equation for the magnetic field to:
$$\vec{B} = \nabla \times \lt[ {\mu_0 \over 4\pi} \int {\vec{J}_f \over r} d\tau'\rt]$$

To find the magnetic potential, start with Ampere's Law:
$$\nabla \times \vec{B} = \mu_0 \vec{J}$$
$$\nabla \times (\nabla \times \vec{A}) = \mu_0 \vec{J}$$
By the curl of curl identitiy:
$$\nabla(\nabla \cdot \vec{A}) - \nabla^2\vec{A} = \mu_0 \vec{J}$$
For now, we define the divergence of $\vec{A}$ as 0. This gives an equation in a similar form as Poisson's equation:
$$\nabla^2 \vec{A} = -\mu_0 \vec{J}$$

For a volume current density:
$$\vec{A} = {\mu_0 \over 4\pi} \int {\vec{J}_f \over r} d\tau'$$
$$\vec{A} = {\mu_0 \over 4\pi} \int {\vec{K} \over r} d\tau'$$
$$\vec{A} = {\mu_0 \over 4\pi} \int {\vec{I} \over r} d\tau'$$

Let's revisit the divergence of $\vec{A}$ being 0. Since the curl of $\vec{A}$ describes the magnetic field, it is not uniquely defined. By adding it to the gradient of a scalar, without changing the curl. We can always find some function, $f$, such that $\vec{A}$ is divergenceless.

$$\nabla \times (\vec{A} + \nablaf)$$
$$\vec{B} = (\nabla \times \vec{A}) + (\nabla \times \nabla f) = \nabla \times \vec{A}$$
$$\nabla \cdot (\vec{A} + \nabla f) = (\nabla \cdot \vec{A}) + (\nabla \cdot \nabla f)$$
$$\vec{A}_s = \vec{A} + \nabla f$$
Since we can always find a function, $f$, such that $\vec{A}$ is divergenceless:
$$\nabla \cdot \vec{A}_s = 0$$

\ex{}
{
    Find the magnetic field of a finite segmenent of straight wire carrying current I.

    $$\vec{A} = {\mu_0 \over 4\pi} \int {I \over r'}dl$$
    Since $I$ is constant:
    $$\vec{A} = {\mu_0 \over 4\pi}I \int {1 \over r'}dl$$
    Since we are in cylindrical:
    $$dl = dz'$$
    $${1\over r'} = {1 \over \sqrt{(z')^2 + r^2}}$$
    Plugging in:
    $$\vec{A} = {\mu_0 \over 4\pi}I \int\limits_{z_1}^{z_2} {dz' \over \sqrt{(z')^2 + r^2}}\hat{z}$$
    $$\vec{A} = {\mu_0 \over 4 \pi I} \ln\lt({z_2 + \sqrt{r^2 + z_2^2} \over z_1 + \sqrt{r^2 + z_1^2}}\rt) \hat{z}$$

    To solve for $\vec{B}$, we must find the curl of $\vec{A}$.
    $$\vec{B} = \nabla \times \vec{A} = -\del{}{r}A_z \hat{\varphi} = -{\mu_0 \over 4\pi} I \lt[ {r \over (r^2 + z_2^2)^{1/2} } {1 \over z_1 + (r^2 + z_1^2)^{1/2}} \rt]\hat{\varphi}$$

    $$\vec{B} = {\mu_0 I \over 4 \pi r} \lt[ {z_2 \over (r^2 + z_2^2)^{1/2}} + {z_1 \over (r^2 + z_1^2)^{1/2}} \rt]$$

}

\section{Magnetic Circuits}
$$\Phi_B = \int \vec{B} \cdot d\vec{a} = \int (\nabla \times \vec{A}) \cdot d\vec{a}$$
By Stokes theorem:
$$\Phi_B = \oint \vec{A} \cdot d\vec{l}$$

\ex{}
{
    If $\vec{A} = {\rho^2 \over 4} \hat{z} [{\text{Wb} \over \text{m}}]$, find the total magnetic flux crossing the surface:
    $$\varphi = {\pi \over 2}$$
    $$1 \le \rho \le 2$$
    $$0 \le z \le 5$$
}

\subsection{Properties of Self Inductance}
The ratio of the flux linking the first transmitting loop $L_{1 1}$ to its own current, $I_1$.
$$L_{1 1} = {N_1 \Phi_{1 1} \over I_1}$$
$$\mathcal{E} = -\del{}{t}\Phi_B = -L{d \over dt}I$$
$$\Phi_B = \vec{B} \cdot \vec{A}$$

For multiple loops, the total flux in the seond loop from the first:
$$\Phi_{1 2} = \int_{s_2} \vec{B} \cdot d\vec{s}_2$$
$$L_{1 2} = {N_2 \Phi_{1 2} \over I_1}$$
$$\mathcal{E} = -N {d \over dt} \Phi_B$$
$$L {d \over dt} I = N {d \over dt} \Phi_B$$
$$LI = N\Phi_B = \lambda$$
Where:
\begin{itemize}
    \item[$\lambda$] is the flux linkage
\end{itemize}

The self inductance per unit length of an infinitely long solenoid:
$$\vec{B} = \mu_0 n I = \mu H$$
$$\Phi_B = \mu_0 nIA$$
$$\lambda' = {\lambda \over l} = n \Phi_B$$
$$L' = {L \over l}$$

\subsection{Magnetic Energy}
$$W_E = {1\over2} \int_V \vec{D} \cdot \vec{E} d\tau = {1\over2}\veps \int_V \|\vec{E}\|^2 d\tau$$$$W_E = {1\over2} CV^2$$

For $\vec{B}$-fields:
$$W_m = {1\over2}LI^2 = {1\over2}\Phi_B I$$

\ex{}
{
    Consider a differential volume in a $\vec{B}$-field. Let the volume be covered with conducting sheets on the top and bottom. Assume the region is filled with a differential volume.

    $$L = {\Phi \over I}$$
    $$\Delta L = {\Delta \Phi \over \Delta I} = {B \Delta x \Delta y \over \Delta I} = {\mu H \Delta x \Delta z \over \Delta I}$$
    $$\Delta W_m = {1\over2}\Delta L \Delta I^2 = {1\over2}H^2 \Delta x \Delta y \Delta z$$
    The magnetic energy density:
    $$W_m = {1\over2} \mu H^2$$
    The magnetic energy:
    $$w_m = \int W_m d\tau = {1\over2} \int \mu \vec{H}^2 d\tau = {1\over2}\int \mu \vec{H} \cdot \vec{H} d\tau = {1\over2}\int \vec{B} \cdot \vec{H} d\tau$$
}

\chapter{Plane Wave Transmission}
For an incident plane wave electromagnetic field, there is complete reflection at the interface of a perfect conductor. For an incident electromagnetic plane wave on a lossless, homogeneous medium, some energy is transmitted into the medium, while some is reflected.

$$e^{-\alpha z} = 1$$
When the decay portion is unity, the wave does not decay into the material. Hence, the material is considered lossless.
\\
\\
The incident wave:
$$\hat{E}_x^i = \hat{E}_{m_1}^+ e^{-\hat{\gamma}_1 z}$$
$$\hat{H}_y^i = {\hat{E}_{m_1}^+ \over \hat{\eta}_1} e^{-\hat{\gamma}_1 z}$$
$$\hat{\gamma}_1 = \alpha_1 + j\beta_1$$
The transmitted wave:
$$\hat{E}_x^t = \hat{E}_{m_2}^+ e^{-\hat{\gamma}_2 z}$$
$$\hat{H}_y^t = {\hat{E}_{m_2}^+ \over \hat{\eta}_2} e^{-\hat{\gamma}_2 z}$$
The reflected wave:
$$\hat{E}_x^r = \hat{E}_{m_1}^- e^{\hat{\gamma}_1 z}$$
$$\hat{H}_y^r = {\hat{E}_{m_1}^- \over \hat{\eta}_1} e^{\hat{\gamma}_2 z}$$
At the boundary, $z = 0$:
$$\hat{E}_{m_1}^+ = \hat{E}_{m_2}^+$$
$$\hat{E}_x^i + \hat{E}_x^r \Big|_{z=0} = \hat{E}_x^t \Big|_{z=0}$$
$$\hat{H}_y^i + \hat{H}_y^r \Big|_{z=0} = \hat{H}_y^t \Big|_{z=0}$$
$$2\hat{E}_{m_1}^+ = \hat{E}_{m_2} \lt(1 + {\hat{\eta_1} \over \hat{\eta_2}}\rt) = {\hat{E}_{m_2}^+ \over \hat{E}_{m_1}^+} = {2 \hat{\eta}_2 \over \hat{\eta}_1 + \hat{\eta}_2} = \hat{T}$$

$${\hat{E}_{m_1}^- \over \hat{E}_{m_1}^+} = {\hat{\eta}_2 - \hat{\eta}_1 \over \hat{\eta}_2 + \hat{\eta}_1} = \hat{\Gamma}$$

\nt
{
    \begin{enumerate}
    \item $\hat{T}$ is the transmission coefficient. It is based on the material properties of both regions, given by the ratio:
    $${2 \hat{\eta}_2 \over \hat{\eta}_1 + \hat{\eta}_2}$$
\item $\hat{\Gamma}$ is the reflection coefficient. It is also based the material properties of both regions. It is given by a slightly different ratio:
    $${\hat{\eta}_2 - \hat{\eta}_1 \over \hat{\eta}_2 + \hat{\eta}_1}$$
    \end{enumerate}
}
\\
\\
\noindent
As noted earlier, for a perfect conductor, $\sigma_2 = \infty$, the incident wave is completely reflected. Therefore, $\hat{T} = 0$ and $\hat{\Gamma} = -1$. The reflection coefficient is negative unity because the reflected wave has equal amplitude and opposite phase.

$$\hat{E}^\text{total}(z) = \hat{E}^i(z) + \hat{E}^r(z) = \hat{E}_{m_1}^+e^{-j\beta_1 z}\hat{x} + \hat{E}_{m_1}^- e^{j\beta_1 z}\hat{x}$$
$$\hat{E}^\text{total}(z) = \hat{E}_{m_1}^+(e^{-j\beta_1 z} - e^{j\beta_1 z})\hat{x} = 2j\hat{E}_{m_1}^+ \sin(\beta_1 z)\hat{x}$$

For real materials (not perfect conductors):
$$\hat{E}^\text{total}(z,t) = \Re{e^{j\omega t} \hat{E}^\text{total}(z)} = 2\vec{E}_{m_1}^+ \sin(\beta_1 z) \sin(\omega t) \hat{x}$$

\begin{enumerate}
    \item $E^\text{total} = 0$ at the surface
    \item The maximum amplitude of the total field is twice that of the incident field. These occur at $z = {\lambda \over 4}$, ${3\lambda \over 4}$ and times $\omega t = {\pi \over 2}$, ${3\pi \over 2}$, $\cdots$.
    \item The incident and reflected waves perfectly cancel at $z = {\lambda \over 2}, {3\lambda \over 2}, \cdots$.
\end{enumerate}

\chapter{Transmission Lines}
All transmission lines require two conductors. Some examples are coaxial lines, dual core lines, PCB traces (two linear plates). For most circuit analysis purposes, with a system with two parallel plates, the distance between them was much less than the wavelength of the signals being sent down them. However, with high frequency applications, this distance must be less but not much less than the wavelength, for the circuit to behave as a transmission line.
\\
\\
\noindent
Consider a transmission line. It contains two conductors each with some resistance, capacitance, and inductance. A current, $i(z,t)$, is applied at one of the terminals, and the voltage across the terminals is $V(z,t)$. The conductors are linked with some capacitance $C\Delta z$ and some inductance $G\Delta z$, and the transmission line with current applied has some resistance $R\Delta z$, and inductance $L\Delta z$. At the other end of this $\Delta z$ piece of the transmission line, the current is $i(z+\Delta z, t)$, and the voltage between the two at this point is $V(z + \Delta z, t)$. While this system could be solved using Kirchhoff's Laws and Ohm's law, it would be easier to convert to phasor form.
\begin{figure}[h]
    \includegraphics[width=\textwidth]{TransmissionLine.png}
\end{figure}
\\
\noindent
With some sinusoidal source: $v_s = \cos(\omega t + \varphi)$
$$v = i Z$$
$$Z_R = R$$
$$Z_L = j\omega L$$
$$Z_C = {1\over j\omega C} = -{j \over \omega C}$$

$$I = {v_s \angle \varphi \over R + j\omega L - {j \over \omega C}}$$
\\
\dfn{Time Varying 1D Helmholtz Equations}
{
    $${d^2 \over dz^2} V(z) = (R + j\omega L)(G + j\omega C)V(z)$$
    $${d^2 \over dz^2} I(z) = (R + j\omega L)(G + j\omega C)V(z)$$
}

$${d^2 \over dz^2} V(z) = \gamma^2 V(z)$$
$${d^2 \over dz^2} I(z) = \gamma^2 I(z)$$
$$\gamma = \lt[(R+ j\omega L)(G + j\omega C)\rt]^{1/2} = \alpha + j \beta$$
Where:
\begin{itemize}
    \item[$\alpha$] is the attenuation constant
    \item[$\beta$] is the phase constant
\end{itemize}
$$V(z) = V_0^+ e^{-\gamma z} + V_0^- e^{\gamma z}$$
$$I(z) = I_0^+ e^{-\gamma z} + I_0^- e^{\gamma z}$$

\section{Wave Equation in Infinite Transmission Lines}
For a infinite, lossless transmission line, $R = 0$, $G = 0$, and $\alpha = 0$.
$$V(z) = V_0^+e^{-j\beta z}$$
$$v(z,t) = \Re{V(z)e^{j\omega t}}$$
$$v(z,t) = \Re{V_0^+e^{-j \beta z}e^{j\omega t}}$$
$$v(z,t) = \Re{V_0^+e^{j\omega t - \beta z}}$$
$$v(z,t) = V_0^+\cos(\omega t - \beta z)$$
Since $\omega t - \beta z$ is a constant, it's time derivative is 0.
$${dz \over dt} = {\omega \over \beta}$$
What are the relations between $V_0^+$, $V_0^-$, $I_0^+$, and $I_0^_-$.
$$-{d V(z) \over dz} = (R + j\omega L) I(z)$$
$$\lt[V_0^+ - {R + j\omega C \over \gamma}I_0^+\rt]e^{-\gamma z} - \lt[V_0^- + {R + j\omega L \over \gamma}I_0^-\rt]e^{\gamma z} = 0$$
$$V_0^+ - {R + j\omega C \over \gamma}I_0^+ = 0$$
$${V_0^+ \over I_0^+} = {R + j\omega C \over \gamma}$$

\section{Semi-Infinite Transmission Lines}
$$V = I Z$$
$$Z = {V \over I}$$
$$Z(z) = {V(z) \over I(z)} = {V_0^+ \over I_0^+} = {R + j \omega L \over \gamma} = Z_0$$
The characteristic impedance, $Z_0$, does not depend on the length of the transmission line. Instead, it is an intrinsic property of the line.
$$Z_0 = \sqrt{R + j\omega L \over G + j \omega C}$$

\section{Smith Charts}
$$V(z) = V_0^+e^{-(\alpha + j\beta)z}$$
$$I(z) = {V_0^+ \over Z_0} e^{-(\alpha + j\beta)z}$$

$$\langle P(z) \rangle = {1 \over 2\pi} \int\limits_0^{2\pi} p(z,t)dt = {1\over2}\Re{V(z)I(z)^*} = {1\over2}(V_0^+)^2 e^{-2\alpha z} \Re{1\over Z_0^*}$$ 

\nt
{
    The angle brackets, $\langle \cdots \rangle$, signify the value over one period.
}

$$\Re{1 \over Z^*} = \Re{1 \over R_0 + jX_0} = {R_0 \over R_0^2 + X_0^2} = {R_0 \over |Z_0|^2}$$
Now:
$$\langle P(x) \rangle = {(V_0^+)^2 R_0 \over 2 |Z_0|^2} e^{-2\alpha z}$$

$$Z_0 = {\ln\lt({b \over a}\rt) \over 2\pi} \sqrt{r \over \veps}$$

$$Z_L = {V(l) \over I(l)} = {V_)^+ e^{-\gamma l} + V_0^- e^{\gamma l} \over I_0^+ e^{-\gamma l} + I_0^- e^{\gamma l}}$$

\noindent
If $Z_L = Z_0$ then $V_0^- = 0$ and $I_0^- = 0$. This is known as the matched condition.

$$V_0^+ = {I(l) \over 2}(Z_L + Z_0)e^{\gamma l}$$
$$V_0^- = {I(l) \over 2}(Z_L - Z_0)e^{-\gamma l}$$
\noindent
Putting this into the Helmholtz equation gives:
$$V(z) = {I(l) \over 2}\lt[(Z_L + Z_0) e^{\gamma(l - z)} + (Z_L - Z_0)e^{-\gamma(l - z)}\rt]$$
$$I(z) = {V(z) \over Z_0} = {I(l) \over 2 Z_0}\lt[(Z_L + Z_0) e^{\gamma(l - z)} + (Z_L - Z_0)e^{-\gamma(l - z)}\rt]$$

$$z' = l - z$$
$$V(z') = {I_L \over 2}\lt[(Z_L + Z_0)e^{\gamma z'} + (Z_L + Z_0)e^{-\gamma z'}\rt]$$
$$Z_\text{in} = {V(z') \over I(z')} = Z_0 {Z_L + Z_0 \tanh(\gamma l) \over Z_0 + Z_L \tanh(\gamma l)}$$

\noindent
Determining $\gamma$ and $Z_0$ by measurement:
\begin{enumerate}
    \item Short circuit: $Z_L = 0$
        $$Z_\text{in, sc} = Z_0 \tanh(\gamma l)$$
    \item Open circuit: $Z_L = \infty$
        $$Z_\text{in, oc} = {Z_0 \over \tanh(\gamma l)}$$
\end{enumerate}
To find $Z_0$ from by measuring $Z_\text{in ,sc}$ and $Z_\text{in, oc}$.
$$Z_0 = \sqrt{Z_\text{in, sc} Z_\text{in, oc}}$$
To find $\gamma$ from the two measurements:
$$\gamma = {1\over l} \arctanh\lt(\sqrt{Z_\text{in, sc} \over Z_\text{in, oc}}\rt)$$

\subsection{Voltage Standing Wave Ratio}
$$V_\text{incident} = {I_L \over 2}(Z_L + Z_0)e^{\gamma z'}$$
$$V_\text{reflected} = {I_L \over 2}(Z_L - Z_0)e^{-\gamma z'}$$
If $z' = 0$:
$$V_\text{incident} = {I_L \over 2}(Z_L + Z_0)$$
$$V_\text{reflected} = {I_L \over }(Z_L - Z_0)$$
Then, the reflection coefficient, $\Gamma$, is given by:
$$\Gamma = {V_\text{reflected} \over V_\text{incident}}\Big|_{z' = 0} = {Z_L - Z_0 \over Z_L + Z_0}$$
Putting $V(z')$ in terms of $\Gamma$:
$$V(z') = {I_L \over 2} (Z_L + Z_0) e^{\gamma z'}\lt[1 + \Gamma e^{-2\gammma z'}\rt]$$
The voltage standing wave ratio (VWSR) is:
$$\text{VWSR} = {|V_\text{max}| \over |V_\text{min}|} = {1 + |\Gamma| \over 1 - |\Gamma|}$$
To find the max and min:
$$\cos(\theta_\Gamma - 2\beta z') = 1 \to \text{max}$$
$$\cos(\theta_\Gamma - 2\beta z') = 0 \to \text{min}$$
The max is when

\section{Transmission Line Design}
In a transmission line, certain behaviors are desired for different applications. In any event, the only parameters that can be changed by a designer are $R$, $L$, $G$, and $C$. On the other hand, $\gamma$, and by extension, $\alpha$ and $\beta$ are only indirectly adjustable through the four terms describing the transmission line.
\\
\\
\noindent
While a lossless line requires that $\alpha = 0$, since $\alpha$ is not directly controllable, $R$ and $G$ must instead be made as close to 0 as possible. Additionally, a distortionless line requires that the parallel impedance and the series imepdance match:
$${R \over L} = {G \over C}$$
\\
\\
\noindent
In this case, all four terms are directly adjustable, and the resulting attenuation and phase constant are:
$$\alpha = R \sqrt{C \over L}$$
$$\beta = \omega \sqrt{L C}$$

\end{document}
