I've started self-studying for AP Calculus BC, and picked up a nifty textbook called 500 AP Calculus Questions. As the name may suggest, it contains 500 questions on a variety of different subjects. Question 53 asks: if f'(x) exists at every value in the domain of f(x), then is f(x) continuous, and is f'(x) be continuous?
Evidently, the first one is true. For a function to be differentiable at all values in its domain, it must be continuous within its domain as well. My question regards the second part of the question: would the derivative of a function be continuous?
I said yes, because I could not find any true counterexamples. This counterexample came to mind, but something is bugging me about it. Let f(x) be a function, such that:
$f(x) = \begin{cases} 2x + 6 &\text{if }x \ge 0 \\ -5x + 6 &\text{if }x < 0 \end{cases}$
Alright, so the derivative of this function is not continuous, since there will be a sudden jump from 2 to -5 when passing across x = 0. However, what exactly happens at x = 0? Because two lines intersect at that point, with completely different slopes, so it seems to me as though this function is not differentiable at x = 0, and thus, that its not differentiable at all points in its domain in the first place. So it's not really a counterexample.
My question is, could anyone help me come up with some counterexamples to this fact? Functions that are continuous and differentiable at all value in their domain, but have non-continuous derivatives?