An analytical assessment of finite element and isogeometric analyses of the whole spectrum of Timoshenko beams