$$ f(x)=\begin{cases} x+b & \text{if } x \leq 1 \\
ax^2 & \text{if } x\gt 1
\end{cases} $$
Let \(f\) be the function above. What are all values of \(a\) and \(b\) for which \(f\) is differentiable at \(x=1\) ?
We need to find values of \(a\) and \(b\) that make the following true:
$$ \lim\limits_{x\to 1^+} f'(x)=\lim\limits_{x\to 1^-} f'(x) $$
Differentiate each side of the piecewise function:
$$ f(x)=\begin{cases} x+b & \text{if } x \leq 1 \\
ax^2 & \text{if } x\gt 1
\end{cases} $$
$$ f'(x)=\begin{cases} 1 & \text{if } x \leq 1 \\
2ax & \text{if } x\gt 1
\end{cases} $$
$$ 2ax=1 $$
When \(x=1\),
$$ 2a(1)=1 $$
$$ a=\frac{1}{2} $$
Though we might be tempted to disregard the value of \(b\), we need to make sure the function is continuous at \(x=1\). For this we need:
$$ \lim\limits_{x\to 1^+} f(x)=\lim\limits_{x\to 1^-} f(x) $$
$$ ax^2=x+b $$
Using our values for \(a\) and \(x\):
$$ \left(\frac{1}{2}\right)(1)^2=1+b $$
$$ b=-\frac{1}{2} $$