A question about the sampling theorem
If you sample your signal with $f_s=40\,\text{kHz}$ then the band between 20kHz and 30kHz will be folded back to the band between 10kHz and 20kHz. So aliasing will affect the upper half of your spectrum after sampling, i.e. the band between 10 and 20kHz. The lower band from DC to 10kHz will not be corrupted by aliasing.