Wolfram Alpha:

```Vector Calculus Primer
----------------------

Let φ be a scalar and F be a vector, F = <P,Q,R)

∇ = (∂/∂x)i + (∂/∂y)j + (∂/∂z)k

= (∂/∂x,∂/∂y,∂/∂z)

= operator

= (∂φ/∂x)i + (∂φ/∂y)j + (∂φ/∂z)k

= a vector

Curl of F = ∇ x F

= (∂R/∂y - ∂Q/∂z)i + (∂P/∂z - ∂R/∂x)j

+ (∂Q/∂x - ∂P/∂y)k

|  i    j    k   |
= | ∂/∂x ∂/∂y ∂/∂z |
|  P    Q    R   |

= a vector

The curl of a vector field is the amount of "rotation"
or angular momentum of the contents of given region of
space.

Divergence of F = ∇.F

-              -  - -
= | ∂/∂x ∂/∂y ∂/∂z || P |
-              - | Q |
| R |
- -

= ∂P/∂x + ∂Q/∂y + ∂R/∂z

= a scalar

The divergence measures how much a vector field
spreads out or diverges from a given point.

Curl of the gradient of φ:  ∇ x (∇φ) = 0

Proof:

|   i      j      k   |
|  ∂/∂x   ∂/∂y   ∂/∂z |
| ∂φ/∂x  ∂φ/∂y  ∂φ/∂z |

= (∂2φ/∂y∂z - ∂2φ/∂z∂y)i + (∂2φ/∂x∂z - ∂2φ/∂z∂x)j

+ (∂2φ/∂x∂y - ∂2φ/∂y∂x)k

= 0

This means the gradient of a scalar field has no
rotation.

Divergence of the curl of F:  ∇.(∇ x F) = 0

Proof:

-              -  -             -
| ∂/∂x ∂/∂y ∂/∂z || ∂R/∂y - ∂Q/∂z |
-              - | ∂P/∂z - ∂R/∂x |
| ∂Q/∂x - ∂P/∂y |
-             -

= (∂/∂x)(∂R/∂y - ∂Q/∂z) + (∂/∂y)(∂P/∂z - ∂R/∂x)j

+ (∂/∂z)(∂Q/∂x - ∂P/∂y)k

= ∂2R/∂x∂y - ∂2Q/∂x∂z + ∂2P/∂y∂z - ∂2R/∂y∂x

+ ∂2Q/∂z∂x - ∂2P/∂z∂y

= 0

Divergence of the gradient of φ:  ∇.(∇φ) = ∇2φ

Proof:

-              -  -     -
| ∂/∂x ∂/∂y ∂/∂z || ∂φ/∂x |
-              - | ∂φ/∂y |
| ∂φ/∂z |
-     -

= (∂2φ/∂x) + (∂2φ/∂y) + (∂2φ/∂z)

= a scalar

Curl of the curl of F:  ∇ x (∇ x F) = ∇(∇.F) - ∇2F

Proof

|       i              j              k       |
|      ∂/∂x           ∂/∂y           ∂/∂z     |
| ∂R/∂y - ∂Q/∂z  ∂P/∂z - ∂R/∂x  ∂Q/∂x - ∂P/∂y |

= [∂2Q/∂y∂x + ∂2R/∂z∂x - ∂2P/∂y2 - ∂2P/∂z2

- ∂2P/∂x2 + ∂2P/∂x2]i
----------------
Dummy term

= [∂2Q/∂y∂x + ∂2R/∂z∂x + ∂2P/∂x2

- (∂2P/∂y2 + ∂2P/∂z2 + ∂2P/∂x2)]i

= [(∂/∂x)(∂Q/∂y + ∂R/∂z + ∂P/∂x)

- (∂2P/∂y2 + ∂2P/∂z2 + ∂2P/∂x2)]i

= [(∂/∂x)(∂Q/∂y + ∂R/∂z + ∂P/∂x)

- (∂2P/∂y2 + ∂2P/∂z2 + ∂2P/∂x2)]i

+ [(∂/∂y)(∂Q/∂y + ∂R/∂z + ∂P/∂x)

- (∂2Q/∂y2 + ∂2Q/∂z2 + ∂2Q/∂x2)]j

+ [(∂/∂z)(∂Q/∂y + ∂R/∂z + ∂P/∂x)

- (∂2R/∂y2 + ∂2R/∂z2 + ∂2R/∂x2)]k

Now, (∂/∂x)i + (∂/∂y)j + (∂/∂z)k = ∇ and,

-              -  - -
(∂Q/∂y + ∂R/∂z + ∂P/∂x) = | ∂/∂x ∂/∂y ∂/∂z || P |
-              - | Q |
| R |
- -
= ∇.F and,

[∂2P/∂y2 + ∂2P/∂z2 + ∂2P/∂x2]i + [...]j + [...]k = ∇2F

Therefore,

∇ x (∇ x F) = ∇(∇.F) - ∇2φ  Q.E.D

Lorentz Force Law
-----------------

In general, the force is defined as the sum of
the electric force and the magnetic force as:

F  = q(E + v x B) where v is the velocity

= q(E + vBsinθ) where θ is the angle between
v and B

= q(E + {Fx + Fy + Fz})

= q(E + {(vyBz - vzBy) + (vzBx - vxBz)

+ (vxBy - vyBx)})

++++++++
----------
+ ^   E Field:
|E  | |F  The direction of the force
v   v -   is parallel to the field.
----------
--------

N
----------
q.---->v
|B       B Field:
v        The direction of the force
F        is determined by the Right
----------   Hand Rule.
S

Right Hand Rule
---------------

F
|  /B
| /
|/
q -----v

Place thumb in direction of v, fingers in direction
of B, palm in direction of F for +ve charge.  Do
the opposite for -ve charge. The RHR is implicit
in the component representation of the cross product.
Thus, for a +ve charge, B in the z direction and v
in the x direction we get:

F = q{(vyBz - vzBy) + (vzBx - vxBz) + (vxBy - vyBx)}

=> Fy = -qvxBz

Which is in accordance with the RHR.

Maxwell's Equations
-------------------

Maxwell’s equations explain how the electric charges
and electric currents produce magnetic and electric
fields.  The equations describe how the electric
field can create a magnetic field and vice versa.
They are the set of 4 partial differential equations,
along with the Lorentz force law, that form the
foundation of classical electrodynamics, electric
circuits and classical optics.  The equations can be
written in both integral and differential form.

Gauss's Law for Electricity
---------------------------

Maxwell first equation is based on the Gauss's law
which states that the closed surface integral of
electric flux density is always equal to charge
enclosed by that surface.

∯E.dS = Q/ε0

Q = ∭ρdV

∯E.dS = (1/ε0)∭ρdV
S              V

Now,

∭∇.EdV = ∯E.dS  (Divergence theorem)
V         S
= (1/ε0)∭ρdV
V
Therefore,

∭(∇.E - ρ/ε)dV = 0
V

V cannot be 0.  Therefore:

∇.E - ρ/ε = 0

Gauss's Law for Magnetism
-------------------------

Maxwell's second equation is based on Gauss's law
of magnetism which states that the net magnetic
flux out of any closed surface is zero.  This is
the statement that magnetic monopole sources that
are analogous to charge in the electric field case,
cannot exist.  For a magnetic dipole, the magnetic
flux directed inward toward the south pole will equal
the flux outward from the north pole. Therefore, the
net flux will always be zero for dipole sources.

From the electric case:

∯E.dS = ρ/ε0
S

If we replace E with B and set ρ = 0 (no magnetic
charge (monopoles)), we get:

∯B.dS = 0
S

Now,

∭∇.BdV = ∯B.dS  (Divergence theorem)
V         S

= 0

V cannot be 0.  Therefore:

∇.B = 0

-----------------------------------------------------

Maxwell’s 3rd equation is derived from Faraday’s laws
of Electromagnetic Induction.

The magnetic flux, φB = BS  where S is an area
perpendicular to B.  This can be put in integral form
as:

φB = ∯B.dS
S

The EMF, V, is given by:

V = -dφB/dt

EMF in a circuit is the net work done by the driving
force per unit charge in the circuit. The driving
force in a circuit must come from electric field
since magnetic force on a moving charge is perpendicular
to velocity, and hence, can do no work.  This is a
consequence of the Lorentz force law, F = q(E + v x B).
Since electric field is equal to the force per unit
charge, the induced EMF will be equal to the line
integral of the electric field around the circuit.
The line integral calculated in the direction of
the electric field gives a positive value for the
EMF. Therefore,

V = Work done = force x dist = ∮E.dl
C

Therefore,

∮E.dl = -dφB/dt = -d/dt{∯B.dS}
C                       S
= -∯(∂B/∂t).dS)
S
Now,

∮E.dl = ∯(∇ x E).dS  (Stoke's theorem)
C       S

Therefore,

-∯(∂B/∂t).dS) = ∯(∇ x E).dS
S               S

or,

∯(∇ x E + ∂B/∂t).dS = 0
S

S cannot be 0.  Therefore:

∇ x E + ∂B/∂t = 0

Ampere's Law with Maxwell Correction
------------------------------------

Maxwell's 4th equation is based on Ampere’s circuit
law.  Ampere's law states that the magnetic field
in space around an electric current is proportional
to the electric current which serves as its source,
just as the electric field in space is proportional
to the charge which serves as its source.  Ampere's
Law states that for any closed loop path, the sum of
the length elements times the magnetic field in the
direction of the length element is equal to the
permeability times the electric current enclosed in
the loop.

∮B.dl = μ0I
C
Now, I = ∯J.dS
S
Therefore,

∮B.dl = ∯μ0J.dS
C       S

∮B.dl = ∯(∇ x B).dS   (Stoke's theorem)
C       S

∯μ0J.dS = ∯(∇ x B).dS
S          S
or,

∯(∇ x B - μ0j).dS = 0
S

S cannot be 0.  Therefore:

∇ x B - μ0j = 0

With Maxwell's correction this becomes:

∇ x B - μ0(j + ε0∂E/∂t) = 0

The displacement current correction was added to
Ampere's law by Maxwell to explain the presence of
a magnetic field between capacitor plates even
though no current is threading through the path.

Summary
-------

The 4 Maxwell equations in integral form are:

∫E.dA = Q/ε0

∫B.dA = 0

Ε = ∫E.dl = -∂φB/∂t

∫B.dl = μ0I + μ0ε0∂φE/∂t

The correspnding equations in differential form are:

∇.E = ρ/ε0

∇.B = 0

∇ x E = -∂B/∂t

∇ x B = μ0J + μ0ε0∂E/∂t

Both the differential and integral formulations
are useful. The integral formulation can often
be used to simply and directly calculate fields
from symmetric distributions of charges and
currents. On the other hand, the differential
formulation is a more natural starting point for
calculating the fields in more complicated (less
symmetric) situations.

Electromagnetic Wave Equation in Free Space
-------------------------------------------

To obtain the electromagnetic wave equation in a
free space vacuum we set ρ = J = 0.  This gives:

∇.E = 0

∇.B = 0

∇ x E = -∂B/∂t    ... 1.

∇ x B = μ0ε0∂E/∂t  ... 2.

From 1. ∇ x (∇ x E) = -∂(∇ x B)/∂t

Substitute 2 into 1:

∇ x (∇ x E) = (-∂/∂t)(μ0J + μ0ε0∂E/∂t)

= -μ0ε0∂2E/∂t2

Use the identity ∇ x (∇ x E) = -∇2E + ∇(∇.E)

But ∇.E = 0.  Thus,

∇2E = μ0ε0∂2E/∂t2

One solution is E = E0sin{2π(x - vt)/λ}

check:

∇2E = -α2sin{α(x - vt)}  where α = 2π/λ

μ0ε0∂2E/∂t2 = -μ0ε0α2v2sin{α(x - vt)}

From which we get:

v2 = 1/μ0ε0 = c2

Therefore,

∇2E = (1/c2)∂2E/∂t2

Similarly, from 2.

∇ x (∇ x B) = ∇ x μ0ε0∂E/∂t

= ∇ x μ0ε0∂E/∂t

= μ0ε0∂(∇ x E)/∂t

= μ0ε0∂(-∂B/∂t)/∂t using 1.

∇(∇.B) - ∇2B = μ0ε0∂(-∂B/∂t)/∂t

But ∇.B = 0 so:

-∇2B =  μ0ε0∂(-∂B/∂t)/∂t

or,

∇2B =  μ0ε0∂2B/∂t2

This has a solution similar to E:

B = B0sin{2π(x - vt)/λ}

Light is an self sustaining e-m wave!  Changing E
field => changing B field => changing E field. The
B field is perpendicular to the E field and both
have the same phase (i.e. zero phase difference).

y
|             --> propagation
|
|       E           |
|       |           |
|    E d|...........|c E+dE
|       :     B     : dy
|      a|...........|b
o-------+-----------+-------->
/       /x          /  x+dx
/       /           /
/       /           /B+dB
z        B          /

b       c        d       a
∮E.dl + ∮E.dl + ∮E.dl + ∮E.dl = -dφB/dt
a       b        c       d

0 + (E + dE)dy + 0 - Edy = -d(Bdxdy)/dt

dE = -d(Bdx)/dt

dE/dx = -dB/dt

Therefore,

dE0sin{2π(x - vt)/λ}/dx = -dB0sin{2π(x - vt)/λ}/dt

E0(2π/λ)cos{2π(x - vt)/λ} = B0(2πv/λ)cos{2π(x - vt)/λ}

∴ E0 = B0v

or,

v = c = E0/B0

Thus, the ratio of the electric to magnetic
fields in an electromagnetic wave in free space
is always equal to the speed of light.

Energy density of E field: UE = ε0E2/2 J/m3

This is derived from the energy stored in a
capacitor.

Energy density of B field: UB = B2/2μo J/m3

This is derived from the energy stored in a
solenoid.

UTotal = ε0E2/2 + B2/2μo

Now B = E/c so:

UB = E2/2μ0c2

Now, c2 = 1/ε0μ0 so

UB = E2ε0μ0/2μ0

=  E2/2ε0

Thus, we can write UTotal in the following
equivalent forms:

UTotal = ε0E2

≡ B2/μo ... substituting E = cB in the
UE equation.

≡ cε0EB

The intensity can be found by taking the energy
density (energy per unit volume) at a point in
space and multiplying it by the velocity at which
the energy is moving.  The resulting vector has
the units of power divided by area.

I0 = cU0 = cε0E02/2 + cB02/2μo

= cε0E02

≡ cB02/μo

≡ c2ε0E0B0

Now,

c2 = 1/(μ0ε0)

Therefore,

I0 = {1/(μ0ε0)}{ε0E0B0}

= (1/μ0)EB

This is the POYNTING VECTOR.  This more formally
defined as:
-
S = (1/μ0)ExB

= (1/μ0)EBsinθ

= (1/μ0)EB since E and B are orthogonal

The Poynting vector represents the rate of energy
transport per unit area (energy flux) in W per m2).
The modulus of S, |S| is equal to the intensity, I.

All electromagnetic waves (radio, light, X-rays, etc.)
obey the inverse-square law thus the intensity of an
electromagnetic wave is proportional to the inverse of
the square of the distance from a point source.

ERMS = E0/√2 and BRMS = B0/√2

IAverage = cε0ERMS2

= cBRMS2/μo

Photons
-------
In the quantum description, the electromagnetic field
is an observable property of photons.  Photons can be
thought of as mini E/M wave segments that consists of
an oscillating electric field component, E, and an
oscillating magnetic field component, B. The electric
and magnetic fields are orthogonal (perpendicular) to
each other, and they are orthogonal to the direction
of propogation of the photon. The E and B fields flip
direction as the photon travels.  The number of
oscillations that occur in one second is the frequency,
f.  The superposition of a sufficiently large number
of photons has the characteristics of a continuous
electromagnetic wave. The energy of the photon is given
by E = hf and a wavelength is equal to c/f.  There is a
correspondence between the energy of a photon stream
and the Poynting vector in the classical approach.

Laplace's and Poisson's Equations
---------------------------------

Maxwell's equations again:

∇.E = -ρ/ε0

∇.B = 0

∇ x E = -∂B/∂t

∇ x B = μ0J + μ0ε0∂E/∂t

Static Case (Electrostatics)
----------------------------

Electric Field:

∇ x E = 0

Using the identity that ∇ x (-∇φ) = 0 we can
imply that,

E = -∇φ where φ is the ELECTRIC or SCALAR POTENTIAL

Therefore, ∇.E = ρ/ε0 becomes

∇.(∇φ) = -ρ/ε0

∇2φ = -ρ/ε0

This is POISSON'S's equation.

In a charge free space:

∇2φ = 0

This is LAPLACE's equation.

Magnetic Field:

∇.B = 0

Using the identity that ∇.(∇ x A) = 0 we can imply
that B = ∇ x A  where we define A as the MAGNETIC
or VECTOR POTENTIAL.

∇ x B = μ0J  (static case:  μ0ε0∂E/∂t = 0)

∴ ∇ x (∇ x A) = μ0J

∴ ∇(∇.A) - ∇2A = μ0J

We can simplify this equation by 'fixing' the gauge.
If we set ∇.A = 0 (the Coulomb gauge) we get:

∇2A = -μ0J

Dynamic Case (Electrodynamics)
------------------------------

Electric Field:

∇ x E = -∂B/∂t

= -∂(∇ x A)/∂t

∇ x E + ∂(∇ x A)/∂t = 0

Which can be written as,

∇ x (E + ∂A/∂t) = 0

Using the identity that ∇ x (∇φ) = 0 we can imply
that:

∇φ = (E + ∂A/∂t)

Therefore,

E = -∇φ - ∂A/∂t

or

∇φ = -E - ∂A/∂t

∇.(∇φ) = -∇.E - ∇.(∂A/∂t)

∇2φ = -ρ/ε0 - ∂(∇.A)/∂t

Magnetic Field:

∇ x B = μ0J + μ0ε0∂E/∂t

∴ ∇ x (∇ x A) = μ0J + μ0ε0∂(-∇φ - ∂A/∂t)/∂t

∴ -∇2A = -∇(∇.A) + μ0J - μ0ε0∇(∂φ/∂t) - μ0ε0∂2A/∂t2

∴ -∇2A = μ0J - ∇[∇.A + μ0ε0(∂φ/∂t)] - μ0ε0∂2A/∂t2

∴ ∇2A = -μ0J + ∇[∇.A + μ0ε0(∂φ/∂t)] + μ0ε0∂2A/∂t2

We can simplify this equation by 'fixing' the gauge.
If we set ∇.A + μ0ε0∂φ/∂t = 0 we get:

∇2A - μ0ε0∂2A/∂t2 = -μ0J

We can also apply the same gauge condition to,

∇2φ = -ρ/ε0 - ∂(∇.A)/∂t

Which was derived above.  We get:

∇2φ = -ρ/ε0 - ∂(-μ0ε0∂φ/∂t)/∂t  (∇.A = -μ0ε0∂φ/∂t)

∴ ∇2φ = -ρ/ε0 + μ0ε0∂2φ/∂t2

In summary,

∇2A - μ0ε0∂2A/∂t2 = -μ0J

and

∇2φ - μ0ε0∂2φ/∂t2 = -ρ/ε0

These are Maxwell's equations in terms of the scalar
and vector potentials.  φ and A make up 4 functions
in total (1 for the scalar function and 1 for each
component of A).  This is a simplification over the
original equations, which make up 6 functions (3 for
each component of E and B).  Notice that they reduce
to the familiar static equations when A and φ do
not depend on time.

Gauge Transformations
---------------------

The gauge referred to above is called the LORENZ GAUGE
(not to be confused with Lorentz).

∇.A + μ0ε0∂φ/∂t = 0

∇.A' + μ0ε0∂φ'/∂t = ∇.A + ∇2λ + μ0ε0∂φ/∂t - μ0ε0∂2λ/∂t2 = 0

∴ ∇2λ - μ0ε0∂2λ/∂t2 = ∇.A + μ0ε0∂φ/∂t

So as long as we choose λ that meets the requirement
that,

∇2λ - μ0ε0∂2λ/∂t2 = 0

the Lorenz requirement will be satisfied.

The Lorenz gauge is very useful in electrodynamics
because of the simple relations it leads to for A
and φ.

There is another gauge that simplifies relations in
electrostatics.  This is called the COULOMB GAUGE.
Consider:

A' = A + ∇λ

∴ ∇ x A' = ∇ x A + ∇ x (∇λ)

= ∇ x A since ∇ x (∇λ) = 0

∇.A' = ∇.A + ∇.(∇λ)

= ∇.A + ∇2λ

If λ is chosen such that ∇2λ = -∇.A then ∇.A' = 0.

```