  Rectangular nanowires may have domain walls nucleated and moved through them
to realize many devices. It has been shown that at a particular width and
thickness of a nanowire with perpendicular anisotropy, there is a switch from
the domain wall being of Bloch-type to it being of N\'eel-type. This critical
shape can be found through micromagnetics simulations, but here we present an
analytic calculation for the energies of both wall types involving two
iterations for the demagnetizing energy density. The expressions developed are
long, but have the advantage that by simply inputting material parameters for
the magnetic material, the critical shape can be found using a calculator in a
matter of seconds. We compare our results to those found using micromagnetics
and those found experimentally and the agreement is good.
