Derivative
Definition of the Derivative at a General Point \( x \)
We have defined the derivative at a specific point \( x = c \) as
Now, we rewrite the derivative of a function \( f(x) \) at a general point \( x \). Rememeber that we are doing nothing new, neither it is a new definition, it is just we are writing derivative at a general point \(x\) instead of a specific point \(c\).
Consider a fixed point \( P(x, f(x)) \) on the graph of \( y = f(x) \). In a neighborhood of \( x \), take another point \( x + h \), where:
- If \( h > 0 \), then \( x + h \) lies on the right of \( x \).
- If \( h < 0 \), then \( x + h \) lies on the left of \( x \).
The corresponding point on the graph is
The line segment PQ is a secant to the curve, and its slope is given by
Now, as \( h \to 0 \), the point \( Q \) moves closer to \( P \), and the secant approaches a tangent line at \( P(x, f(x)) \). The limiting value of the secant slope, if it exists, gives the slope of the tangent line, which we define as the derivative:
Thus, the derivative \( f'(x) \) represents the slope of the tangent to the curve at the point \( P(x, f(x)) \), provided the limit exists.
Example
Let us find the derivative of \( f(x) = x^2 \) at a general point \( x \) on it. By definition,
Substituting \( f(x) = x^2 \),
Canceling \( h \),
Taking the limit,
Thus, the slope of the tangent to the curve at any point \( (x, f(x)) \) is \( 2x \). For example, at \( x = \frac{1}{2} \),
This means the tangent at \( \left(\frac{1}{2}, \frac{1}{4}\right) \) has slope \( 1 \). If this tangent makes an angle \( \theta \) with the positive \( x \)-axis, then
implying \( \theta = 45^\circ \).
At \( x = 2 \), the slope of the tangent is
If this tangent makes an angle \( \alpha \) with the positive \( x \)-axis, then
which gives the inclination of the tangent at \( (2,4) \).
Example
Let us find the derivative of \( f(x) = \sin x \) at a general point \( x \) using the definition:
Using the identity,
we rewrite the difference quotient as
Rewriting the fraction,
Since
we obtain
Thus, the derivative of \( f(x) = \sin x \) is \( f'(x) = \cos x \).
That means at \( x = \frac{\pi}{3} \), the slope of the tangent to the curve \( y = \sin x \) is
If this tangent makes an angle \( \theta \) with the positive \( x \)-axis, then
which implies
Similarly, at \( x = \frac{\pi}{4} \), the slope of the tangent is
which means if this tangent makes an angle \( \alpha \) with the positive \( x \)-axis, then
so that
At \( x = \pi \),
Thus, the tangent at \( (\pi, 0) \) has slope \( -1 \), meaning the tangent line makes an angle \( 135^\circ \) with the positive \( x \)-axis, since
This confirms that the slope of the tangent line to the curve \( y = \sin x \) varies as \( \cos x \), controlling the steepness and inclination at different points.
Example
Let us find the derivative of \( f(x) = e^x \) at a general point \( x \) using the definition:
Rewriting the numerator,
we obtain
Since the limit
is a fundamental result, we conclude that
Thus, the derivative of \( f(x) = e^x \) is \( f'(x) = e^x \), meaning the slope of the tangent at any point \( (x, e^x) \) is exactly \( e^x \), the function value itself.
For example, at \( x = 0 \),
so the tangent line at \( (0,1) \) has slope \( 1 \), making an angle \( 45^\circ \) with the positive \( x \)-axis since
We have seen that the derivative of a function \( f(x) \) at a point \( x \) is defined as the limit
whenever this limit exists. This definition provides a direct way to compute derivatives by evaluating the difference quotient and taking the limit as \( h \to 0 \). We call this process of calculating derivatives as differentiation.
However, as the complexity of \( f(x) \) increases, evaluating this limit directly for every function becomes increasingly difficult. Functions such as polynomials, trigonometric expressions, exponential functions, and logarithmic functions all require distinct algebraic manipulations to simplify the difference quotient before taking the limit. While we have successfully applied the definition to simple functions like \( f(x) = x^2 \), \( f(x) = \sin x \), and \( f(x) = e^x \), performing such calculations repeatedly for every new function is impractical.
To address this challenge, we adopt a structured approach. First, we compute the derivatives of a small set of elementary functions—such as polynomials, exponentials, and trigonometric functions—using the definition. These results serve as fundamental building blocks. Next, we develop an algebra of derivatives, which consists of general rules that allow us to compute the derivative of more complex functions without repeatedly applying the limit definition.
For example, if we know the derivatives of \( f(x) \) and \( g(x) \), we derive rules for the derivative of their sum, product, and quotient. Furthermore, we establish methods for differentiating composite functions, leading to powerful techniques such as the chain rule.
Thus, differentiation—the process of computing derivatives—becomes a systematic procedure rather than an exercise in limit evaluation for each function individually. By combining known derivative formulas with the rules of differentiation, we can efficiently compute the derivative of any function encountered in calculus.
In the next chapter, we develop these differentiation rules rigorously, ensuring that we can compute derivatives for a wide class of functions with precision and efficiency.
Calculating LHD and RHD using LHL and RHL of derivative of the function
The right-hand derivative (RHD) of \( f(x) \) at \( x = c \) is defined as
Similarly, the left-hand derivative (LHD) at \( x = c \) is
Both these limits take the indeterminate form \( \frac{0}{0} \) when \( f(x) \) is differentiable at \( x \). We can evaluate these rules using L'Hôpital's Rule. But to evaluate them like this, the conditions of L'Hôpital's Rule must be satisfied:
-
\( f(x) \) must be differentiable in an open interval containing \( c \) (except possibly at \( x = c \)).
-
The limit
\[ \lim_{x \to c^+} f'(x) \]must be finite or \( \pm\infty \), and similarly,
\[ \lim_{x \to c^-} f'(x) \]must be finite or \( \pm\infty \).
If either or both these limits do not exist, then we cannot conclude anything.
Applying L'Hôpital's Rule,
and
Thus, the right-hand derivative at \( x = c \) is given by the right-hand limit of \( f'(x) \), and the left-hand derivative is given by the left-hand limit of \( f'(x) \). If these two limits exist and are equal, then \( f(x) \) is differentiable at \( x = c \), and its derivative is
If the left-hand and right-hand derivatives do not agree, the function is not differentiable at \( x = c \).
Geometrically, the right-hand derivative (RHD) at a point \( x = c \) is computed by taking a point \( x \) near \( c \) on its right side and considering the slope of the secant line joining \( (c, f(c)) \) and \( (x, f(x)) \). Mathematically, this is given by
As \( x \to c^+ \), this secant line approaches the tangent line at \( (c, f(c)) \), and its slope approaches the RHD,
Now, instead of considering secant lines, suppose we draw a tangent line at \( (x, f(x)) \) for each point \( x \) near \( c \) on the right. Each of these tangents has a slope given by \( f'(x) \), and as \( x \to c^+ \), these tangent lines approach the tangent line at \( (c, f(c)) \). Consequently, the slopes of these tangents approach the slope of the final tangent at \( (c, f(c)) \). This means that
establishing that the right-hand derivative is equal to the right-hand limit of \( f'(x) \).
A completely analogous argument holds for the left-hand derivative (LHD), where we consider points \( x \) near \( c \) on the left and analyze the corresponding secant and tangent lines. Thus,
This geometric interpretation confirms that differentiation is a limiting process where both secant approximations and local tangent behavior lead to the same fundamental conclusion.
Continuity of Derivative
When
in \( \mathbb{R} \), it follows that the left-hand derivative and right-hand derivative of \( f(x) \) at \( x = c \) are equal. This implies that \( f(x) \) is differentiable at \( x = c \), and
By the definition of continuity, a function \( g(x) \) is continuous at \( x = c \) if
Applying this to \( f'(x) \), we conclude that \( f'(x) \) is continuous at \( x = c \). This shows that when the left-hand limit and right-hand limit of \( f'(x) \) exist and are equal, then \( f'(x) \) must be continuous at \( x = c \).
Now, in many situations, we do not need to calculate the left-hand derivative (LHD) and right-hand derivative (RHD) using original definitions directly. Instead, we can use derivatives. So we first differentiate the function (wherever possible) and then evaluate the left-hand limit (LHL) and right-hand limit (RHL) of the derivative function to obtain the LHD and RHD.
Consider the function
We want to find \( \text{LHD} \) and \( \text{RHD} \) at \( x = 1 \). Using the original definitions of LHD and RHD, we could compute
However, instead of proceeding this way, we first differentiate \( f(x) \) in its respective domains. We obtain
We remove the equality at \( x = 1 \) because we do not yet know whether \( f(x) \) is differentiable at \( x = 1 \). Now, we compute the left-hand limit (LHL) and right-hand limit (RHL) of \( f'(x) \) at \( x = 1 \):
Since the left-hand limit of \( f'(x) \) equals the left-hand derivative of \( f(x) \), and the right-hand limit of \( f'(x) \) equals the right-hand derivative of \( f(x) \), we conclude:
Since \( \text{LHD} \neq \text{RHD} \), \( f(x) \) is not differentiable at \( x = 1 \), and we do not put an equality sign in the definition of \( f'(1) \) because \( f'(1) \) does not exist.
This approach provides a convenient way to check differentiability at a point by first computing the derivative where it exists and then evaluating its left-hand and right-hand limits.
Consider another example:
We first check continuity at \( x = 1 \). Evaluating the left-hand and right-hand limits:
Since both limits equal \( f(1) = 1 \), the function is continuous at \( x = 1 \).
Now, we check differentiability at \( x = 1 \). Differentiating \( f(x) \) in its respective domains:
Since we do not yet know whether \( f(x) \) is differentiable at \( x = 1 \), we remove the equal sign at \( x = 1 \). Now, we compute the left-hand and right-hand limits of \( f'(x) \) at \( x = 1 \):
Since both limits are equal, \( f(x) \) is differentiable at \( x = 1 \), and we can now write
Thus, the derivative exists at \( x = 1 \), and we can now include the equality sign in \( f'(x) \), giving
This confirms that \( f(x) \) is differentiable at \( x = 1 \), and its derivative is continuous there.
Discontinuous Derivative
We know that if a function \( f(x) \) is differentiable at \( x = c \), then it must be continuous at \( x = c \).
Now, consider this question:
If \( f(x) \) is continuous, is its derivative \( f'(x) \) necessarily continuous?
A simple counterexample shows that the answer in 'No'. Consider \( f(x) = |x| \), which is a continuous function. However, it is not differentiable at \( x = 0 \), and for \( x > 0 \),
Thus, \( f'(x) \) has a missing point discontinuity at \( x = 0 \). The function \( f(x) = |x| \) is continuous, but its derivative is discontinuous at \( x = 0 \).
Now, consider a more subtle question:
Can \( f(x) \) be differentiable at all points but still have a discontinuous derivative \( f'(x) \)?
Yes. A classical example is
We know that this function is continuous for all \( x \in \mathbb{R} \).
Because it is just product of polynomial and trigonometric fucntion it is always differentiable for all \(x\ne 0\). Next, we check differentiability at \( x = 0 \). The left-hand derivative is
Similarly, the right-hand derivative is
Thus, \( f(x) \) is differentiable at \( x = 0 \), and
So we can conclude that for this fucntion the derivative exists at all points \(\mathbb{R}\).
But is \(f'(x)\) continuous for \(x\in \mathbb{R}\)? Let us check.
For \( x \neq 0 \), differentiating \( f(x) = x^2 \sin(1/x) \) using the product rule gives
This function is clearly continuous for all \(x\ne 0\). But for \(x=0\) we still need to check.
To check whether \( f'(x) \) is continuous at \( x = 0 \), we need to prove that \(\lim_{x \to 0} f'(x) = f'(0)\). So we evalaute,
Since \( 2x \sin(1/x) \to 0 \) as \( x \to 0 \), the behavior of \( f'(x) \) near \( x = 0 \) is dominated by the term \( -\cos(1/x) \), which oscillates between -1 and 1 without settling to a single value. Thus,
Since \( \lim_{x \to 0} f'(x) \) does not exist, \( f'(x) \) is discontinuous at \( x = 0 \), even though \( f(x) \) is differentiable at all points in \( \mathbb{R} \).
This example demonstrates that a function can be differentiable everywhere, yet its derivative can be discontinuous.
Such a strange behavior at \( x = 0 \) can be understood geometrically.
Consider the right-hand derivative (RHD). To compute the RHD, we take a point \( x \) in the right neighborhood of \( 0 \) and draw a secant line joining \( (0,0) \) and \( (x, x^2 \sin(1/x)) \). As \( x \to 0^+ \), the function \( x^2 \sin(1/x) \) oscillates due to the \(\sin(1/x)\) term, but since it is multiplied by \( x^2 \), the amplitude of oscillation shrinks, and the secant line still approaches the horizontal axis. This implies that the slope of the secant tends to zero, confirming that
Thus, the RHD exists and equals zero. A similar argument holds for the left-hand derivative (LHD), meaning that \( f(x) \) is differentiable at \( x = 0 \) with \( f'(0) = 0 \).
However, when examining the derivative function \( f'(x) \) itself, we must look at the slope of the tangent line at \( (x, f(x)) \). At each point \( x \neq 0 \), the tangent line has slope
Unlike the secant lines, the tangent lines do not settle to a limiting slope as \( x \to 0^+ \). Instead, the term \( -\cos(1/x) \) causes the slope to oscillate rapidly between \( -1 \) and \( 1 \), never converging to a single value. Thus,
This explains why \( f(x) \) is differentiable at \( x = 0 \), but \( f'(x) \) is discontinuous at \( x = 0 \). While the secant lines approach a well-defined limit (the horizontal axis), the slopes of the tangent lines never stabilize, leading to a failure of continuity in \( f'(x) \).
Darboux's Theorem
The example \( f(x) = x^2 \sin(1/x) \) demonstrates that a function can be differentiable at all points but still have a discontinuous derivative. This naturally leads to the question: How can the derivative of a function behave when it is discontinuous?
A fundamental result, Darboux's Theorem, provides a crucial insight into this question. It states that if a function \( f(x) \) is differentiable on an interval \( [a, b] \), then its derivative \( f'(x) \) satisfies the intermediate value property. That is, if \( f'(a) \) and \( f'(b) \) take two different values, then for any \( k \) between \( f'(a) \) and \( f'(b) \), there exists some \( c \in (a, b) \) such that
This means that although \( f'(x) \) may be discontinuous, it cannot have a jump discontinuity. Any discontinuity in \( f'(x) \) must be of the oscillatory type, where \( f'(x) \) fluctuates infinitely near some point rather than making a sudden jump.
The derivative \( f'(x) \) represents the slope of the tangent line to the curve \( y = f(x) \). Geometrically, Darboux’s theorem tells us that the slope of the tangent line cannot change abruptly. Instead, it must take all intermediate slopes between its values at two given points. Consider a function \( f(x) \) that is differentiable on an interval \( [a, b] \). At \( x = a \), the tangent line has some slope \( f'(a) \), and at \( x = b \), the tangent line has a different slope \( f'(b) \). The theorem asserts that as we move from \( x = a \) to \( x = b \), the slope must pass through every intermediate value between \( f'(a) \) and \( f'(b) \).
While Darboux’s theorem prevents jump discontinuities, it does not guarantee that \( f'(x) \) is continuous. The derivative can still be discontinuous in an oscillatory manner. This happens when the slope fluctuates infinitely fast, preventing the limit from settling to a single value. The function
is a perfect example. It is differentiable everywhere, but its derivative
oscillates indefinitely near \( x = 0 \), making \( f'(x) \) discontinuous at \( x = 0 \). However, this discontinuity is not a jump; rather, the derivative takes on all values between -1 and 1 infinitely often. This confirms Darboux’s theorem while showing that continuity of \( f'(x) \) is not guaranteed.
Example
The function
cannot be the derivative of any function \( f(x) \), because it has a jump discontinuity at \( x = 0 \).
If \( g(x) \) were the derivative of some function \( f(x) \), then \( f(x) \) would be differentiable everywhere, which would mean that \( f'(x) \) must satisfy Darboux’s Theorem. This theorem guarantees that the derivative of a differentiable function must have the intermediate value property, meaning that it cannot "jump" from one value to another without taking all values in between.
However, in this case, \( g(x) \) jumps from \( -1 \) to \( 1 \) at \( x = 0 \), skipping all intermediate values between \( -1 \) and \( 1 \). Since this violates the intermediate value property, it follows that \( g(x) \) cannot be the derivative of any function.