The Mathematical Validity of the f(R) Theory of Modified Gravity