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 [itex]\phi[/itex] was the electrostatic potential,then the following relationship is true: E=-∇[itex]\phi[/itex]. We know the total energy density of an electromagnetic field to be [itex]\zeta[/itex]=[itex]\iota[/itex]E^2. If E=-∇[itex]\phi[/itex], then what is the expanded form of E^2? From what I got, I understand from using the vector derivative that E^2=∇[itex]\cdot[/itex]([itex]\phi[/itex]∇[itex]\phi[/itex])-[itex]\phi[/itex](∇^2)[itex]\phi[/itex]? Is this true?