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.


1 Answer 1


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.

  • $\begingroup$ Can you explain why i must have $ \lim_{h\to0^+}a+b-2+ah=0$ $\endgroup$ Jun 9, 2020 at 2:32
  • $\begingroup$ Because if the limit of a quotient exists (in $\Bbb R$) and the limit of the denominator is $0$, then the limit of the numerator must be $0$ too. $\endgroup$ Jun 9, 2020 at 5:47
  • $\begingroup$ I think that you mean that if the denominator tends to $0$ the numerator must tends to $0$, right? $\endgroup$ Jun 9, 2020 at 13:00
  • $\begingroup$ Yes, that is correct. $\endgroup$ Jun 9, 2020 at 13:05
  • $\begingroup$ Thanks for your help José. $\endgroup$ Jun 9, 2020 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.