Computation of a linearizing diffeomorphism by quadrature