# Differentiable

How to determine whether a function is differentiable: definition, 2 examples, and their solutions.

## Definition

### Definition

y = f(x) is differentiable at a point when

the left-hand derivative and the right-hand derivative are equal.

This is true because

the limit value is defined

when the left-hand limit and the right-hand limit are equal.

One-Sided Limits

In plain words,

y = f(x) is differentiable

when its graph changes smoothly:

connected continuously

and without any sharp points.

## Example 1

### Example

### Solution

Before determining whether y = f(x) is differentiable,

first show that y = f(x) is continuous.

Find the left-hand limit of f(x) at x = 1.

f(x) = x^{2} + 2 at x = 1^{-}.

One-sided Limits

So lim_{x → 1-} f(x) = lim_{x → 1-} (x^{2} + 2).

This is equal to 3.

Find the right-hand limit of f(x) at x = 1.

f(x) = -x^{2} + 4x at x = 1^{+}.

So lim_{x → 1+} f(x) = lim_{x → 1+} (-x^{2} + 4x).

This is equal to 3.

Find f(1).

f(x) = -x^{2} + 4x at x = 1.

So f(1) = -1^{2} + 4⋅1 = 3.

The left-hand limit is 3.

The right hand limit is 3.

And f(1) = 3.

The left-hand limit, the right-hand limit, and the funtion value of f(x) at x = 1 are all equal.

So f(x) is continuous at x = 1.

Next, determine whether f(x) is differentiable at x = 1.

Find the left-hand derivative of f(x) at x = 1.

lim_{x → 1-} f'(x) = lim_{h → 0} [f(1^{-} + h) - f(1^{-})]/h.

Derivative: Definition

If you learned the derivative formula,

you can use the formula in this step.

Derivative of a Polynomial

f(x) = x^{2} + 2 at x = 1^{-}.

So f(1^{-} + h) = (1^{-} + h)^{2} + 2.

And f(1^{-}) = (1^{-})^{2} + 2.

(1^{-} + h)^{2}

= (1 + h)^{2}

= 1 + 2⋅1⋅h + h^{2}

= 1 + 2h + h^{2}

Square of a Sum

-[(1^{-})^{2} + 2] = -[1 + 2] = -1 - 2

Cancel 1 and -1.

Cancel +2 and -2.

Then lim_{h → 0} [h^{2} + 2h]/h.

Divide both of the numerator and the denominator by h.

Then lim_{h → 0} [h + 2]/1.

Then lim_{h → 0} [h + 2]/1 = [0 + 2]/1 = 2.

So the left-hand derivative of f(x) at x = 1 is 2.

Next, find the right-hand derivative of f(x) at x = 1.

lim_{x → 1+} f'(x) =_{limh → 0} [f(1^{+} + h) - f(1^{+})]/h.

f(x) = -x^{2} + 4x at x = 1^{+}.

So f(1^{+} + h) = -(1^{+} + h)^{2} + 4(1^{+} + h).

And f(1^{+}) = -(1^{+})^{2} + 4⋅(1^{+}).

-(1^{+} + h)^{2}

= -(1 + h)^{2}

= -(1 + 2⋅1⋅h + h^{2})

= -(1 + 2h + h^{2})

+4(1^{+} + h) = +4 + 4h

-[-(1^{+})^{2} + 4(1^{+})] = -[-1 + 4]

-(1 + 2h + h^{2}) = -1 - 2h - h^{2}

-[-1 + 4] = +1 - 4

Cancel -1 and +1.

Cancel +4 and -4.

-2h + 4h = +2h

Then lim_{h → 0} [-h^{2} + 2h]/h.

Divide both of the numerator and the denominator by h.

Then lim_{h → 0} [-h + 2]/1.

Then lim_{h → 0} [-h + 2]/1 = [0 + 2]/1 = 2.

So the right-hand derivative of f(x) at x = 1 is 2.

The left-hand derivative is 2.

The right-hand derivative is 2.

The left-hand derivative and the right-hand derivative at x = 1 are equal.

So f(x) is differentiable.

So f(x) is differentiable at x = 1.

### Graph

This curve is the graph of y = f(x).

The graph is connected continuously at x = 1.

So f(x) is continuous at x = 1.

The left-hand slope and the right-hand slope at x = 1 are both 2.

So the slope of y = f(x) exist.

So y = f(x) is differentiable at x = 1.

## Example 2

### Example

### Solution

Write f(x) = |x| as a piecewise function.

First show that y = f(x) is continuous.

Find the left-hand limit of f(x) at x = 0.

f(x) = -x at x = 0^{-}.

So lim_{x → 0-} f(x) = lim_{x → 0-} -x.

This is equal to 0.

Find the right-hand limit of f(x) at x = 0.

f(x) = x at x = 0^{+}.

So lim_{x → 0+} f(x) = lim_{x → 0+} x.

This is equal to 0.

Find f(0).

f(x) = x at x = 0.

So f(0) = 0.

The left-hand limit is 0.

The right hand limit is 0.

And f(0) = 0.

The left-hand limit, the right-hand limit, and the funtion value of f(x) at x = 0 are all equal.

So f(x) is continuous at x = 0.

Next, determine whether f(x) is differentiable at x = 0.

Find the left-hand derivative of f(x) at x = 0.

lim_{x → 0-} f'(x) = lim_{h → 0} [f(0^{-} + h) - f(0^{-})]/h.

f(x) = -x at x = 0^{-}.

So f(0^{-} + h) = -(0^{-} + h).

And f(0^{-}) = (-0^{-}).

Solve the limit.

Then the limit value is -1.

So the left-hand derivative of f(x) at x = 0 is -1.

Next, find the right-hand derivative of f(x) at x = 0.

lim_{x → 0+} f'(x) = lim_{h → 0} [f(0^{+} + h) - f(0^{+})]/h.

f(x) = x at x = 0^{+}.

So f(0^{+} + h) = 0^{+} + h.

And f(0^{+}) = 0^{+}.

Solve the limit.

Then the limit value is 1.

So the right-hand derivative of f(x) at x = 0 is 1.

The left-hand derivative is -1.

The right-hand derivative is 1.

The left-hand derivative and the right-hand derivative at x = 1 are not equal.

So f(x) is not differentiable.

So f(x) is not differentiable at x = 0.

### Graph

This is the graph of y = f(x): y = |x|.

Graphing Absolute Value Functions

The graph is connected continuously at x = 0.

So f(x) is continuous at x = 0.

The the left-hand slope at x = 0 is -1.

And the right-hand slope at x = 0 is 1.

The left-hand slope and the right-hand slope are not equal.

So there's a sharp point at x = 0.

So the slope of y = f(x) doesn't exist.

So y = f(x) is not differentiable at x = 0.