A Hermite Polynomial Approach for Solving the SIR Model of Epidemics