I'm not sure how to interpret the operation of 'squaring a function'. What I needed was a way to expand a certain equation. More specifically, the equation of the square of an electric field.For instance, if E was an electric field and \phi was the electrostatic potential,then the following relationship is true: E=-∇\phi. We know the total energy density of an electromagnetic field to be \zeta=\iotaE^2. If E=-∇\phi, then what is the expanded form of E^2? From what I got, I understand from using the vector derivative that E^2=∇\cdot(\phi∇\phi)-\phi(∇^2)\phi? Is this true?