In the two-dimensional boundary element method, one often needs to evaluate numerically integrals of the form integral(1)(-1) g (x) j(x) f((x - a)(2) + b(2)) dx where j(2) is a quadratic, g is a polynomial and f is a rational, logarithmic or algebraic function with a singularity at zero. The constants a and b are such that - 1 <=, a <= 1 and 0 < b <= 1 so that the singularities of f will be close to the interval of integration. In this case the direct application of Gauss-Legendre quadrature can give large truncation errors. By making the transformation x = a + b sinh(mu u - eta), where the constants mu and eta are chosen so that the interval of integration is again [- 1, 1], it is found that the truncation errors arising, when the same Gauss-Legendre quadrature is applied to the transformed integral, are much reduced. The asymptotic error analysis for Gauss-Legendre quadrature, as given by Donaldson and Elliott [A unified approach to quadrature rules with asymptotic estimates of their remainders, SIAM J. Numer. Anal. 9 (1972) 573-602], is then used to explain this phenomenon and justify the transformation. (c) 2006 Elsevier B.V. All rights reserved.