complex numbers in linear circuits
You can represent a pure AC signal
$$\begin{eqnarray*}
 v(t) = V \cos (\omega t + \theta)
\end{eqnarray*}$$
using Euler's formula 
$$\begin{eqnarray*}
e^{jx} = \cos x + j\sin x 
\end{eqnarray*}$$
 by the real part
$$\begin{eqnarray*}
 v(t) = real ( V  ( \cos (\omega t + \theta) + j\sin (\omega t + \theta) )\\
  = real ( V e ^ {j(\omega t + \theta) })
\end{eqnarray*}$$
The phasor representation of \$v(t)\$ assumes a value of \$\omega\$ allowing us to write 
$$\begin{eqnarray*}
 v_{phasor} = V e ^ {j \theta} 
\end{eqnarray*}$$

The function of a linear circuit \$f\$ can be represented by a given gain and phase change 

$$\begin{eqnarray}
f(v(t)) = F V \cos (\omega t + \theta + \phi)\\
  = real ( F V  ( \cos (\omega t + \theta + \phi) + j\sin (\omega t + \theta + \phi) )\\
  = real ( F V e ^ {j(\omega t + \theta + \phi) })\\
  = real ( V e ^ {j(\omega t + \theta)}  e ^ {j \phi })\\
  = real ( A V e ^ {j(\omega t + \theta)}  )
\end{eqnarray}$$
where \$A=F  e ^ {j \phi }\$ is a complex gain for the circuit, the effect of the circuit on the time varying voltage is the same as calculating the product of the gain on the phasor representation.

So it can been seen that for a linear circuit, because the resulting time-varying waveform is still only a  of \$\prod G . V \cos(\omega t + \sum \phi + \theta) \$ terms it has a valid phasor representation.

If instead of a linear function we have a non-linear function \$q\$ such as \$q(u)=u^2\$ :
$$\begin{eqnarray}
q(v(t)) = V^2 \cos^2 (\omega t + \theta )\\
  = V^2\frac{1+ \cos 2(\omega t + \theta )}{2}\\
  = real ( \frac{V^2}{2} (1+ e ^ {j(2\omega t + 2 \theta) })))\\
  = \frac{V^2}{2} + real ( \frac{V^2}{2} e ^ {j(2\omega t + 2\theta) })\\
\end{eqnarray}$$

Now we no longer have a waveform which is a function of cos and sine \$\omega t\$ but has both DC and AC at \$2\omega t\$ . Because the frequency of this waveform is different to the one assumed by the original phasor, there is no phasor equation which can join them together - the phasor representation simplifies the equations by eliminating the common \$\omega t\$ variation, and this only works if you have the same frequency for each value in the equation.

If you can partition your system into linear sub-blocks then you can use the phasors within each block, taking care to convert the frequency at each non-linear function, but only if you have pure sinusoids at each stage. Other non-linear functions will result in other frequencies being produced, or non-sinusoidal waveforms. It is possible that these are represented by a complex FFT, and if that is fed into a linear system then each part of the FFT can be analysed using phasor analysis. 

But the simple phasor relationships won't work once you have non-linearity, as all non-linearity distorts the sinusoid, and any distortion introduces additional frequencies, breaking the core assumption of the phasor representation.