Method of partial fractions