Maxwell’s equations in STA and Tensor forms.

June 11, 2022 math and physics play , , , , , , ,

[Click here for a PDF version of this post]

This is part II of a series, continuing from our expansion of \( F^2 \) previously.

We are going to use the coordinate expansion of the Lagrangian, so we need the tensor form of Maxwell’s equation for comparison.

Maxwell’s equations, with electric and fictional magnetic sources (useful for antenna theory and other engineering applications), are
\begin{equation}\label{eqn:fsquared:220}
\begin{aligned}
\spacegrad \cdot \BE &= \frac{\rho}{\epsilon} \\
\spacegrad \cross \BE &= – \BM – \mu \PD{t}{\BH} \\
\spacegrad \cdot \BH &= \frac{\rho_\txtm}{\mu} \\
\spacegrad \cross \BH &= \BJ + \epsilon \PD{t}{\BE}.
\end{aligned}
\end{equation}
We can assemble these into a single geometric algebra equation,
\begin{equation}\label{eqn:fsquared:240}
\lr{ \spacegrad + \inv{c} \PD{t}{} } F = \eta \lr{ c \rho – \BJ } + I \lr{ c \rho_m – \BM },
\end{equation}
where \( F = \BE + \eta I \BH = \BE + I c \BB \).

We can put this into STA form by multiplying through by \( \gamma_0 \), making the identification \( \Be_k = \gamma_k \gamma_0 \). For the space time derivatives, we have
\begin{equation}\label{eqn:fsquared:260}
\begin{aligned}
\gamma_0 \lr{ \spacegrad + \inv{c} \PD{t}{} }
&=
\gamma_0 \lr{ \gamma_k \gamma_0 \PD{x_k}{} + \PD{x_0}{} } \\
&=
-\gamma_k \partial_k + \gamma_0 \partial_0 \\
&=
\gamma^k \partial_k + \gamma^0 \partial_0 \\
&=
\gamma^\mu \partial_\mu \\
&\equiv \grad
.
\end{aligned}
\end{equation}
For our 0,2 multivectors on the right hand side, we find, for example
\begin{equation}\label{eqn:fsquared:280}
\begin{aligned}
\gamma_0 \eta \lr{ c \rho – \BJ }
&=
\gamma_0 \eta c \rho – \gamma_0 \gamma_k \gamma_0 \eta (\BJ \cdot \Be_k) \\
&=
\gamma_0 \eta c \rho + \gamma_k \eta (\BJ \cdot \Be_k) \\
&=
\gamma_0 \frac{\rho}{\epsilon} + \gamma_k \eta (\BJ \cdot \Be_k).
\end{aligned}
\end{equation}
So, if we make the identifications
\begin{equation}\label{eqn:fsquared:300}
\begin{aligned}
J^0 &= \frac{\rho}{\epsilon} \\
J^k &= \eta \lr{ \BJ \cdot \Be_k } \\
M^0 &= c \rho_m \\
M^k &= \BM \cdot \Be_k,
\end{aligned}
\end{equation}
and \( J = J^\mu \gamma_\mu, M = M^\mu \gamma_\mu \), and \( \grad = \gamma^\mu \partial_\mu \) we find the STA form of Maxwell’s equation, including magnetic sources
\begin{equation}\label{eqn:fsquared:320}
\grad F = J – I M.
\end{equation}

The electromagnetic field, in it’s STA representation is a bivector, which we can write without reference to observer specific electric and magnetic fields, as
\begin{equation}\label{eqn:fsquared:340}
F = \inv{2} {\gamma_\mu \wedge \gamma_\nu} F^{\mu\nu},
\end{equation}
where \( F^{\mu\nu} \) is an arbitrary antisymmetric 2nd rank tensor. Maxwell’s equation has a vector and trivector component, which may be split out explicitly using grade selection, to find
\begin{equation}\label{eqn:fsquared:360}
\begin{aligned}
\grad \cdot F &= J \\
\grad \wedge F &= -I M.
\end{aligned}
\end{equation}

Dotting the vector equation with \( \gamma^\mu \), we have
\begin{equation}\label{eqn:fsquared:380}
\begin{aligned}
J^\mu
&=
\inv{2} \gamma^\mu \cdot \lr{ \gamma^\alpha \cdot \lr{ \gamma_{\sigma} \wedge \gamma_{\pi} } \partial_\alpha F^{\sigma \pi} } \\
&=
\inv{2} \lr{
{\delta^\mu}_\pi {\delta^\alpha}_\sigma

{\delta^\mu}_\sigma {\delta^\alpha}_\pi
}
\partial_\alpha F^{\sigma \pi} \\
&=
\inv{2}
\lr{
\partial_\sigma F^{\sigma \mu}

\partial_\pi F^{\mu \pi}
}
\\
&=
\partial_\sigma F^{\sigma \mu}.
\end{aligned}
\end{equation}

We can find the tensor form of the trivector equation by wedging it with \( \gamma^\mu \). On the left we have
\begin{equation}\label{eqn:fsquared:400}
\begin{aligned}
\gamma^\mu \wedge \lr{ \grad \wedge F }
&=
\inv{2} \gamma^\mu \wedge \gamma^\nu \wedge \gamma^\alpha \wedge \gamma^\beta \partial_\nu F_{\alpha\beta} \\
&=
\inv{2} I \epsilon^{\mu\nu\alpha\beta} \partial_\nu F_{\alpha\beta}.
\end{aligned}
\end{equation}
On the right, we have
\begin{equation}\label{eqn:fsquared:420}
\begin{aligned}
\gamma^\mu \wedge \lr{ -I M }
&=
-\gpgrade{ \gamma^\mu I M }{4} \\
&=
\gpgrade{ I \gamma^\mu M }{4} \\
&=
I \lr{ \gamma^\mu \cdot M } \\
&=
I M^\mu,
\end{aligned}
\end{equation}
so we have
\begin{equation}\label{eqn:fsquared:440}
\begin{aligned}
\partial_\nu \lr{
\inv{2}
\epsilon^{\mu\nu\alpha\beta}
F_{\alpha\beta}
}
=
M^\mu.
\end{aligned}
\end{equation}
Note that, should we want to, we can define a dual tensor \( G^{\mu\nu} = -(1/2) \epsilon^{\mu\nu\alpha\beta} F_{\alpha\beta} \), so that the electric and magnetic components of Maxwell’s equation have the same structure
\begin{equation}\label{eqn:fsquared:460}
\partial_\nu F^{\nu\mu} = J^{\mu}, \quad \partial_\nu G^{\nu\mu} = M^{\mu}.
\end{equation}

Now that we have the tensor form of Maxwell’s equation, we can proceed to try to find the Lagrangian. We will assume that the Lagrangian density for Maxwell’s equation has the multivector structure
\begin{equation}\label{eqn:fsquared:n}
\LL = \gpgrade{F^2}{0,4} + a \lr{ A \cdot J } + b I \lr{ A \cdot M},
\end{equation}
where \( F = \grad \wedge A \). My hunch, since the multivector current has the form \( J – I M \), is that we don’t actually need the grade two component of \( F^2 \), despite having spent the time computing it, thinking that it might be required.

Next time, we’ll remind ourselves what the field Euler-Lagrange equations look like, and evaluate them to see if we can find the constants \(a, b\).

Square of electrodynamic field.

June 5, 2022 math and physics play , , , , ,

[Click here for a PDF version of this post]

The electrodynamic Lagrangian (without magnetic sources) has the form
\begin{equation}\label{eqn:fsquared:20}
\LL = F \cdot F + \alpha A \cdot J,
\end{equation}
where \( \alpha \) is a constant that depends on the unit system.
My suspicion is that one or both of the bivector or quadvector grades of \( F^2 \) are required for Maxwell’s equation with magnetic sources.

Let’s expand out \( F^2 \) in coordinates, as preparation for computing the Euler-Lagrange equations. The scalar and pseudoscalar components both simplify easily into compact relationships, but the bivector term is messier. We start with the coordinate expansion of our field, which we may write in either upper or lower index form
\begin{equation}\label{eqn:fsquared:40}
F = \inv{2} \gamma_\mu \wedge \gamma_\nu F^{\mu\nu}
= \inv{2} \gamma^\mu \wedge \gamma^\nu F_{\mu\nu}.
\end{equation}
The square is
\begin{equation}\label{eqn:fsquared:60}
F^2 = F \cdot F + \gpgradetwo{F^2} + F \wedge F.
\end{equation}

Let’s compute the scalar term first. We need to make a change of dummy indexes, for one of the \( F \)’s. It will also be convenient to use upper indexes in one factor, and lowers in the other. We find
\begin{equation}\label{eqn:fsquared:80}
\begin{aligned}
F \cdot F
&=
\inv{4}
\lr{ \gamma_\mu \wedge \gamma_\nu } \cdot \lr{ \gamma^\alpha \wedge \gamma^\beta }
F^{\mu\nu}
F_{\alpha\beta} \\
&=
\inv{4}
\lr{
{\delta_\nu}^\alpha {\delta_\mu}^\beta
– {\delta_\mu}^\alpha {\delta_\nu}^\beta
}
F^{\mu\nu}
F_{\alpha\beta} \\
&=
\inv{4}
\lr{
F^{\mu\nu} F_{\nu\mu}

F^{\mu\nu} F_{\mu\nu}
} \\
&=
-\inv{2}
F^{\mu\nu} F_{\mu\nu}.
\end{aligned}
\end{equation}

Now, let’s compute the pseudoscalar component of \( F^2 \). This time we uniformly use upper index components for the tensor, and find
\begin{equation}\label{eqn:fsquared:100}
\begin{aligned}
F \wedge F
&=
\inv{4}
\lr{ \gamma_\mu \wedge \gamma_\nu } \wedge \lr{ \gamma_\alpha \wedge \gamma_\beta }
F^{\mu\nu}
F^{\alpha\beta} \\
&=
\frac{I}{4}
\epsilon_{\mu\nu\alpha\beta} F^{\mu\nu} F^{\alpha\beta},
\end{aligned}
\end{equation}
where \( \epsilon_{\mu\nu\alpha\beta} \) is the completely antisymmetric (Levi-Civita) tensor of rank four. This pseudoscalar components picks up all the products of components of \( F \) where all indexes are different.

Now, let’s try computing the bivector term of the product. This will require fancier index gymnastics.
\begin{equation}\label{eqn:fsquared:120}
\begin{aligned}
\gpgradetwo{F^2}
&=
\inv{4}
\gpgradetwo{
\lr{ \gamma_\mu \wedge \gamma_\nu } \lr{ \gamma^\alpha \wedge \gamma^\beta }
}
F^{\mu\nu}
F_{\alpha\beta} \\
&=
\inv{4}
\gpgradetwo{
\gamma_\mu \gamma_\nu \lr{ \gamma^\alpha \wedge \gamma^\beta }
}
F^{\mu\nu}
F_{\alpha\beta}

\inv{4}
\lr{ \gamma_\mu \cdot \gamma_\nu} \lr{ \gamma^\alpha \wedge \gamma^\beta } F^{\mu\nu} F_{\alpha\beta}.
\end{aligned}
\end{equation}
The dot product term is killed, since \( \lr{ \gamma_\mu \cdot \gamma_\nu} F^{\mu\nu} = g_{\mu\nu} F^{\mu\nu} \) is the contraction of a symmetric tensor with an antisymmetric tensor. We can now proceed to expand the grade two selection
\begin{equation}\label{eqn:fsquared:140}
\begin{aligned}
\gpgradetwo{
\gamma_\mu \gamma_\nu \lr{ \gamma^\alpha \wedge \gamma^\beta }
}
&=
\gamma_\mu \wedge \lr{ \gamma_\nu \cdot \lr{ \gamma^\alpha \wedge \gamma^\beta } }
+
\gamma_\mu \cdot \lr{ \gamma_\nu \wedge \lr{ \gamma^\alpha \wedge \gamma^\beta } } \\
&=
\gamma_\mu \wedge
\lr{
{\delta_\nu}^\alpha \gamma^\beta

{\delta_\nu}^\beta \gamma^\alpha
}
+
g_{\mu\nu} \lr{ \gamma^\alpha \wedge \gamma^\beta }

{\delta_\mu}^\alpha \lr{ \gamma_\nu \wedge \gamma^\beta }
+
{\delta_\mu}^\beta \lr{ \gamma_\nu \wedge \gamma^\alpha } \\
&=
{\delta_\nu}^\alpha \lr{ \gamma_\mu \wedge \gamma^\beta }

{\delta_\nu}^\beta \lr{ \gamma_\mu \wedge \gamma^\alpha }

{\delta_\mu}^\alpha \lr{ \gamma_\nu \wedge \gamma^\beta }
+
{\delta_\mu}^\beta \lr{ \gamma_\nu \wedge \gamma^\alpha }.
\end{aligned}
\end{equation}
Observe that I’ve taken the liberty to drop the \( g_{\mu\nu} \) term. Strictly speaking, this violated the equality, but won’t matter since we will contract this with \( F^{\mu\nu} \). We are left with
\begin{equation}\label{eqn:fsquared:160}
\begin{aligned}
4 \gpgradetwo{ F^2 }
&=
\lr{
{\delta_\nu}^\alpha \lr{ \gamma_\mu \wedge \gamma^\beta }

{\delta_\nu}^\beta \lr{ \gamma_\mu \wedge \gamma^\alpha }

{\delta_\mu}^\alpha \lr{ \gamma_\nu \wedge \gamma^\beta }
+
{\delta_\mu}^\beta \lr{ \gamma_\nu \wedge \gamma^\alpha }
}
F^{\mu\nu}
F_{\alpha\beta} \\
&=
F^{\mu\nu}
\lr{
\lr{ \gamma_\mu \wedge \gamma^\alpha }
F_{\nu\alpha}

\lr{ \gamma_\mu \wedge \gamma^\alpha }
F_{\alpha\nu}

\lr{ \gamma_\nu \wedge \gamma^\alpha }
F_{\mu\alpha}
+
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F_{\alpha\mu}
} \\
&=
2 F^{\mu\nu}
\lr{
\lr{ \gamma_\mu \wedge \gamma^\alpha }
F_{\nu\alpha}
+
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F_{\alpha\mu}
} \\
&=
2 F^{\nu\mu}
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F_{\mu\alpha}
+
2 F^{\mu\nu}
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F_{\alpha\mu},
\end{aligned}
\end{equation}
which leaves us with
\begin{equation}\label{eqn:fsquared:180}
\gpgradetwo{ F^2 }
=
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F^{\mu\nu}
F_{\alpha\mu}.
\end{equation}
I suspect that there must be an easier way to find this result.

We now have the complete coordinate expansion of \( F^2 \), separated by grade
\begin{equation}\label{eqn:fsquared:200}
F^2 =
-\inv{2}
F^{\mu\nu} F_{\mu\nu}
+
\lr{ \gamma_\nu \wedge \gamma^\alpha }
F^{\mu\nu}
F_{\alpha\mu}
+
\frac{I}{4}
\epsilon_{\mu\nu\alpha\beta} F^{\mu\nu} F^{\alpha\beta}.
\end{equation}
Tomorrow’s task is to start evaluating the Euler-Lagrange equations for this multivector Lagrangian density, and see what we get.

Almost an academic author: Appendix B: Representation of Dyadics via Geometric Algebra

May 29, 2022 math and physics play , , ,

I corresponded for a bit with the author of a paper on variations and inconsistencies with dyadic notation that is used in some fluid flow and other problems.  In the end I ended up contributing an appendix (Appendix B: Representation of Dyadics via Geometric Algebra) to their paper, which has been submitted to an academic journal (I forget which one.)

I’ve written thousands of pages of independent musings as blog posts, and even a book (self published, and also available for free in pdf form), but this is the first time anything that I’ve written has ended up in an academic journal.

You can find a preprint here on arxiv

New revision of my book: Geometric Algebra for Electrical Engineers

May 16, 2022 Geometric Algebra for Electrical Engineers

A new version of my book is now available in free pdf form, in paperback and hardcover on amazon, on leanpub, and for the brave or crazy — as latex source files and a makefile.  All of these can be found here:

Geometric Algebra for Electrical Engineers.

 

Changes in this V0.1.16-13 (May 15, 2022) version, include:

  • Fix equations 2.81 2.82 — error found by Christopher
  • test drove build instructions (slight fix required.)
  • restore latexsym \Box as dAlembertian
  • gutter fixes.
  • perl -p -i -e ‘s/ *$//’ `cat spellcheckem.txt `
  • (massive change with no visible effects if done right): purge most dmath usage. MacTex upgrade has made these seemingly malfunction, and lines are getting split in all sorts of weird places.

The C compiler is too forgiving! sizeof(variable_name+1) allowed?

April 28, 2022 C/C++ development and debugging. , , , ,

I carelessly passed:

sizeof(s.st_size+1)

to an allocator call, instead of:

s.st_size+1

and corrupted memory nicely.

What the hell would sizeof(variable+1) even mean, and why on earth would the compiler think that is anything close to valid? Both gcc and clang, each with -Wall, are completely quiet about this error!