Differentiability
Introduction
A function \( f: D \to \mathbb{R} \) is differentiable at \( c \in D \) if the limit
exists as a finite real number. If this limit exists, it is called the derivative of \( f \) at \( c \) and is denoted by \( f'(c) \).
But what is this expression inside the limit? To understand the expression
consider the graph of \( y = f(x) \). At \( x = c \), the function attains the value \( f(c) \), meaning the point \( A(c, f(c)) \) lies on the graph. Now, take another point \( P(x, f(x)) \), where \( x \) is a variable near \( c \). Here, \( A \) is a fixed point, while \( P \) moves as \( x \) varies.
The line segment joining \( A \) and \( P \) is called a secant to the curve. The slope of this secant is given by
This expression represents the slope of the straight line passing through the two points \( A(c, f(c)) \) and \( P(x, f(x)) \).
Now, as \( x \) approaches \( c \), the point \( P \) moves closer to \( A \), and the secant line gradually turns into the tangent line at \( A \), provided such a tangent exists. The slope of the secant line thus approaches the slope of this tangent. This limiting process is what defines the derivative:
If this limit exists, it represents the exact slope of the tangent line to the curve at \( x = c \). Thus, differentiability at \( c \) means that the function \( f(x) \) has a well-defined tangent at that point, with a finite slope.
The derivative of a function at a point is best understood as nothing but the slope of the tangent to the graph of the function at that point. If \( y = f(x) \) is the equation of a curve, then at any point \( x = c \), the slope of the tangent line at that point is given by
provided this limit exists as a finite real number.
Existence of the Derivative
For \( f'(c) \) to exist, the above limit must exist, meaning that the left-hand and right-hand limits must both exist and be equal. These limits are called the left-hand derivative (LHD) and right-hand derivative (RHD), respectively:
Thus, \( f \) is differentiable at \( x = c \) if and only if
in which case their common value is the derivative \( f'(c) \). If either of these limits does not exist or if they are not equal, then \( f \) is not differentiable at \( x = c \).
Geometrically, for the right-hand derivative (RHD), we consider values of \( x \) that are greater than \( c \), meaning \( x \) is on the right side of \( c \). As \( x \to c^+ \), the point \( P(x, f(x)) \) moves toward \( A(c, f(c)) \) from the right. The secant line joining \( A(c, f(c)) \) and \( P(x, f(x)) \) gradually turns into the tangent at \( A \). The slope of this tangent is given by
Similarly, for the left-hand derivative (LHD), we consider values of \( x \) that are less than \( c \), meaning \( x \) is on the left side of \( c \). As \( x \to c^- \), the point \( P(x, f(x)) \) moves toward \( A(c, f(c)) \) from the left. The secant line joining \( A(c, f(c)) \) and \( P(x, f(x)) \) again approaches a limiting position, which is the tangent at \( A \). The slope of this tangent is given by
For the derivative \( f'(c) \) to exist, these two slopes must be equal:
If they are equal, their common value is \( f'(c) \), meaning the function has a well-defined tangent of finite slope at \( x = c \). If they are not equal or if either does not exist, then \( f \) is not differentiable at \( x = c \).
Non-Differentiability
A function \( f: D \to \mathbb{R} \) is said to be differentiable at \( x = c \) if the limit
exists as a finite real number. This requires that both the left-hand derivative (LHD) and the right-hand derivative (RHD) exist and are equal:
If this condition is not met, the function is not differentiable at \( x = c \). The failure of differentiability may occur for different reasons, one of which is the existence of LHD and RHD with different values.
Case I: Left-Hand and Right-Hand Derivatives Exist but Are Not Equal
If
that is, left hand derivative is not equal to right hand derivative, then the function does not have a well-defined tangent at \( x = c \) because the slopes of secant lines approaching \( c \) from the left and right tend to different limits. In such a case, we say that \( f \) is not differentiable at \( x = c \).
Geometric Interpretation
This failure of differentiability is often visible as a corner or kink in the graph of \( f(x) \), where the function abruptly changes direction. A well-known example illustrating this situation is the function
Let us examine its differentiability at \( x = 0 \) by computing the left-hand and right-hand derivatives.
Computation of Left-Hand Derivative (LHD):
By definition,
Since \( f(x) = |x| \) and \( f(0) = 0 \), we obtain
For \( x < 0 \), we have \( |x| = -x \), so
Computation of Right-Hand Derivative (RHD):
Similarly,
For \( x > 0 \), we have \( |x| = x \), so
Since
the function is not differentiable at \( x = 0 \).
At \( x = 0 \), the graph of \( y = |x| \) has a sharp corner. The secant lines approaching from the left tend toward a line with slope \( -1 \), while the secant lines approaching from the right tend toward a line with slope \( 1 \). Since these two slopes are different, there is no single well-defined tangent line at \( x = 0 \), meaning that \( f(x) \) is not differentiable there.
Case II: Discontinuity at a point implies Non-differentiability.
If a function \( f(x) \) is discontinuous at a point \( x = c \), then it is necessarily not differentiable at that point. To see why this is true, recall that the derivative at \( x = c \) is defined as
For this limit to exist, the expression inside the limit must settle to a single finite value as \( x \) approaches \( c \). However, if the function is discontinuous at \( x = c \), then \( f(x) \) does not approach \( f(c) \) as \( x \) approaches \( c \). This means that the numerator in the difference quotient, \( f(x) - f(c) \), does not behave predictably near \( x = c \), making it impossible for the limit to exist in a meaningful way.
Thus, discontinuity at \( x = c \) forces non-differentiability at \( x = c \). This is true for any type of discontinuity—whether it is a jump discontinuity, an infinite discontinuity, or a removable discontinuity.
To illustrate this, consider the function
We first check whether \( f(x) \) is continuous at \( x = 1 \). The left-hand limit is
The right-hand limit is
Since these two limits are not equal, we see that \( f(x) \) has a jump discontinuity at \( x = 1 \), meaning it is not continuous at that point. Since differentiability requires the existence of the limit defining the derivative, and discontinuity disrupts the behavior of \( f(x) \) near \( x = c \), we already suspect that \( f(x) \) will not be differentiable at \( x = 1 \). However, let us confirm this by explicitly computing the left-hand and right-hand derivatives.
The left-hand derivative (LHD) at \( x = 1 \) is given by
For \( x < 1 \), we use \( f(x) = x - 1 \), and since \( f(1) = 2(1) = 2 \), we obtain
For \( x \) slightly less than 1, the numerator approaches \( -2 \) while the denominator approaches \( 0^- \), giving
Thus, the left-hand derivative does not exist as a finite number.
The right-hand derivative (RHD) at \( x = 1 \) is given by
For \( x > 1 \), we use \( f(x) = 2x \), so
Rewriting \( 2x - 2 \) as \( 2(x - 1) \), we simplify
Since the left-hand derivative tends to \( +\infty \) while the right-hand derivative is a finite number, we conclude that \( f(x) \) is not differentiable at \( x = 1 \). More generally, since differentiability requires continuity, and a jump discontinuity at \( x = 1 \) prevents continuity, it is impossible for \( f(x) \) to be differentiable at that point.
Case III: Non-Differentiability Due to a Vertical Tangent
A continuous function \( f(x) \) may also fail to be differentiable at a point where the left-hand derivative (LHD) and right-hand derivative (RHD) both tend to \( +\infty \) or both tend to \( -\infty \). In such cases, although \( f(x) \) remains continuous at that point, the derivative fails to exist because the secant lines approach a vertical tangent.
If
or
then \( f(x) \) is not differentiable at \( x = c \) because a well-defined tangent line with a finite slope does not exist. Instead, the curve becomes infinitely steep, making the tangent vertical.
Geometric Interpretation
Unlike the previous cases where non-differentiability arose from discontinuities or sharp corners, a vertical tangent means the function is smooth but grows or falls so steeply that the tangent line becomes vertical. Since the slope of a vertical line is undefined, the derivative does not exist at that point.
Consider the function
We check whether \( f(x) \) is differentiable at \( x = 0 \) by computing the left-hand and right-hand derivatives.
Left-hand derivative (LHD):
Rewriting \( x \) as \( x = (x^{1/3})^3 \), we get
For \( x \to 0^- \), \( x^{-2/3} \) tends to \( +\infty \), so
Right-hand derivative (RHD):
Again, rewriting \( x \) as \( x = (x^{1/3})^3 \), we obtain
For \( x \to 0^+ \), \( x^{-2/3} \) also tends to \( +\infty \), so
Since both the left-hand and right-hand derivatives tend to \( +\infty \), the function has a vertical tangent at \( x = 0 \), and thus, \( f(x) \) is not differentiable at \( x = 0 \). However, \( f(x) \) is still continuous at \( x = 0 \), as
We conclude that the function is not differentiable at \( x = 0 \) due to the presence of a vertical tangent.
Case IV: Non-Differentiability Due to Oscillatory Limits
Another reason for non-differentiability at a point is when the left-hand derivative (LHD) and right-hand derivative (RHD) do not settle to a single finite value due to oscillatory behavior. In such cases, as \( x \) approaches \( c \), the difference quotient
does not approach a unique limit but rather oscillates between multiple values. This makes it impossible to assign a well-defined tangent at \( x = c \), leading to non-differentiability.
Consider the function
We check whether \( f(x) \) is differentiable at \( x = 0 \).
Step 1: Checking Continuity
For \( f(x) \) to be differentiable at \( x = 0 \), it must first be continuous there. We compute the limit:
Since \( -1 \leq \sin(1/x) \leq 1 \), we have
Applying the squeeze theorem, we get
Since \( f(0) = 0 \), it follows that
so \( f(x) \) is continuous at \( x = 0 \).
Step 2: Computing the Left-Hand and Right-Hand Derivatives
The derivative at \( x = 0 \) is given by
Simplifying,
However, the function \( \sin(1/x) \) oscillates between -1 and 1 infinitely often as \( x \to 0 \), meaning that \( \lim_{x \to 0} \sin(1/x) \) does not exist.
Since the difference quotient oscillates indefinitely, the left-hand and right-hand derivatives do not approach a single limit. Therefore, we conclude that \( f(x) \) is not differentiable at \( x = 0 \) due to the presence of an oscillatory limit.
Oscillations in a function do not always result in non-differentiability. A function can oscillate near a point and still be differentiable if the oscillations decay to zero fast enough. An example of this is the function
We examine whether \( f(x) \) is differentiable at \( x = 0 \).
Step 1: Checking Continuity
For differentiability, the function must first be continuous at \( x = 0 \). We compute
Since \( -1 \leq \sin(1/x) \leq 1 \), we have
Applying the squeeze theorem, we get
Since \( f(0) = 0 \), it follows that
so \( f(x) \) is continuous at \( x = 0 \).
Step 2: Computing the Derivative at \( x = 0 \)
The derivative at \( x = 0 \) is given by
Simplifying,
Since \( -1 \leq \sin(1/x) \leq 1 \), we obtain
Applying the squeeze theorem again,
Thus,
Since this limit exists and is finite, \( f(x) \) is differentiable at \( x = 0 \), and \( f'(0) = 0 \).
Key Observation
Although \( f(x) = x^2 \sin(1/x) \) oscillates infinitely often near \( x = 0 \), the amplitude of oscillation shrinks to zero at a faster rate than the oscillations occur. This allows the difference quotient to settle to a single limit, ensuring differentiability.
This example shows that oscillations do not always imply non-differentiability.
Summary: Reasons of Non-Differentibilty
A function \( f(x) \) is not differentiable at \( x = c \) if the derivative limit
fails to exist as a finite real number. This can happen due to the following reasons:
-
Discontinuity at \( x = c \): If \( f(x) \) is not continuous at \( x = c \), the derivative cannot exist. Any type of discontinuity—jump, infinite, or removable—implies non-differentiability.
-
Sharp Corners or Kinks: If the left-hand derivative (LHD) and right-hand derivative (RHD) exist but are not equal, the function has a sharp turn at \( x = c \) and is not differentiable there (e.g., \( f(x) = |x| \) at \( x = 0 \)).
-
Vertical Tangent: If both \( f'(c^-) \) and \( f'(c^+) \) tend to \( \pm\infty \), the function has a vertical tangent at \( x = c \) and is not differentiable (e.g., \( f(x) = x^{1/3} \) at \( x = 0 \)).
-
Oscillatory Limit: If the difference quotient oscillates indefinitely and does not settle to a limit, differentiation is impossible (e.g., \( f(x) = x \sin(1/x) \) at \( x = 0 \)). However, if oscillations decay fast enough, the function can still be differentiable (e.g., \( f(x) = x^2 \sin(1/x) \) at \( x = 0 \)).
Theorem: Differentiability Implies Continuity at a Point
If a function \( f(x) \) is differentiable at \( x = c \), then \( f(x) \) is also continuous at \( x = c \).
Proof:
Since \( f(x) \) is differentiable at \( x = c \), the derivative
exists as a finite real number.
To prove that \( f(x) \) is continuous at \( x = c \), we must show that
Consider the difference
Rewriting using the definition of the derivative,
Since the limit defining \( f'(c) \) exists, we substitute:
Since \( \lim_{h \to 0} h = 0 \), and \( f'(c) \) is a finite number, it follows that
Thus,
This implies
proving that \( f(x) \) is continuous at \( x = c \).
Thus, we conclude that differentiability at a point implies continuity at that point.
Converse
Continuity Does Not Imply Differentiability
A function being continuous at a point does not necessarily mean it is differentiable at that point. That is, differentiability is a stronger condition than continuity. A function can be continuous but fail to be differentiable due to various reasons, such as sharp corners, vertical tangents, or oscillatory behavior.
Consider the function
It is defined for all real numbers and is continuous everywhere, including at \( x = 0 \), because
However, let us check whether \( f(x) \) is differentiable at \( x = 0 \).
The derivative is given by
Computing the left-hand and right-hand derivatives:
-
Left-hand derivative (LHD): For \( x < 0 \), \( |x| = -x \), so
\[ f'(0^-) = \lim_{x \to 0^-} \frac{-x}{x} = \lim_{x \to 0^-} -1 = -1. \] -
Right-hand derivative (RHD): For \( x > 0 \), \( |x| = x \), so
\[ f'(0^+) = \lim_{x \to 0^+} \frac{x}{x} = \lim_{x \to 0^+} 1 = 1. \]
Since
the left-hand and right-hand derivatives are not equal, meaning the derivative does not exist at \( x = 0 \).
Thus, \( f(x) = |x| \) is continuous but not differentiable at \( x = 0 \).
Thus, we can conclude that:
Continuity alone does not guarantee differentiability. A function can be continuous yet non-differentiable at a point due to sharp corners, vertical tangents, or erratic oscillations. Hence, while differentiability implies continuity, the converse is not always true.
Contrapositive
Discontinuity Implies Non-Differentiability
We previously established that differentiability implies continuity at a point. The statement that discontinuity implies non-differentiability is simply the contrapositive of this fact. Since a statement and its contrapositive are logically equivalent, proving one automatically proves the other.
We will formally study contrapositives in the chapter on Mathematical Reasoning, but intuitively, a contrapositive reverses and negates the original statement while preserving its logical truth. For example:
- Statement: If it rains, then the roads are wet.
- Contrapositive: If the roads are not wet, then it did not rain.
Both statements convey the same truth.
Similarly, since we have proved that if a function is differentiable at \( x = c \), then it is continuous at \( x = c \), its contrapositive states that if a function is not continuous at \( x = c \), then it cannot be differentiable at \( x = c \).
Thus, discontinuity at a point automatically implies non-differentiability at that point. This is why we did not need a separate proof for this fact—it follows directly from the theorem we have already established.
Alternative way to write LHD and RHD
An alternative way to express the left-hand derivative (LHD) and right-hand derivative (RHD) using the variable \( h \) is as follows:
Left-Hand Derivative (LHD)
For the left-hand derivative, we approach \( x = c \) from the left. Instead of writing \( x \to c^- \), we set
Thus, the left-hand derivative is given by:
Since \( h \to 0^+ \) (i.e., \( h \) is positive and approaching 0), dividing by \( -h \) ensures that we correctly measure the slope from the left.
Right-Hand Derivative (RHD)
For the right-hand derivative, we approach \( x = c \) from the right. Instead of writing \( x \to c^+ \), we set
Thus, the right-hand derivative is given by:
The left-hand derivative is written as:
The right-hand derivative is written as:
If these two limits exist and are equal, then \( f(x) \) is differentiable at \( x = c \). Otherwise, it is not differentiable at \( x = c \).
The usefulness of writing the left-hand and right-hand derivatives in the form
lies in the fact that it can greatly simplify calculations, especially in cases where \( c \neq 0 \). When using the standard definition with \( x \to c^- \) and \( x \to c^+ \), expressions often require extra algebraic manipulation. However, introducing \( h \) as the deviation from \( c \) provides a direct and structured approach to computing limits.
Example: Checking Differentiability of \( f(x) = |x - 3| \) at \( x = 3 \)
We examine whether \( f(x) = |x - 3| \) is differentiable at \( x = 3 \).
Step 1: Compute LHD Using \( x = c - h \)
For the left-hand derivative, let \( x = 3 - h \) where \( h > 0 \):
Thus,
Step 2: Compute RHD Using \( x = c + h \)
For the right-hand derivative, let \( x = 3 + h \) where \( h > 0 \):
Thus,
Since
we conclude that \( f(x) = |x - 3| \) is differentiable at \( x = 3 \) with derivative \( f'(3) = 1 \).
Why This Method is Useful
- Avoids unnecessary manipulation of absolute values, greatest integer function or piecewise cases. When \( c \neq 0 \), using \( x = c - h \) and \( x = c + h \) provides a straightforward approach.
- Simplifies substitution by reducing expressions in terms of \( h \), making the limit evaluation more structured.
- Enhances clarity when handling non-zero points without rewriting the function in terms of \( x \to c^- \) and \( x \to c^+ \).
This method is especially helpful in problems where functions involve shifts, such as \( |x - c| \), polynomials centered at nonzero points, or trigonometric functions evaluated at specific locations.