Let $f \in H^1(a,b)$, where $a<b$.
Then there exists a continuous representative $\tilde{f}(x) = \int_a^x f'(x) \ dx + c $ where $f'\in L^2(a,b)$ is the weak derivative of $f$ and c is a constant.
My question mainly regards that integration constant.
By the equality above it follows that $\tilde{f}(a) = c$.
Now I have read the assertion that for $\phi \in C^{\infty}_c(a,b)$ with $\int_a^b \phi \ dx = 1$ the following equation holds:
$\int_a^b f(x) \phi(x) \ dx = \tilde{f}(a) = c$
In this case $\phi$ seems to behave in the way of the dirac distribution, but I fail to say why that equality should hold.
Edit:
I have no formal source for this. It came up in a proof regarding the $H^1$ continuity of the "boundary operator":
$\rho(f) = (\ \int_a^b f(x) \phi(x) \ dx, \ \int_a^b f'(x) \ dx + \int_a^b f(x) \phi(x) \ dx ) \stackrel{!}{=} (\tilde{f}(a),\tilde{f}(b))$
which was then also subsequently used to derive:
$f \in H^1_0 \iff \rho(f) = (0,0)$
I found that proof quite intriguing, but I have not found it or a variation of it in any sources I looked up.