So we finished studying chapter 5 of Rudin on differentiation (Mean value theorem, Taylor's theorem etc) and this was given as a homework problem:
Let $ f(x) $ be continuously differentiable on $ [0, \infty) $ such that $ f $ satisfies $ f'(x) = \cos(x^2)f(x) $ for all $ x \geq 0 $, with $ f(0) = 1 $. Prove that $ e^{-x} \leq f(x) \leq e^x $ for all $ x \geq 0 $.
Clearly, $ x = 0$ then the result is trivial. I tried to use Taylor's theorem to note that if $ x > 0 $, then there exists $ x_1 \in (0,x) $ such that $ f(x) = 1 + xf'(x_1) = 1 + x \cos(x_1^2)f(x_1) $. This is where I'm stuck, since I don't know what to do with the cosine function. Any hint/help/comment is greatly appreciated.