Forgetting factor algorithm and its application to the analysis of compound dosage forms