  We extend the density functional perturbation theory formalism to the case of
non-collinear magnetism. The main problem comes with the exchange-correlation
(XC) potential derivatives, which are the only ones that are affected by the
non-collinearity of the system. Most of the present XC functionals are
constructed at the collinear level, such that the off-diagonal (containing
magnetization densities along $x$ and $y$ directions) derivatives cannot be
calculated simply in the non-collinear framework. To solve this problem, we
consider here possibilities to transform the non-collinear XC derivatives to a
local collinear basis, where the $z$ axis is aligned with the local
magnetization at each point. The two methods we explore are i) expanding the
spin rotation matrix as a Taylor series, ii) evaluating explicitly the XC for
the local density approximation through an analytical expression of the
expansion terms. We compare the two methods and describe their practical
implementation. We show their application for atomic displacement and electric
field perturbations at the second order, within the norm-conserving
pseudopotential methods.
