Calculation of Matrix Elements for One‐Dimensional Quantum‐Mechanical Problems