Closed-form solutions of an infinite beam under impact loading