## Some progress prepping the bathroom reno.

We are finally renovating our master bathroom.  We’ve hired the guys from Markham Tile to do the plumbing and tile work (especially in the shower, which I was afraid to do).  They don’t do the drywall part of the job, and left me some floor repairs as well.  Here’s where the plumbing was done for the new tub:

In this picture, I’ve started installing some 2×4 “strapping” to support the replacement floor boards.  I also ended expanding the holes a bit so that I could fit in pieces that used the joists to hold things up.  Here’s things with all the puzzle pieces installed:

Over where the sink will be, I also had a mess to deal with:

I ended up expanding that hole a bit too, mostly to make a rectangular hole that would be easier to patch.  I also installed some 2×4 “strapping” in this hole for extra support:

The final installed floor patch looks like:

With flooring in place, after a lot of tidy up, and installation of a small bump-out around some pipe that couldn’t be moved, I was ready to start throwing around some mud.  Here’s the pre-mud view:

and by the sink:

This view shows where the medicine cabinet used to be.  We removed it so that the shower head could be in a less awkward spot (it’s now centered in the shower).  Unfortunately, moving the shower head and control left me some shower board repair to do.  Here’s a pre-mud view of the shower where I’m doing the repair:

We opted not to install the “toe tester” in this shower rebuild since we were adjusting the plumbing anyways.

Here’s the bathtub area after an initial rough layup of mud:

and the shower board repair:

and a really badly lit shot of the sink area:

Tomorrow I lay up a bit more mud.

## What fun or important formulas would you put on a shirt?

June 2, 2018 Just for fun 2 comments ,

Lance got a custom made glow in the dark “math, physics, and chemistry” shirt for his birthday a year or two ago (It was Sofia’s idea, she bought the materials, and I got to play.)

He is clearly unimpressed with the photo op, but I wanted to share this shirt, which includes some of the what I thought were a number of the most interesting or important relationships

• Gamma function, which generalizes factorial to non-integer values.
\label{eqn:formulas:20}
\Gamma(z + 1) = \int_0^\infty t^z e^{-t} dt.

This formula satisfies $$n! = \Gamma(n + 1)$$.

• Euler’s:
\label{eqn:formulas:40}
e^{n i \theta} = \lr{ \cos\theta + i \sin\theta }^n.

• Schr\”{o}dinger’s equation
\label{eqn:formulas:60}
i \, \hbar \PD{t}{} \ket{\psi} = H \ket{\psi}.

• Taylor series
\label{eqn:formulas:80}
f(x) = \sum_{k = 0}^\infty \frac{f^{(k)}(0)}{k!} x^k.

• Euler-Lagrange equations:
\label{eqn:formulas:100}
\PD{x_i}{\LL} = \frac{d}{dt} \PD{\dot{x}_i}{\LL}.

These formulas can be used to express most dynamics relations. You can think of them as basically being the consequence that physical laws are either inherently greedy or lazy.

• Stokes’ theorem, in its geoemetric algebra form
\label{eqn:formulas:120}
\oint_{\partial V} d^n \Bx \cdot T = \int_V d^n \Bx \cdot \lr{ \spacegrad \cdot T }.

• Quantum commutator relationships between position and momentum
\label{eqn:formulas:140}
\antisymmetric{X}{P} = i \, \hbar.

• Fourier transform
\label{eqn:formulas:160}
\tilde{f}(\omega) = \int_{-\infty}^\infty f(t) e^{-i \omega t} dt.

• Vector product
\label{eqn:formulas:180}
\Ba \Bb = \Ba \cdot \Bb + \Ba \wedge \Bb.

In geometric algebra the vector product has a dot and wedge product split. In \R{3} you can write this as
$$\Ba \Bb = \Ba \cdot \Bb + I (\Ba \cross \Bb)$$, where $$I = \Be_1 \Be_2 \Be_3$$.

• Relativisitic energy (Einstein’s)
\label{eqn:formulas:200}
E = \frac{m c^2}{\sqrt{1 – (\Bv/c)^2}}.

• Cauchy contour integral relationships for the nth derivative
\label{eqn:formulas:220}
f^{(n)}(s) = \frac{n!}{2 \pi i} \int_C dz \frac{f(z)}{(z-s)^{n+1}}

• Maxwell’s equations
\label{eqn:formulas:240}
\begin{aligned}
\partial_\mu F^{\mu\nu} &= J^\nu \\
\epsilon^{\mu \nu \rho \sigma} \partial_\nu F_{\rho \sigma} &= 0.
\end{aligned}

I’m partial to the geometric algebra form of Maxwell’s equations $$\grad F = J$$, but that wouldn’t have looked as good on the shirt.

• Dirac equation
\label{eqn:formulas:260}
0 = \lr{ i \gamma^\mu \partial_\mu – m } \psi.

If you had to pick a set of important formulas on a tee-shirt, which ones would you pick?

## UPS twitter bot’s response to my blog post: complete nonsense.

I received the following response to my post about the latest customs brokerage extortion by UPS (charging us to destroy the first shipment of a package).  Clearly, the UPS Customer Support twitter feed is a bot.  Once provided with a non-standard answer it shut up for good.

## UPS: charging you to break your stuff.

May 25, 2018 Boycott UPS No comments , , ,

I have to admit that I hate UPS with a passion.  As a Canadian, if you ever want to purchase something from the United States, you have to pray that UPS isn’t the shipper, because if they are you are going to get screwed.  Now, let’s be perfectly clear.  By screwed, I don’t mean something that leads to a shuddering climactic orgasm, and a great afternoon nap.  Screwed by UPS means you are raped in the ass.  Think of yourself as a prisoner serving the first day of twenty years in maximum security, and UPS is the gang of Nazi skinheads oogling you as you are naked in the shower picking up the soap from the floor.

UPS runs a double payment scam where they leverage Canadian customs to charge you for the “service” of collecting any customs charges.  Their charges for this service are often more than the original shipping amount, and can be a large percentage of the total declared value of the item.  You may have thought that you (or the person sending the package) paid for shipping, but UPS collects on both ends, from both the shipper and the reciever.  It’s a really nice scam and I am sure it is immensely profitable.

Here’s the latest example:

UPS determined that $7.62+$14.20 was due to the Canadian government (which was too high), and then charged $36.85+$4.79 for the service of collecting this payment.  The total customs charge from UPS, including the duty is a whopping $63.46, which was 62% of the total value of the item in this case. This extortion can be handled by collecting the shipping slip from the UPS delivery guy, telling him that you’ll be self clearing, and then calling UPS and telling them that you’ll be self clearing the item. They then email you the forms that you need to take to the CBSA (Canadian Border Security Agency), which look like: You have two business days to complete the self clearing process, and for that time UPS will hold your package ransom. The self clearing process is a real pain in the ass to do, at least if you live in Markham, since the only CBSA office that handles this paperwork is all the way down near the airport, on 2720 Brittania Rd E. It’s a windy road that you are not inclined to believe you are allowed to be on. You also have to pass through a huge gate that has razor wire all over it, and looks like the armed guards just stepped away for a moment, but will be back to shoot you shortly for trespassing. Assuming you avoid getting shot or arrested for tresspassing, and find the office, you can then collect the following form: This is the B15 form that UPS requires to release the package to you. You email then this form, and they arrange to re-deliver the package to you after they receive the paperwork. We went through the pain of doing the self clearing for the package above (a glass sink), but after UPS left it at the door (without even ringing the doorbell), we discovered that they had destroyed the sink, which looked like this: This is not in a good state to install. We called UPS to collect the item that they destroyed and the manufacturer to ship a replacement item. This is unfortunately where things get really irritating. UPS now charged us for the service of having originally destroyed the first sink, by imposing a second brokerage handling fee for the replacement item. Since we’d paid the duties all ready, this final charge of$34.86 was for the difficult service of collecting $0.00 duty and GST for the Canadian government: My wife spend a half hour arguing with the poor UPS delivery guy (who is a pawn) that they had no right to charge us a second time for brokerage fees, when we’d already handled those the first time. She was ready to keep the item without paying this additional extortion, and deal with UPS management/customer-service after the fact, but the delivery guy said that the police would be called if that was done. They’ve basically got you by the balls. This time, we ended up paying their extortion, as we didn’t trust UPS not to destroy the item a second time, and have plumbers coming for install work starting next week. I don’t hold much hope that calling UPS management will result in any refund, since they are perfectly happy with customers perceiving them as a money grubbing company that behaves unethically, and is ready to shaft you at every possible opportunity. UPS’s new motto: “If we can’t screw you with brokerage fees the first time, we will destroy your stuff and charge you a second time to replace it.” We just paid$34.86 towards their new marketing campaign.

## Mainframe development: a story, chapter 1.

April 19, 2018 Mainframe No comments , , , , , , , , , , , , ,

Once upon a time, in a land far from any modern developers, were languages named COBOL and PL/I, which generated programs that were consumed by a beast known as Mainframe. Developers for those languages compiled and linked their applications huddled around strange luminous green screens and piles of hole filled papers while chanting vaguely latin sounding incantations like “Om-padre-JCL-beget-loadmodule-pee-dee-ess.”

In these ancient times, version control tools like git were not available. There was no notion of makefiles, so compilation and link was a batch process, with no dependency tracking, and no parallelism. Developers used printf-style debugging, logging trace information to files.  In order to keep the uninitiated from talking to the Mainframe, files were called datasets.  In order to use graphical editors, developers had to repeatedly feed their source to the Mainframe using a slave named ftp, while praying that the evil demon EBCDIC-conversion didn’t mangle their work. The next day, they could go back and see if Mainframe accepted their offering.

[TO BE CONTINUED.]

Incidentally, as of a couple days ago, I’ve now been working for LzLabs for 2 years.  My work is not yet released, nor announced, so I can’t discuss it here yet, but it can be summarized as really awesome.  I’m still having lots of fun with my development work, even if I have to talk in languages that the beast understands.

## Applied vanity press

Amazon’s createspace turns out to be a very cost effective way to get a personal color copy of large pdf (>250 pages) to markup for review. The only hassle was having to use their app to create cover art (although that took less time than commuting downtown to one of the cheap copy shops near the university.)

As a side effect, after I edit it, I’d have something I could actually list for sale.  Worldwide, I’d guess at least three people would buy it, that is, if they weren’t happy with the pdf version already available.

## The book.

A draft of my book: Geometric Algebra for Electrical Engineers, is now available. I’ve supplied limited distribution copies of some of the early drafts and have had some good review comments of the chapter I (introduction to geometric algebra), and chapter II (multivector calculus) material, but none on the electromagnetism content. In defense of the reviewers, the initial version of the electromagnetism chapter, while it had a lot of raw content, was pretty exploratory and very rough. It’s been cleaned up significantly and is hopefully now more reader friendly.

## Why I wrote this book.

I have been working on a part time M.Eng degree for a number of years. I wasn’t happy with the UofT ECE electromagnetics offerings in recent years, which have been inconsistently offered or unsatisfactory.  For example: the microwave circuits course which sounded interesting, and had an interesting text book, was mind numbing, almost entirely about Smith charts.  I had to go elsewhere to obtain the M.Eng degree requirements. That elsewhere was a project course.

I proposed a project to an electromagnetism project with the following goals

1. Perform a literature review of applications of geometric algebra to the study of electromagnetism.
2. Identify the subset of the literature that had direct relevance to electrical engineering.
3. Create a complete, and as compact as possible, introduction to the prerequisites required for a graduate or advanced undergraduate electrical engineering student to be able to apply geometric algebra to problems in electromagnetism. With those prerequisites in place, work through the fundamentals of electromagnetism in a geometric algebra context.

In retrospect, doing this project was a mistake. I could have done this work outside of an academic context without paying so much (in both time and money). Somewhere along the way I lost track of the fact that I enrolled on the M.Eng to learn (it provided a way to take grad physics courses on a part time schedule), and got side tracked by degree requirements. Basically I fell victim to a “I may as well graduate” sentiment that would have been better to ignore. All that coupled with the fact that I did not actually get any feedback from my “supervisor”, who did not even read my work (at least so far after one year), made this project-course very frustrating. On the bright side, I really like what I produced, even if I had to do so in isolation.

## Why geometric algebra?

Geometric algebra generalizes vectors, providing algebraic representations of not just directed line segments, but also points, plane segments, volumes, and higher degree geometric objects (hypervolumes.). The geometric algebra representation of planes, volumes and hypervolumes requires a vector dot product, a vector multiplication operation, and a generalized addition operation. The dot product provides the length of a vector and a test for whether or not any two vectors are perpendicular. The vector multiplication operation is used to construct directed plane segments (bivectors), and directed volumes (trivectors), which are built from the respective products of two or three mutually perpendicular vectors. The addition operation allows for sums of scalars, vectors, or any products of vectors. Such a sum is called a multivector.

The power to add scalars, vectors, and products of vectors can be exploited to simplify much of electromagnetism. In particular, Maxwell’s equations for isotropic media can be merged into a single multivector equation
\label{eqn:quaternion2maxwellWithGA:20}
\lr{ \spacegrad + \inv{c} \PD{t}{}} \lr{ \BE + I c \BB } = \eta\lr{ c \rho – \BJ },

where $$\spacegrad$$ is the gradient, $$I = \Be_1 \Be_2 \Be_3$$ is the ordered product of the three R^3 basis vectors, $$c = 1/\sqrt{\mu\epsilon}$$ is the group velocity of the medium, $$\eta = \sqrt{\mu/\epsilon}$$, $$\BE, \BB$$ are the electric and magnetic fields, and $$\rho$$ and $$\BJ$$ are the charge and current densities. This can be written as a single equation
\label{eqn:ece2500report:40}
\lr{ \spacegrad + \inv{c} \PD{t}{}} F = J,

where $$F = \BE + I c \BB$$ is the combined (multivector) electromagnetic field, and $$J = \eta\lr{ c \rho – \BJ }$$ is the multivector current.

Encountering Maxwell’s equation in its geometric algebra form leaves the student with more questions than answers. Yes, it is a compact representation, but so are the tensor and differential forms (or even the quaternionic) representations of Maxwell’s equations. The student needs to know how to work with the representation if it is to be useful. It should also be clear how to use the existing conventional mathematical tools of applied electromagnetism, or how to generalize those appropriately. Individually, there are answers available to many of the questions that are generated attempting to apply the theory, but they are scattered and in many cases not easily accessible.

Much of the geometric algebra literature for electrodynamics is presented with a relativistic bias, or assumes high levels of mathematical or physics sophistication. The aim of this work was an attempt to make the study of electromagnetism using geometric algebra more accessible, especially to other dumb engineering undergraduates like myself. In particular, this project explored non-relativistic applications of geometric algebra to electromagnetism. The end product of this project was a fairly small self contained book, titled “Geometric Algebra for Electrical Engineers”. This book includes an introduction to Euclidean geometric algebra focused on R^2 and R^3 (64 pages), an introduction to geometric calculus and multivector Green’s functions (64 pages), applications to electromagnetism (82 pages), and some appendices. Many of the fundamental results of electromagnetism are derived directly from the multivector Maxwell’s equation, in a streamlined and compact fashion. This includes some new results, and many of the existing non-relativistic results from the geometric algebra literature. As a conceptual bridge, the book includes many examples of how to extract familiar conventional results from simpler multivector representations. Also included in the book are some sample calculations exploiting unique capabilities that geometric algebra provides. In particular, vectors in a plane may be manipulated much like complex numbers, which has a number of advantages over working with coordinates explicitly.

## Followup.

In many ways this work only scratches the surface. Many more worked examples, problems, figures and computer algebra listings should be added. In depth applications of derived geometric algebra relationships to problems customarily tackled with separate electric and magnetic field equations should also be incorporated. There are also theoretical holes, topics covered in any conventional introductory electromagnetism text, that are missing. Examples include the Fresnel relationships for transmission and reflection at an interface, in depth treatment of waveguides, dipole radiation and motion of charged particles, bound charges, and meta materials to name a few. Many of these topics can probably be handled in a coordinate free fashion using geometric algebra. Despite all the work that is required to help bridge the gap between formalism and application, making applied electromagnetism using geometric algebra truly accessible, it is my belief this book makes some good first steps down this path.

The choice that I made to completely avoid the geometric algebra space-time-algebra (STA) is somewhat unfortunate. It is exceedingly elegant, especially in a relativisitic context. Despite that, I think that this was still a good choice from a pedagogical point of view, as most of the prerequisites for an STA based study will have been taken care of as a side effect, making that study much more accessible.

## Propublica’s IBM age discrimination investigation

March 22, 2018 Incoherent ramblings No comments , , , , ,

Not too long after I quit IBM for LzLabs in 2016, I was sent a copy of Pro-publica’s survey about age discrimination based firing and forced retirement at IBM. It appears that this survey was just the start of a very long investigation, and they’ve now published their story.

I wasn’t forced out of IBM, and am only ~45 years old, but at the time I had close to 20 years at IBM (including my student internship), and could see the writing on the wall. Technically skilled people with experience were expendable, and being fired or retired with gusto. To me it looked like 25 years at IBM was the firing threshold, unless you took the management path or did a lot of high visibility customer facing work.

IBM’s treatment of employees in the years leading up to when I quit was a major part of my decision to leave. I considered my position at IBM vulnerable for a number of reasons. One was my part time status (80% pay and hours), as I’d been slowly studying physics at UofT with a plan of a future science based job change. Another was that I was a work in the trenches kind of person that did not have the high visibility that looked like it was required for job security in the new IBM where the quarterly firing had gotten so pervasive that you could trip on the shrapnel.

Even after two years I still use “we” talking about my time as an IBMer working on DB2 LUW, as I worked with people that were awesome (some of which I still work with at LzLabs.) Despite now competing with IBM, I hope they stop shooting themselves in the gut by disposing of their skilled employees, and by treating people as rows in resource spreadsheets. It is hard to imagine that this will end well, and it’s too easy to visualize an IBM headstone sharing a plot with HP and Sun.

When I was recruited for LzLabs, my options seemed like continue working for IBM for <= 5 more years before I too got the ax, or to ride into the wild west working as a contractor for a company that was technically still a “startup”. Many startups don’t make it 5 years before folding, so even in the worst case it looked like no bigger risk than IBM, but I thought I was going to have a lot of fun on the ride. LzLabs was just coming out of stealth mode when I was interviewed, but had an astounding ~100 people working at that point! Salaries add up, so it was clear to me that LzLabs was not really a startup in the conventional sense of the word.

It is amusing to read the Pro-publica article now, as most of LzLabs employees are probably over 65. At 45 I’ve been singled out in staff meetings as the “young guy”. Many of the LzLabs employees are technically scary, and know the mainframe cold. I once wrote a simple PowerPC disassembler, but that’s a different game than “disassembling” 390 hex listings by chunking it into various fixed size blocks hex sequences in an editor so it can be “read” by eye!

In less than one month I’ll have been working for LzLabs for 2 years, about six months of which was a contractor before LzLabs Canada was incorporated. Two years ago, if you had mentioned JCL, LE, PL/I, COBOL, QSAM or VSAM (to name a few) to me, I’d have known that seeing COBOL is a good reason to get to an eye wash station pronto (it still is), but would not have even recognized the rest. It’s been fun learning along the way, and I continually impress myself with the parts that I’ve been adding to the LzLabs puzzle. Our technology is amazing and I think that we are going to really kick some butt in the marketplace.

## Potential solutions to the static Maxwell’s equation using geometric algebra

When neither the electromagnetic field strength $$F = \BE + I \eta \BH$$, nor current $$J = \eta (c \rho – \BJ) + I(c\rho_m – \BM)$$ is a function of time, then the geometric algebra form of Maxwell’s equations is the first order multivector (gradient) equation
\label{eqn:staticPotentials:20}

While direct solutions to this equations are possible with the multivector Green’s function for the gradient
\label{eqn:staticPotentials:40}
G(\Bx, \Bx’) = \inv{4\pi} \frac{\Bx – \Bx’}{\Norm{\Bx – \Bx’}^3 },

the aim in this post is to explore second order (potential) solutions in a geometric algebra context. Can we assume that it is possible to find a multivector potential $$A$$ for which
\label{eqn:staticPotentials:60}

is a solution to the Maxwell statics equation? If such a solution exists, then Maxwell’s equation is simply
\label{eqn:staticPotentials:80}

which can be easily solved using the scalar Green’s function for the Laplacian
\label{eqn:staticPotentials:240}
G(\Bx, \Bx’) = -\inv{\Norm{\Bx – \Bx’} },

a beastie that may be easier to convolve than the vector valued Green’s function for the gradient.

It is immediately clear that some restrictions must be imposed on the multivector potential $$A$$. In particular, since the field $$F$$ has only vector and bivector grades, this gradient must have no scalar, nor pseudoscalar grades. That is
\label{eqn:staticPotentials:100}

This constraint on the potential can be avoided if a grade selection operation is built directly into the assumed potential solution, requiring that the field is given by
\label{eqn:staticPotentials:120}

However, after imposing such a constraint, Maxwell’s equation has a much less friendly form
\label{eqn:staticPotentials:140}

Luckily, it is possible to introduce a transformation of potentials, called a gauge transformation, that eliminates the ugly grade selection term, and allows the potential equation to be expressed as a plain old Laplacian. We do so by assuming first that it is possible to find a solution of the Laplacian equation that has the desired grade restrictions. That is
\label{eqn:staticPotentials:160}
\begin{aligned}
\end{aligned}

for which $$F = \spacegrad A’$$ is a grade 1,2 solution to $$\spacegrad F = J$$. Suppose that $$A$$ is any formal solution, free of any grade restrictions, to $$\spacegrad^2 A = J$$, and $$F = \gpgrade{\spacegrad A}{1,2}$$. Can we find a function $$\tilde{A}$$ for which $$A = A’ + \tilde{A}$$?

Maxwell’s equation in terms of $$A$$ is
\label{eqn:staticPotentials:180}
\begin{aligned}
J
\end{aligned}

or
\label{eqn:staticPotentials:200}

This non-homogeneous Laplacian equation that can be solved as is for $$\tilde{A}$$ using the Green’s function for the Laplacian. Alternatively, we may also solve the equivalent first order system using the Green’s function for the gradient.
\label{eqn:staticPotentials:220}

Clearly $$\tilde{A}$$ is not unique, as we can add any function $$\psi$$ satisfying the homogeneous Laplacian equation $$\spacegrad^2 \psi = 0$$.

In summary, if $$A$$ is any multivector solution to $$\spacegrad^2 A = J$$, that is
\label{eqn:staticPotentials:260}
A(\Bx)
= \int dV’ G(\Bx, \Bx’) J(\Bx’)
= -\int dV’ \frac{J(\Bx’)}{\Norm{\Bx – \Bx’} },

then $$F = \spacegrad A’$$ is a solution to Maxwell’s equation, where $$A’ = A – \tilde{A}$$, and $$\tilde{A}$$ is a solution to the non-homogeneous Laplacian equation or the non-homogeneous gradient equation above.

### Integral form of the gauge transformation.

Additional insight is possible by considering the gauge transformation in integral form. Suppose that
\label{eqn:staticPotentials:280}
A(\Bx) = -\int_V dV’ \frac{J(\Bx’)}{\Norm{\Bx – \Bx’} } – \tilde{A}(\Bx),

is a solution of $$\spacegrad^2 A = J$$, where $$\tilde{A}$$ is a multivector solution to the homogeneous Laplacian equation $$\spacegrad^2 \tilde{A} = 0$$. Let’s look at the constraints on $$\tilde{A}$$ that must be imposed for $$F = \spacegrad A$$ to be a valid (i.e. grade 1,2) solution of Maxwell’s equation.
\label{eqn:staticPotentials:300}
\begin{aligned}
F
&=
-\int_V dV’ \lr{ \spacegrad \inv{\Norm{\Bx – \Bx’} } } J(\Bx’)
&=
\int_V dV’ \lr{ \spacegrad’ \inv{\Norm{\Bx – \Bx’} } } J(\Bx’)
&=
\int_V dV’ \spacegrad’ \frac{J(\Bx’)}{\Norm{\Bx – \Bx’} } – \int_V dV’ \frac{\spacegrad’ J(\Bx’)}{\Norm{\Bx – \Bx’} }
&=
\int_{\partial V} dA’ \ncap’ \frac{J(\Bx’)}{\Norm{\Bx – \Bx’} } – \int_V \frac{\spacegrad’ J(\Bx’)}{\Norm{\Bx – \Bx’} }
\end{aligned}

Where $$\ncap’ = (\Bx’ – \Bx)/\Norm{\Bx’ – \Bx}$$, and the fundamental theorem of geometric calculus has been used to transform the gradient volume integral into an integral over the bounding surface. Operating on Maxwell’s equation with the gradient gives $$\spacegrad^2 F = \spacegrad J$$, which has only grades 1,2 on the left hand side, meaning that $$J$$ is constrained in a way that requires $$\spacegrad J$$ to have only grades 1,2. This means that $$F$$ has grades 1,2 if
\label{eqn:staticPotentials:320}
= \int_{\partial V} dA’ \frac{ \gpgrade{\ncap’ J(\Bx’)}{0,3} }{\Norm{\Bx – \Bx’} }.

The product $$\ncap J$$ expands to
\label{eqn:staticPotentials:340}
\begin{aligned}
\ncap J
&=
&=
\ncap \cdot (-\eta \BJ) + \gpgradethree{\ncap (-I \BM)} \\
&=- \eta \ncap \cdot \BJ -I \ncap \cdot \BM,
\end{aligned}

so
\label{eqn:staticPotentials:360}
=
-\int_{\partial V} dA’ \frac{ \eta \ncap’ \cdot \BJ(\Bx’) + I \ncap’ \cdot \BM(\Bx’)}{\Norm{\Bx – \Bx’} }.

Observe that if there is no flux of current density $$\BJ$$ and (fictitious) magnetic current density $$\BM$$ through the surface, then $$F = \spacegrad A$$ is a solution to Maxwell’s equation without any gauge transformation. Alternatively $$F = \spacegrad A$$ is also a solution if $$\lim_{\Bx’ \rightarrow \infty} \BJ(\Bx’)/\Norm{\Bx – \Bx’} = \lim_{\Bx’ \rightarrow \infty} \BM(\Bx’)/\Norm{\Bx – \Bx’} = 0$$ and the bounding volume is taken to infinity.

# References

## Generalizing Ampere’s law using geometric algebra.

The question I’d like to explore in this post is how Ampere’s law, the relationship between the line integral of the magnetic field to current (i.e. the enclosed current)
\label{eqn:flux:20}
\oint_{\partial A} d\Bx \cdot \BH = -\int_A \ncap \cdot \BJ,

generalizes to geometric algebra where Maxwell’s equations for a statics configuration (all time derivatives zero) is
\label{eqn:flux:40}

where the multivector fields and currents are
\label{eqn:flux:60}
\begin{aligned}
F &= \BE + I \eta \BH \\
J &= \eta \lr{ c \rho – \BJ } + I \lr{ c \rho_\txtm – \BM }.
\end{aligned}

Here (fictitious) the magnetic charge and current densities that can be useful in antenna theory have been included in the multivector current for generality.

My presumption is that it should be possible to utilize the fundamental theorem of geometric calculus for expressing the integral over an oriented surface to its boundary, but applied directly to Maxwell’s equation. That integral theorem has the form
\label{eqn:flux:80}
\int_A d^2 \Bx \boldpartial F = \oint_{\partial A} d\Bx F,

where $$d^2 \Bx = d\Ba \wedge d\Bb$$ is a two parameter bivector valued surface, and $$\boldpartial$$ is vector derivative, the projection of the gradient onto the tangent space. I won’t try to explain all of geometric calculus here, and refer the interested reader to [1], which is an excellent reference on geometric calculus and integration theory.

The gotcha is that we actually want a surface integral with $$\spacegrad F$$. We can split the gradient into the vector derivative a normal component
\label{eqn:flux:160}

so
\label{eqn:flux:100}
=
\int_A d^2 \Bx \boldpartial F
+
\int_A d^2 \Bx \ncap \lr{ \ncap \cdot \spacegrad } F,

so
\label{eqn:flux:120}
\begin{aligned}
\oint_{\partial A} d\Bx F
&=
\int_A d^2 \Bx \lr{ J – \ncap \lr{ \ncap \cdot \spacegrad } F } \\
&=
\int_A dA \lr{ I \ncap J – \lr{ \ncap \cdot \spacegrad } I F }
\end{aligned}

This is not nearly as nice as the magnetic flux relationship which was nicely split with the current and fields nicely separated. The $$d\Bx F$$ product has all possible grades, as does the $$d^2 \Bx J$$ product (in general). Observe however, that the normal term on the right has only grades 1,2, so we can split our line integral relations into pairs with and without grade 1,2 components
\label{eqn:flux:140}
\begin{aligned}
&=
\int_A dA \gpgrade{ I \ncap J }{0,3} \\
&=
\int_A dA \lr{ \gpgrade{ I \ncap J }{1,2} – \lr{ \ncap \cdot \spacegrad } I F }.
\end{aligned}

Let’s expand these explicitly in terms of the component fields and densities to check against the conventional relationships, and see if things look right. The line integrand expands to
\label{eqn:flux:180}
\begin{aligned}
d\Bx F
&=
d\Bx \lr{ \BE + I \eta \BH }
=
d\Bx \cdot \BE + I \eta d\Bx \cdot \BH
+
d\Bx \wedge \BE + I \eta d\Bx \wedge \BH \\
&=
d\Bx \cdot \BE
– \eta (d\Bx \cross \BH)
+ I (d\Bx \cross \BE )
+ I \eta (d\Bx \cdot \BH),
\end{aligned}

the current integrand expands to
\label{eqn:flux:200}
\begin{aligned}
I \ncap J
&=
I \ncap
\lr{
\frac{\rho}{\epsilon} – \eta \BJ + I \lr{ c \rho_\txtm – \BM }
} \\
&=
\ncap I \frac{\rho}{\epsilon} – \eta \ncap I \BJ – \ncap c \rho_\txtm + \ncap \BM \\
&=
\ncap \cdot \BM
+ \eta (\ncap \cross \BJ)
– \ncap c \rho_\txtm
+ I (\ncap \cross \BM)
+ \ncap I \frac{\rho}{\epsilon}
– \eta I (\ncap \cdot \BJ).
\end{aligned}

We are left with
\label{eqn:flux:220}
\begin{aligned}
\oint_{\partial A}
\lr{
d\Bx \cdot \BE + I \eta (d\Bx \cdot \BH)
}
&=
\int_A dA
\lr{
\ncap \cdot \BM – \eta I (\ncap \cdot \BJ)
} \\
\oint_{\partial A}
\lr{
– \eta (d\Bx \cross \BH)
+ I (d\Bx \cross \BE )
}
&=
\int_A dA
\lr{
\eta (\ncap \cross \BJ)
– \ncap c \rho_\txtm
+ I (\ncap \cross \BM)
+ \ncap I \frac{\rho}{\epsilon}
-\PD{n}{} \lr{ I \BE – \eta \BH }
}.
\end{aligned}

This is a crazy mess of dots, crosses, fields and sources. We can split it into one equation for each grade, which will probably look a little more regular. That is
\label{eqn:flux:240}
\begin{aligned}
\oint_{\partial A} d\Bx \cdot \BE &= \int_A dA \ncap \cdot \BM \\
\oint_{\partial A} d\Bx \cross \BH
&=
\int_A dA
\lr{
– \ncap \cross \BJ
+ \frac{ \ncap \rho_\txtm }{\mu}
– \PD{n}{\BH}
} \\
\oint_{\partial A} d\Bx \cross \BE &=
\int_A dA
\lr{
\ncap \cross \BM
+ \frac{\ncap \rho}{\epsilon}
– \PD{n}{\BE}
} \\
\oint_{\partial A} d\Bx \cdot \BH &= -\int_A dA \ncap \cdot \BJ \\
\end{aligned}

The first and last equations could have been obtained much more easily from Maxwell’s equations in their conventional form more easily. The two cross product equations with the normal derivatives are not familiar to me, even without the fictitious magnetic sources. It is somewhat remarkable that so much can be packed into one multivector equation:
\label{eqn:flux:260}
\oint_{\partial A} d\Bx F
=
I \int_A dA \lr{ \ncap J – \PD{n}{F} }.

# References

[1] A. Macdonald. Vector and Geometric Calculus. CreateSpace Independent Publishing Platform, 2012.