Let \(\displaystyle f(x)=x^2\) if \(\displaystyle x\le1\) and \(\displaystyle f(x)=ax+b\) if \(\displaystyle x>1\). For which \(\displaystyle a,b\) does \(\displaystyle f'(1)\) exist?
Step by step with comments, a check and common mistakes.
Step-by-step solution
For \(\displaystyle f\) to be continuous at \(\displaystyle 1\), we need \(\displaystyle a+b=f(1)=1\).
\[\displaystyle a+b=1\]
From the left, the derivative of \(\displaystyle x^2\) at \(\displaystyle 1\) is \(\displaystyle 2\).
\[\displaystyle f'_-(1)=2\cdot1=2\]
From the right, the derivative of \(\displaystyle ax+b\) at \(\displaystyle 1\) is \(\displaystyle a\).
\[\displaystyle f'_+(1)=a\]
Equating derivatives gives \(\displaystyle a=2\); with \(\displaystyle a+b=1\) we get \(\displaystyle b=-1\).