# I Magnetic Energy of solenoid( u=m·B or u=B^2/4pi )

Tags:
1. Jun 21, 2017

### sean1832725142

Hi,

I have a problem with the fomular
u=m·B
and
u=B^2/4pi
Since I want to calculate how many magnetic energy on a solenoid, I couldn't decide which fomular should I use.

2. Jun 21, 2017

### vanhees71

In Gaussian units the electromagnetic field-energy density is given by
$$u=\frac{1}{8 \pi} (\vec{E}^2+\vec{B}^2).$$