#### To determine

**To sketch:** The graph of the function
g(x)=x+|x|

#### Explanation

**Graph:**

Use an online graphing calculator to draw the graph of
g(x)=x+|x| as shown below in Figure 1.

**Observation:**

The graph of the equation is
y=2x above the
y-axis while it is
y=0 below the
y-axis.

Thus,
g(x)={2xif x≥00if x<0

#### To determine

**To find:** the values of the function
g(x)=x+|x| is differentiable.

#### Answer

The function
g(x)=x+|x| is differentiable at all
x∈ℝ−{0}.

#### Explanation

**Result used:**

The function
g(x)=x is differentiable for all
x∈ℝ.

While the function
g(x)=|x| is differentiable for all
x∈ℝ except
x=0.

**Given:**

The function
g(x)=x+|x|

**Calculation:**

By the given result,
f(x)=x is differentiable for all
x∈ℝ and
h(x)=|x| is differentiable for all
x∈ℝ−{0}.

Since the function
|x| is not differentiable at
x=0.

Check the differentiability of
g(x) =x+|x| at
x=0.

Calculate the left and Right hand limits at separately.

The left hand derivative of
g(x) at
x=0 is given by,

g′−(0)=limh→0+g(0+h)−g(0)h=limh→0+g(h)−g(0)h=limh→0+h+|h|−{0+|0|}h=1+limh→0+|h|h

Since
h>0, implies
|h|=h.

g′−(0)=1+limh→0+hh=1+limh→0+(1)=2

The Right hand derivative of
g(x) at
x=0 is given by,

g′+(0)=limh→0−g(0+h)−g(0)h=limh→0−g(h)−g(0)h=limh→0−h+|h|−{0+|0|}h=1+limh→0−|h|h

Since
h<0, implies
|h|=−h.

g′+(0)=1+limh→0+(−hh)=1+limh→0+(−1)=0

Notice that the right hand limit is not equal to the left hand limit at
x=0 and it can be concluded that the function
g(x)=x+|x| is not differentiable at
x=0.

Hence, the function
g(x)=x+|x| is differentiable at all
x∈ℝ−{0}.

#### To determine

**To find:** the formula for
g′(x).

#### Answer

The differentiation of function
g(x)=x+|x| is
g′(x)={2if x≥00if x<0

#### Explanation

**Given:**

The function is
g(x)=x+|x|.

**Calculation:**

Take derivative of the function
g(x)=x+|x| by considering the following cases:

**Case 1:**
x≥0

d{g(x)}dx=ddx(x+|x|)=limh→0(x+h)+|x+h|−x−|x|h

Since
x≥0, then
x+h≥0 implying
|x+h|=x+h.

And
|x|=x.

d{g(x)}dx=limh→02(x+h)−2xh=limh→02hh=limh→02=2

Thus, it can be concluded that
g′(x)=2 if
x≥0.

**Case 2:**
x<0

d{g(x)}dx=ddx(x+|x|)=limh→0((x+h)+|x+h|)−(x+|x|)h

Since
x<0 , then
x+h<0 implying
|x+h|=−(x+h).

And
|x|=−x.

d{g(x)}dx=limh→0(x+h)−(x+h)−(x−x)h=limh→00h=0

Thus, it can be concluded that
g′(x)=0 if
x<0.

Therefore, the formula of derivative is
g′(x)={2if x≥00if x<0

Since
1+|x|x={2if x≥00if x<0 , the derivative can be written as
g′(x)=1+|x|x.

Therefore, the derivative of
g(x) is
g′(x)=1+|x|x.