The effects of both electric and magnetic fields (applied perpendicular to the interfaces) on the donor transition energies on a GaAs‐Ga1-xAlxAs quantum well are studied by following a variational calculation within the effective‐mass approximation with two‐parameter variational envelope hydrogenic wave functions for the 1s‐ and 2p+‐like donor states. A detailed analysis of the far‐infrared intradonor absorption spectra, taking into account a proper consideration of the impurity‐doping profile, is performed and results are compared with recent experimental data. The agreement between the reported magnetospectroscopic data and the average photon energy at the width at half‐maximum of the calculated infrared‐absorption spectra is quite apparent. It is unambiguously shown that the absorption spectra must be evaluated with an adequate choice of the variational envelope wave function for a correct quantitative understanding of the experimental measurements. © 1996 American Institute of Physics.