Suppose $f \in L^2(0,1)$ and $u \in H^1_0$ is the solution to the following problem:
\begin{equation}
\int_0^1 u'(x)v'(x) dx=\int_0^1 f(x)v(x)dx ~~~~~~~~~~~~~~~~~~~~(1)
\end{equation}
for all $v \in H^1_0(0,1)$.
I would now like to investigate the connection between the solution $u$ from above and the solution $u_h$ of the discrete problem
\begin{equation}
\int_0^1u_h'(x)v_h'(x) dx=\int_0^1f(x)v_h(x)dx ~~~~~~~~~~~~~~~~~~(2)
\end{equation}
where now $u_h, v_h \in V_h:=\{v_h \in C(\bar{\Omega})|v_h(0)=v_h(1)=0 ~\text{and} ~ \text{for all} ~ j=1,..N: v_h|_{[x_i,x_i+1]}~ \text{is linear}\}$.
$\Omega$ is the uniform grid $]0,1[$ with the grid points $x_i=ih$ for all $i=0,..,N$.
I have the feeling that for the solutions $u_h$ and $u$ from the second and first problem respectively it should hold that: \begin{equation} u(x_i)=u_h(x_i) \end{equation} for all grid points $x_i$ in our mesh. Therefore, I tried to prove this assumption:
By using partial integration I get that \begin{equation} \int_{x_i}^{x_{i+1}} u_h'(x)v_h'(x) dx= u_h(x_{i+1})v'(x_{i+1})-u_h(x_i)v_h'(x_i)-\int_{x_i}^{x_{i+1}}u_h''(xi)v_h(x_i)dx \end{equation} Since $u_h \in V_h$, i.e. $u_h$ is linear in the interval $[x_i,x_{i+1}]$ the last term vanishes.
Now instead of $u_h$ let's consider $u_I$ which denotes the linear interpolant of the solution $u$, i.e. $u_I(x_i)=u(x_i)$ for all grid points $x_i$. Hence, we have \begin{equation} \int_{x_i}^{x_{i+1}} u_I'(x)v_h'(x) dx= u_I(x_{i+1})v'(x_{i+1})-u_I(x_i)v_h'(x_i) \end{equation} I now wonder if there is a way to conclude that \begin{equation} u_h(x_{i+1})v'(x_{i+1})-u_h(x_i)v_h'(x_i)=u_I(x_{i+1})v'(x_{i+1})-u_I(x_i)v_h'(x_i)=u(x_{i+1})v'(x_{i+1})-u(x_i)v_h'(x_i). \end{equation} which would be equivalent to \begin{equation} v'(x_{i+1})[u_h(x_{i+1})-u(x_{i+1})]-v'(x_i)[u_h(x_i)-u(x_i)=0 \end{equation} And therefore $u_h(x_i)=u(x_i)$ (is this conclusion correct?).
I know that I have not used the fact that (2) holds. But can I conclude from (2) also that \begin{equation} \int_{x_i}^{x_{i+1}}u_h'(x)v_h'(x) dx=\int_{x_i}^{x_{i+1}}f(x)v_h(x)dx? \end{equation} I am confused how to finish my proof. Am I on the right path?