Let's say I have the following function
$f(x)=\begin{cases} x^2 & x < 1, \\ 2x & x \geq 1 \end{cases}$
$f'(x)=\begin{cases} 2x & x < 1, \\ 2 & x > 1 \end{cases}$
$\implies \lim_{x\to 1^{-}}f'(x)=2$ and $\lim_{x\to 1^{+}}f'(x)=2$
I know that I can't conclude $f'(1)=2$ from here as it would require assuming continuity of $f'(x)$.
My first question is" Is $\lim_{x\to 1^{-}}f'(x)=2$ same as saying LHD at $x=1$ is $2$ and in which cases it is true as many questions can be solved directly by assuming this"
Let's calculate LHD and RHD from their definition
$$\text{LHD}= \lim_{x \to 1^{-}} \frac{x^2-2}{x-1}= \infty$$ $$\text{RHD}= \lim_{x \to 1^{+}} \frac{2x-2}{x-1}= 2$$
It is apparent that what I am thinking is clearly wrong for the LHD atleast, but I can't seem to find the answer myself.
Also drawing the graph increases my confusion as it seems that LHD is indeed $2$
My second question is "why the intuitive geometric slope from the graph contradicts with LHD being infinite?"

$f(x)=\begin{cases} x^2 sin(\frac{1}{x})& x \neq 0, \ 0 & x=0 \end{cases}$
It is both righ tand left continuous at $x=0$
LHD=RHD=$0$ at $x=0$(Using definition)
$f'(x)=2x sin(\frac{1}{x})-cos(\frac{1}{x})$ for $x\neq0$
$lim_{x\to 0} f'(x)$ does not exist but LHD=RHD=$0$
– user6262 Dec 09 '24 at 23:00