I have this piecewise function:
$f(x) = \begin{cases} x^2 -5x+6, x\leq1 \\ ax+b, x > 1\end{cases}$
And i need to find the values $a,b$ such that $f$ is differentiable and continuous at $x=1$, using derivative definition.
My development was:
If $\lim_{h\to0} \frac{f(1+h)-f
(1)}{h}$ exist, therefore is differentiable and continuos at $x=1$
Solving the lateral limits,
$\large{\lim_{h\to0^{-}} \frac{h^2+2h+1-5h-5+4}{h} = -3}$
$\large{\lim_{h\to0^{+}}\frac{a+b-2+ah}{h}}$ and this be equal to $-3$, that is:
$\large{\lim_{h\to0^{+}}\frac{a+b-2+ah}{h} = -3 = \lim_{h\to0}-3}$
$(\star) \frac{a+b-2+ah}{h}=-3 \iff a+b-2=-h(a+3)$ and since $h\to 0$, i have $a+b=2$ and if $a+b=2$, the limits becomes:
$(\star)\large{\lim_{h\to0^{+}}\frac{a+b-2+ah}{h}} = \large{\lim_{h\to0^{+}}a} = -3 \iff a = -3$ and hence $b = 5$
The $(\star)$ steps is where I don't know if my steps are valid. And how i can know if these are the unique values of $a,b$ such that the condition holds?
Thanks in advance.
Best Answer
The first $(\star)$ is not correct. You're not after $\frac{a+b-2+ah}h=-3$; you're after$$\lim_{h\to0^+}\frac{a+b-2+ah}h=-3.\tag1$$Since $\lim_{h\to0^+}h=0$, in order that you have $(3)$, you must have $\lim_{h\to0^+}a+b-2+ah=0$, which is equivalent to $a+b=2$. And, if this condition holds, then the limit $(1)$ is equal to $a$. So, $a=-3$.
The rest is fine.