# Differentiable

How to find if the given function is differentiable: definition, relationship between continuous and differentiable, examples, and their solutions.

## Definition

A function is differentiable
if the left-hand derivative and the right-hand derivative
at a point are equal.

Derivative

This makes sense
because the limit value is defined
if the left-side limit and the right-side limit are equal.

One-sided limits

In plain words,
if a function is differential at a point,
its graph changes smoothly at that point.
(no sharp point made by sudden change of its slope)

## Continuous and Differentiable

A differentiable function is always continuous.

The graph of a differential function changes smoothly.
This implies that the graph is always continuous.

But a continuous function is not always differentiable.

The graph of a continuous function can also be sharp.
At the sharp point,
the function is not differentiable (= not smooth).

## Example 1

Recall that
a differentiable function is always continuous.

So first show that f(x) is continuous at x = 1.

Then show that f(x) is differentiable at x = 1.

The left-hand limit of f(x) is 3.

One-sided limits

The right-hand limit of f(x) is also 3.

And f(1) = 3.

The left-hand limit, the right hand limit,
and the function value are all 3.

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

Next, see if f(x) is differentiable at x = 1.

Find the left-hand derivative
by using the definition of the derivative.

(1 + h)2 = 12 + 2⋅1⋅h + h2

Square of a sum

Cancel the dark gray terms.

Divide the numerator and the denominator by h.

So the left-hand derivative is 2.

Find the right-hand derivative
by using the definition of the derivative.

(1 + h)2 = 12 + 2⋅1⋅h + h2

Square of a sum

Cancel the dark gray terms.

Divide the numerator and the denominator by h.

So the right-hand derivative is 2.

The left-hand derivative and the right-hand derivative
are equal: 2.

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

Let's see what this means.

The left-hand derivative and the right-hand derivative
are equal: 2.

So the slope of the tangent line at x = 1 is 2,
whether x comes from the left or the right.

So the graph of f(x) is smooth at x = 1.

## Example 2

f(x) = |x| is a piecewise function.

So write f(x) by its range:

f(x) = -x at (x < 0)
= x at (x ≥ 0).

First, show that f(x) is continuous at x = 0.

The left-hand limit of f(x) is 0.

One-sided limits

The right-hand limit of f(x) is also 0.

And f(0) = 0.

The left-hand limit, the right hand limit,
and the function value are all 0.

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

Next, see if f(x) is differentiable at x = 1.

Find the left-hand derivative
by using the definition of the derivative: -1.

Find the right-hand derivative
by using the definition of the derivative: 1.

The left-hand derivative (-1)
and the right-hand derivative (1)
are not equal.

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

Let's see what this means.

The left-hand derivative (-1)
and the right-hand derivative (1)
are not equal.

This means
the left-hand slope (-1)