Magnetic Energy Density Equations I have a plasma with a magnetic field through it and I want to know the magnetic energy within the plasma. I have the simple equation $U=\frac{B^2}{\mu}$ for the energy density.
But my question is then, if this equation is correct, surely if I have 1T B-field evenly a 1$m^3$ box, the magnetic energy density should be smaller than if that 1T B-field were in a 1$cm^3$ box, but by this equation, the magnetic energy density would be the same?
EDIT: Maybe a bit of clarification on the example. The total energy would increase if I place the same magnetic field and put in a larger box while the density will stay the same, so why doesn't the density get lower and the energy remain constant? 
 A: Let us assume that the magnetic field we're talking about is homogeneous in the relevant regions of space. To create such magnetic field in a smaller box requires less energy than to create the same magnetic field in a larger (that is with a larger support as a vector field) box. This is why you clearly have more energy in the larger box than the smaller box when you integrate over the volume. Since the energy density associated to the field is
$$u_m \propto B^2$$
one can see that this depends on the magnitude of the field alone, which is supposed to be homogeneous.
If your constraint is (for some reasons) on the energy, that is you can only spend a certain amount of energy $\mathcal E$ to create a (still homogeneous for simplicity) magnetic field, then the density (hence the magnitude of the field at each point) will vary according to the area you are "spreading" the available energy on. So in a smaller box you will be able to create a stronger field than in a larger box.
A: The whole point of a 'density' is that it is independent of volume. For example, if you have simple mass density, the equation is
$$rho=\frac{mass}{volume}$$
Which produced the same answer regardless of volume (assuming uniform density). The same is true for magnetic density. When you get a bigger box and integrate around the boundary, you will get a larger magnetic flux, but the density will be the same.
A: I truly feels that the equations of
1. Magnetic energy density(Ub=0.5B^2/mu);Ub=mag.energy/volume
2. Electircal energy density(Ue=0.5epsilon*E^2) are godsends.
To understand this question answer,you must review certain fundamental things like
 physical meaning of energy density:it tells that energy density is same everywhere in the space,note that not the energy(magnetic or electrical),its their density(meaning like density of big iron equals small iron ).For instance let you have a string of length 5m and its mass is 10 kg then its mass/length is 2kg/m. Now take 0.5m strip of string length then I asked you(don't assume hard) what is mass/length of 0.5m strip,certainly you would say 2kg/m. Good
then for a box 1m^3 and 1cm^3 the density of magnetic field energy is same. Hurray  you solve this problem.          
