We study the effects of defects and impurities on pattern formation from the point of view of perturbation theory, and focus on three examples of spatially extended systems inspired by physical phenomena. We will look at striped patterns formed in Rayleigh B\'enard convection, target patterns arising in chemical oscillations in dimension 3, and wave sources in large arrays of oscillators with nonlocal coupling. We explain why regular perturbation theory fails due to the presence of essential spectrum and show how Kondratiev spaces can help overcome this difficulty: the linearization at periodic patterns becomes a Fredholm operator, albeit with negative index. Finally, using far-field matching procedures we obtain the following results. In the case of Rayleigh-B\'enard convection we show how impurities deform the striped pattern, in the case of chemical oscillations in dimension 3 we show that algebraically localized inhomogeneities do not give rise to target patterns, and lastly in the case of a large array oscillators with nonlocal coupling we show that defects generate wave sources.