I met the following problem in my homework and I have no idea how to start it.
Consider the following two-point boundary value problem $$ -u''+q(x)u=f(x), \ \ u(0)=u(1)=0$$ with $f\in L^2([0,1])$, under which, $u\in H^2([0,1])=W^{2,2}([0,1])$. Present an error estimate of the central finite difference method under the assumption of the regularity.
First I am a little confused about the error. Since $u$ lies in $H^2([0,1])$, the pointwise error $\max_{1\leq i\leq N}|u(x_i)-u_i|$ is not applicable, where $(u_i)_{i=1}^N$ is the discrete soltuon. So what kind of error should I use instead of the pointwise one? Another problem is that $f\in L^2([0,1])$. If I use the central difference method, I have to solve the following system of linear equations
$$-\frac{u_{i+1}+u_{i-1}-2u_i}{h^2}+q(x_i)\frac{u_{i+1}-u_{i-1}}{2h} =f(x_i), \ \ i=1,2,\dots,N.$$
$$ u_0=u_{N+1}=0$$
But $f$ lies in $L^2([0,1])$, so I cannot evalutae its value at $x_i$. What should I use here instead of $f(x_i)$?