Efficient Density Estimation via Piecewise Polynomial Approximation