Is this functional convex? Maybe this is a strange or un-professional question. I want to know whether my equation is convex.
My equation is as follows:
$E\left(\phi\right)=\int_{\Omega}\left|\left(g\left(\overline{x}\right)-A\right)\right|^{2}\left(1-H(\phi\left(\overline{x}\right))\right)d\overline{x}
+\mu\int_{\Omega}H(\phi\left(\overline{x})\right)d\overline{x}
+\nu\int_{\Omega}\delta\left(\phi\left(\overline{x}\right)\right)\left|\nabla\phi\left(\overline{x}\right)\right|d\overline{x}$
where $g$ is a known function $R^{2}\rightarrow R$, and A is a know scalar, $H$ is a Heaviside function,e.g. $H\left(\phi\right)=\frac{1}{2}+\frac{1}{\pi}\arctan\left(\phi\right)$ and $\delta$ is a Delta function, I want to find the $\phi,R^{2}\rightarrow R$ which minimize $E$. So I want to know whether $E$ is convex. So if I find its extremum, then I find its extrernes.
 A: First question you should ask yourself is whether your functional is even continuous over the function space you are interested in. For example, using the reduction by Robert Israel above, over any $L^p$ space your functional is not even continuous. Which means that you are not guaranteed to be able to approach its infimum using a minimizing sequence. But maybe your functional is upper semi continuous (this would in part depend on you convention for the Heaviside function)? At the very least you know that your functional is bounded below by 0, so you can't have the minimum running off to infinity.
The fact that your functional is not continuous also means that you can not use the calculus of variations as you described in the second half of your question. To do so it is necessary that your functional is once continuously differentiable (if you just want to use the Euler-Lagrange equations to find a critical point) and twice continuously differentiable (if you want to also use the second variation to check whether the critical point is a max, min, or saddle point). 
One possibility could be potentially to construct the actual convex hull of your functional. Whether that is approachable depends strongly on how complicated your initial functional is. If your original functional has only one minimum point (this is a uniqueness statement that requires proving), then the convex hull will be a continuous functional with the same minimum point, which can be slightly easier to analyse. 
A: Consider the case $g(x)=A$, $\nu = 0$, $\mu=1$, so your functional reduces to 
$E(\phi) = \int_{\Omega} H(\phi(x))\ dx$. I assume $\Omega$ has finite measure.
  For constant functions $\phi$, 
$E(\phi)$ is a step function: $0$ if $\phi < 0$ and $m(\Omega)$ if $\phi > 0$.
That is not convex, so your functional is not convex.   
