I already proved that there exists a unique function $u\in H_0^1((-1;1))$ such that $\int_{-1}^{1} u' \phi'dx=\phi(0)$ $\forall \phi \in C_0^\infty((-1;1))$.
I want to find this $u$. I have found this function that satisfies the condition $$ u(x)= \begin{cases} 0.5(1+x) &\text{ if } x\leq0,\\ 0.5(1-x) &\text{ if } x>0 \end{cases} $$ We have that $$ u'(x)= \begin{cases} 0.5 &\text{ if } x\leq0,\\ -0.5 &\text{ if } x>0 \end{cases} $$ And using the fundamental theorem of calculus we obtain that $\int_{-1}^{1} u' \phi'dx=\phi(0)$.
However $u$ is not compactly supported. Do you have any hint?