I'm just started learning standard Calculus class in the university (It treats James Stewart's "Essential Calculus: Early transcendentals" for 1 semester, just letting you know) and I got some questions about the relationship between 'differentiability of a function' (i.e.the existence of $f'(a)$ regarding $x = a$) and 'continuity of a derivative of function'.
I made a derivative of a function on my own, which is
$$f'(x)=\begin{cases}-x + 2 & x<0, \\ 1 & x=0, \\ -x & x>0. \end{cases}$$
I said the integral constant $C = 0$ arbitrarily for convenience. Because $f'$ is defined at every $R$, then $f$ is continuous at every $R$ by theorem (don't remember the number of it...) By integrating $f'$ at every interval, then we get
$$f(x)=\begin{cases} -x^2/2 + 2x & x<0, \\ 0 & x=0, \\ -x^2/2 & x>0. \end{cases}$$
But by using the definition of $f'(0)$ and given $f(x)$, we have to say that $f'(0)$ doesn't exist! So this was a contradiction. I asked about this in my country's internet community, but the answers were the following.
"If $f'(a)$ exists, and $f'$ is not continuous at a, then there are 2 types.
Both left and right limit of $f'$ at $x = a$ exists but $f'$ is not continuous at $a$
Either left or right limit of $f'$ at $x = a$ doesn't exist, so $f'$ is not continuous at $a$.
$f'$ is only available at type 2.
I just accepted with no excuse, but after few days, I just wanted to know some prove about this.
I read about this but as I said before, I just started Calculus, so it was too hard for me to understand some comments at there.
I am not American or British, so I'm not very good at English and sorry about that.
Question is that could somebody prove that "if $f'(a)$ exists and $f'$ is discontinuous at $x = a$, then left-hand or right-hand limit of $f'$ at $x = a$ doesn't exist."
Thx for reading this awful long writing.