# Study Maxwell’s Equations

Derive the wave equation for a magnetic field from Maxwell's equations.

Enter Maxwell's equations in natural LorentzHeaviside units.

 In[1]:= XInactivate[{gaussE = Div[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == \[Rho][x, y, z, t], gaussB = Div[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == 0, faraday = Curl[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == -D[\[ScriptCapitalB][x, y, z, t], t], ampere = Curl[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == j[x, y, z, t] + D[\[ScriptCapitalE][x, y, z, t], t]}, Div | Curl | D];

Create a nicely formatted table of the equations.

Take the curl of Ampere's law in vacuum ( and ).

 In[3]:= XInactive[Curl][#, {x, y, z}] & /@ ampere /. j -> (0 &)
 Out[3]=

Interchange order of differentiation.

 In[4]:= XInactive[Curl][#, {x, y, z}] & /@ ampere /. j -> (0 &); % /. Inactivate[Curl[D[v_, t_], x_] :> D[Curl[v, x], t]]
 Out[4]=

 In[5]:= XInactivate[{gaussE = Div[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == \[Rho][x, y, z, t], gaussB = Div[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == 0, faraday = Curl[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == -D[\[ScriptCapitalB][x, y, z, t], t], ampere = Curl[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == j[x, y, z, t] + D[\[ScriptCapitalE][x, y, z, t], t]}, Div | Curl | D];; % /. Inactivate[Curl[D[v_, t_], x_] :> D[Curl[v, x], t]]; % /. Solve[faraday, Inactive[Curl][\[ScriptCapitalE][x, y, z, t], {x, y, z}]][[1]]
 Out[5]=

Activating the equation results in the wave equation for the magnetic field.

 In[6]:= XInactivate[{gaussE = Div[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == \[Rho][x, y, z, t], gaussB = Div[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == 0, faraday = Curl[\[ScriptCapitalE][x, y, z, t], {x, y, z}] == -D[\[ScriptCapitalB][x, y, z, t], t], ampere = Curl[\[ScriptCapitalB][x, y, z, t], {x, y, z}] == j[x, y, z, t] + D[\[ScriptCapitalE][x, y, z, t], t]}, Div | Curl | D];; % /. Solve[faraday, Inactive[Curl][\[ScriptCapitalE][x, y, z, t], {x, y, z}]][[1]]; wave = Activate[%]
 Out[6]=

This is the equation expressed using traditional notation.

A plane-wave solution of the equation can be verified by a simple substitution.

 In[7]:= Xwave /. \[ScriptCapitalB] -> (A Exp[{kx, ky, kz}.{#1, #2, #3} - I Sqrt[kx^2 + ky^2 + kz^2] #4] &) // Simplify
 Out[7]=

## Mathematica

Questions? Comments? Contact a Wolfram expert »