GATE 2025 CS (CS1) – Question 31
Consider the given function $f(x)$.
$f(x) = \begin{cases} ax + b & \text{for } x < 1 \\ x^3 + x^2 + 1 & \text{for } x \ge 1 \end{cases}$
If the function is differentiable everywhere, the value of $b$ must be ________. (rounded off to one decimal place)
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: -2.0
Explanation
For $f$ to be differentiable everywhere it must first be **continuous** at $x=1$, and the left and right derivatives must agree there.
**Continuity at $x=1$:**
$$\text{left: } a(1)+b=a+b,\qquad\text{right: } 1^3+1^2+1=3\ \Rightarrow\ a+b=3.$$
**Equal derivatives at $x=1$:**
$$\text{left: } f'(x)=a,\qquad\text{right: } f'(x)=3x^2+2x\ \Rightarrow\ a=3+2=5.$$
Then $b=3-a=3-5=\mathbf{-2.0}$.