Question:medium

Consider the given function \( f(x) \). \[ f(x) = \begin{cases} ax + b & \text{for } x < 1 \\ x^3 + x^2 + 1 & \text{for } x \geq 1 \end{cases} \] If the function is differentiable everywhere, the value of \( b \) must be __________ (rounded off to one decimal place).

Show Hint

For piecewise functions to be differentiable everywhere, they must be continuous and have equal derivatives at the point where the function changes its definition. Always check both the continuity and differentiability conditions at that point.
Updated On: Jan 30, 2026
Show Solution

Correct Answer: -2.1

Solution and Explanation

Problem Analysis:

We are given the piecewise function:

$f(x) = \begin{cases} ax + b & x < 1 \\ x^3 + x^2 + 1 & x \geq 1 \end{cases}$


Step 1: Match the Slopes (Differentiability)

The slope of the linear piece ($x < 1$) is constant, and the slope of the cubic piece ($x \geq 1$) varies. For the graph to be "smooth" at $x = 1$, the slopes must be identical:

$f'_{left}(1) = f'_{right}(1)$

The derivative of the right-hand side is $\frac{d}{dx}(x^3 + x^2 + 1) = 3x^2 + 2x$. At $x = 1$, the slope is: $3(1)^2 + 2(1) = 5$.

Therefore, the slope of the line $ax + b$ must also be 5. $a = 5$


Step 2: Match the Y-intercept of the Junction (Continuity)

Now that we know the slope, the two functions must actually touch at $x = 1$. First, find the height of the cubic piece at the transition:

$f(1) = 1^3 + 1^2 + 1 = 3$

The linear piece $f(x) = 5x + b$ must also pass through the point $(1, 3)$.


Step 3: Solve for $b$

Substitute $x = 1$ and $f(x) = 3$ into the linear equation:

$3 = 5(1) + b$ $3 = 5 + b$ $b = 3 - 5$ $b = -2$


Final Answer:

To make the function differentiable everywhere, the required value is: b = -2

Was this answer helpful?
0