# Oscillation term in a posteriori error estimator

Assume that in the a (residual type) posteriori error estimator of some PDE is a term of the form $h_T\|g\|_{L^2(\Omega)}$ involved where $h_T$ is the diameter of an element and $g$ is some known data function.

While proving the efficiency of the estimator, one wants to obtain \begin{align} h_T^2\|g\|_{L^2(T)}^2 \leq \|u-u_h\|^2 + h_T^2\|g-\bar{g}_T\|^2_{L^2(T)} \end{align} where $\bar{g}_T$ is the average of $g$ in $T$. Why do we need this oscillation term, since $g$ is known data and it is controlled by $h_T$?

In the efficiency proof you use bubble functions in order to get rid of the elementwise boundary terms. For a bubble function $b_T$ defined on an element $T$ it holds $$c \|v_h\|_{0,T} \leq \|b_T v_h\|_{0,T} \leq C \| v_h \|_{0,T}$$ which is true for any discrete function $v_h$. In the proof you use this (or similar) inequality to bound the residual of the problem. This is not possible for an arbitrary (non-discrete) loading. Therefore in the residual, you replace $g$ by its projection through $g = \overline{g} + g - \overline{g}$ and use the triangle inequality.