We present a grid-free density functional theory model appropriate to explore the time evolution of electronic states in a semiconductor nanostructure. The model can be used to investigate both the linear and nonlinear responses of the system to an external short-time perturbation in the THz regime. We use the model to study the effects of impurities on the magnetospectroscopy of a two-dimensional electron gas in a nanostructure excited by an intense THz radiation. We do observe a reduction in the binding energy of the impurity with increasing excitation strength, and at a finite magnetic field we find a slow onset of collective spin oscillations that can be made to vanish with a stronger excitation.