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

Derivative with an absolute value

#differentiability#absolute value#one-sided derivatives

Statement

Let f(x)=∣x∣+exf(x)=|x|+e^x. Determine where ff is differentiable and compute f′f' there.

Hint

The absolute value is not differentiable at 00. Treat x>0x>0 and x<0x<0 separately, then examine 00 with the difference quotient.

Show solutionHide solution

Solution

For x>0x>0: f(x)=x+exf(x)=x+e^x, so f′(x)=1+exf'(x)=1+e^x.

For x<0x<0: f(x)=−x+exf(x)=-x+e^x, so f′(x)=−1+exf'(x)=-1+e^x.

At 00. The difference quotient is ∣h∣+eh−1h=∣h∣h+eh−1h\dfrac{|h|+e^h-1}h=\dfrac{|h|}h+\dfrac{e^h-1}h. The second term tends to 11. The first term is +1+1 for h>0h>0 and −1-1 for h<0h<0. So the right derivative is 1+1=21+1=2 and the left derivative is −1+1=0-1+1=0. They differ, so ff is not differentiable at 00.

Answer. ff is differentiable on R∗\mathbb{R}^*, with f′(x)=ex+1f'(x)=e^x+1 for x>0x>0 and f′(x)=ex−1f'(x)=e^x-1 for x<0x<0.

Remark. The sum of a differentiable function and a function with a corner has a corner at the same place: the exponential only changes the slopes on both sides.