The field quality of magnets can be improved by optimizing the shape of the
pole. One often uses circular profiles in quadrupoles and sextupoles where
the radius of the circle is optimized for minimizing the dominant error ha
rmonics. A new method of calculating the harmonic coefficients by using Tay
lor's series expansion technique has been adopted. It has been applied for
optimizing the radii of the circular pole profiles in quadrupoles, sextupol
es anti octupoles.