Maths WorkshopMaths problems with full solutions
Exercise 365Calculus › Single-variable calculus › Differentiation › Differentiable functionsL1Added 2 Nov 2026

Differentiability when gluing two pieces

#differentiability#piecewise functions#one-sided derivatives

Statement

Find α,β∈R\alpha,\beta\in\mathbb{R} such that
f(x)={x2−x+3if x≤1,αx+βif x>1f(x)=\begin{cases}x^2-x+3&\text{if }x\le1,\\ \alpha x+\beta&\text{if }x>1\end{cases}
is differentiable on all of R\mathbb{R}.

Hint

Differentiability at 11 requires first continuity at 11, then equality of the left and right derivatives.

Show solutionHide solution

Solution

Continuity at 11. The left limit is 1−1+3=3=f(1)1-1+3=3=f(1) and the right limit is α+β\alpha+\beta. So α+β=3\alpha+\beta=3. (1)

One-sided derivatives at 11.
f−′(1)=lim⁡x→1−x2−x+3−3x−1=lim⁡x→1−x(x−1)x−1=1,f'_-(1)=\lim_{x\to1^-}\frac{x^2-x+3-3}{x-1}=\lim_{x\to1^-}\frac{x(x-1)}{x-1}=1,
f+′(1)=lim⁡x→1+αx+β−3x−1=lim⁡x→1+α(x−1)x−1=α,f'_+(1)=\lim_{x\to1^+}\frac{\alpha x+\beta-3}{x-1}=\lim_{x\to1^+}\frac{\alpha(x-1)}{x-1}=\alpha,
where we used β−3=−α\beta-3=-\alpha from (1). So α=1\alpha=1, and then β=2\beta=2.

Answer. α=1\alpha=1 and β=2\beta=2.

Remark. Geometrically, the line y=x+2y=x+2 is the tangent to the parabola at the point (1,3)(1,3): we have glued the parabola to its own tangent.