The standard finite difference method for -u''=2 is -\frac{1}{h^2}u_{i-1} + \frac{2}{h^2}u_{i} - \frac{1}{h^2}u_{i+1} = 2
Multiply by h !
The finite element method and the finite difference method are identical in this example.
(Remains to study the equations at the end points, which involve boundary values - but these are also the same for the two methods)