The interplay between disorder and interaction, especially near metal insulator transitions, is a longstanding question. We investigate in detail single impurities, in particular, the Friedel oscillations induced by them. We study the decay of the Friedel oscillations in the one-dimensional Heisenberg and Hubbard model analytically using the bosonization technique and numerically using the density matrix renormalization group treatment (DMRG). For the Heisenberg chain, we confirm the predictions of conformal field theory and bosonization for small interaction, but near phase transitions deviations are found in form of vanishing or additional oscillations. For the Hubbard chain, we study the oscillations -in the density as well as in the magnetization -in the spin-gap, charge-gap, and Luttinger liquid phase. We find an exponential decay or a very slow algebraic decay of the oscillations in the gapped phases. In the Luttinger liquid phase, we concentrate on the question of logarithmic corrections (which occur also in the isotropic Heisenberg antiferromagnet). Differences in the behavior near a boundary compared to an impurity are pointed out.