Optimization of cancer treatment in the frequency domain