  Context. There are typically two different approaches to inferring the mass formation history (MFH) of a given galaxy from its luminosity in different bands. Non-parametric methods are known for their flexibility and accuracy, while parametric models are more computationally efficient. Aims. In this work we propose an alternative, based on a polynomial expansion around the present time, that combines the advantages of both techniques. Methods. In our approach, the MFH is decomposed through an orthonormal basis of N polynomials in lookback time. To test the proposed framework, synthetic observations are generated from models based on common analytical approximations (exponential, delayed-$\tau$, and Gaussian star formation histories), as well as cosmological simulations for the Illustris-TNG suite. A normalized distance is used to measure the quality of the fit, and the input MFH is compared with the polynomial reconstructions both at the present time and through cosmic evolution. Our polynomial expansion is also compared with widely used parametric and non-parametric methods such as CIGALE anda PROSPECTOR. Results. The observed luminosities are reproduced with an accuracy of around 10 per cent for a constant star formation rate (N=1) and better for higher-order polynomials. Our method provides good results on the reconstruction of the total stellar mass, the star formation rate, and even its first derivative for smooth star formation histories, but it has difficulties in reproducing variations on short timescales and/or star formation histories that peak at the earliest times of the Universe. Conclusions. The polynomial expansion appears to be a promising alternative to other analytical functions used in parametric methods, combining both speed and flexibility. 
Polynomial expansion of the star formation history in galaxies