Finite-Element Method for 1D problems