On this page
In short The function x|x| is differentiable at zero, and its derivative is exactly 0. While the absolute value function |x| has a sharp corner that prevents differentiation, multiplying it by x smooths the curve perfectly at the origin.
The absolute value function is one of the first places calculus students encounter limits that break down. But slightly modifying the function changes its properties entirely. In this post, we will look at how to handle a common test question involving a piecewise function and its derivative, and why the product of two functions can smooth out a corner.
Is x|x| differentiable at zero?
Yes, the function f(x) = x|x| is differentiable at zero, and its first derivative is 0.
To see why this is true, we must go back to the formal limit definition of a derivative. The derivative of a function at x = 0 is the limit of (f(x) − f(0)) / (x − 0) as x approaches 0 (Mathematics LibreTexts/03%3A_Derivatives/3.02%3A_The_Derivative_as_a_Function)).
If we apply this foundational definition to f(x) = x|x|, we can set up our limit:
f'(0) = lim (x → 0) (x|x| − 0) / (x − 0)
f'(0) = lim (x → 0) (x|x|) / x
Since x is approaching zero but is never exactly zero in the limit, we can safely cancel the x from the numerator and the denominator.
f'(0) = lim (x → 0) |x|
As x approaches 0, the absolute value of x clearly approaches 0. Therefore, the limit exists and equals 0. The function is fully differentiable at the origin. If you want to review the mechanics of evaluating limits like this one, see our guide on limits of the form 1^∞.
How do you find the derivative of x|x|?
The most reliable way to differentiate functions containing absolute values is to split them into their piecewise components. This method avoids the confusion of trying to apply the product rule blindly to a term that changes sign depending on the value of x. For more on breaking apart modulus problems, see our post on equations and inequalities with modulus.
The formal definition of the absolute value is:
|x| = x when x ≥ 0
|x| = −x when x < 0
Using this piecewise definition, we can write f(x) = x|x| as two separate pieces:
For x ≥ 0: f(x) = x(x) = x²
For x < 0: f(x) = x(−x) = −x²
Now, we can take the derivative of each piece independently using the standard power rule:
For x > 0: f'(x) = 2x
For x < 0: f'(x) = −2x
If we check the derivative from both sides as x approaches 0, we see that the right-hand derivative (2x) approaches 0, and the left-hand derivative (−2x) also approaches 0. Because both sides agree perfectly at the origin, the derivative at zero is exactly 0.
This means we can write the final derivative as a single concise expression: f'(x) = 2|x|. If you are working on similar piecewise problems where functions behave differently across intervals, you might also find our guide on the derivative of parametric functions helpful for organising your work.
Why does multiplying by x remove the corner?
The absolute value function f(x) = |x| is continuous everywhere but not differentiable at x = 0 (Mathematics LibreTexts/03%3A_Derivatives/3.02%3A_The_Derivative_as_a_Function)). Its graph famously has a sharp corner at the origin, with a constant slope of −1 on the left and a constant slope of +1 on the right. Because these two slopes do not match, the limit of the difference quotient does not exist.
When you multiply |x| by x, you are essentially multiplying the slope by a factor that shrinks to zero as it approaches the origin. The sharp corner is forced to lay completely flat. The function smoothly transitions from a downward-opening parabola (−x²) to an upward-opening parabola (x²) perfectly horizontally, meaning the slope is exactly 0 right at the transition point.
Is x|x| twice differentiable at zero?
No, while f(x) = x|x| is differentiable once at the origin, it is not twice differentiable.
We established that the first derivative is f'(x) = 2|x|. If we attempt to take the second derivative, we are simply taking the derivative of 2|x|. Just like the standard absolute value function, 2|x| has a sharp corner at the origin (with slopes of −2 and +2). Because of this corner, the second derivative f''(0) is completely undefined. The original function x|x| is smooth enough to have a first derivative, but it is not smooth enough to have a second one.
Checking your work with an AI tutor
Calculus problems that test edge cases like differentiability can be tricky to self-grade because the algebraic steps might look right even if the underlying logical justification is flawed. It is easy to miss a mismatched left-hand and right-hand limit if you are rushing through a practice paper.
If you are unsure whether your limit arguments hold up to scrutiny, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. You can also explore foundational calculus topics in the Fermi Concept Library, where Fermi's AI tutor can work out what you already know and build a plan for the session, so you sit down to a clear next step instead of a blank page.



