Pade-legendre method for uncertainty quantification with fluid dynamics applications