Bacteria must respond in an appropriate way to external stimuli to overcome the challenges of the environment. In this paper we introduce a linear mathematical model for the tryptophan operon pathway in Bacillus subtilis. This model considers the transport of tryptophan from extracellular to intracellular level. We applied frequency analysis to determine the response of the trp operon to changes in extracellular tryptophan. We studied the effect that has the two negative feedback loops on the frequency response in the trp operon. We found that wild-type bacterium and mutants without any of the two feedback loops have a behavior corresponding to a low-pass filter. Besides, our results suggest that both feedback loops help B. subtilis to respond in an appropriate way due to without any of them, the response time is longer than the duplication time of the bacterium which could affect its adaptation to environment.