\( \definecolor{colordef}{RGB}{249,49,84} \definecolor{colorprop}{RGB}{18,102,241} \)

Differential Calculus

Differential calculus is a branch of mathematics that deals with rates of change. The derivative of a function at a chosen input value describes the instantaneous rate of change of the function at that value. The process of finding a derivative is called differentiation. Geometrically, the derivative at a point is the slope of the tangent line to the graph of the function at that point.
More generally, for a function \(f\), we can define a derivative function or gradient function, denoted \(f'\), which allows us to calculate the gradient of the tangent at any point on the function.
We have previously differentiated simple functions involving powers of \(x\). In this chapter, we will explore the rules and techniques for differentiating more complicated functions.

Derivative

Rate of Change

Definition Rate of Change
The rate of change of a function \(f\) between two points \(A(a, f(a))\) and \(B(b, f(b))\) is the gradient of the secant line \((AB)\).$$ \textcolor{colordef}{\text{Rate of change} = \dfrac{f(b)-f(a)}{b-a}} $$

Limit Definition of the Derivative

To find the rate of change at a single point \(A\), we can examine the average rate of change over a very small interval. Let the second point be \(B(a+h, f(a+h))\), where \(h\) is a small change in \(x\). The gradient of the secant line \((AB)\) is given by:$$ \dfrac{f(a+h) - f(a)}{(a+h)-a} = \dfrac{f(a+h) - f(a)}{h} $$As we let \(B\) get closer to \(A\), the value of \(h\) approaches 0. The secant line approaches the tangent line at point A. The limit of the secant slopes is the slope of the tangent, which we define as the instantaneous rate of change.
Definition The Derivative at a Point
The derivative of a function \(f\) at a point \(a\), denoted \(f'(a)\), is the instantaneous rate of change of the function at that point. It is defined by the limit:$$ \textcolor{colordef}{f'(a) = \lim_{h \to 0} \dfrac{f(a+h)-f(a)}{h}} $$Geometrically, \(f'(a)\) is the slope of the tangent line to the graph of \(f\) at the point \((a, f(a))\).
Example
Use first principles to find the derivative of \(f(x)=x^2\) at the point \(x=1\).

We evaluate the limit of the rate of change as \(h \to 0\).$$\begin{aligned}\dfrac{f(1+h)-f(1)}{h} &= \dfrac{(1+h)^2 - 1^2}{h} \\ &= \dfrac{(1+2h+h^2) - 1}{h} \\ &= \dfrac{2h+h^2}{h} \\ &= \dfrac{h(2+h)}{h} \\ &= 2+h \quad (\text{for } h \neq 0)\end{aligned}$$Now, we take the limit:$$ f'(1) = \lim_{h \to 0} (2+h) = 2 $$The derivative at \(x=1\) is 2. This means the slope of the tangent line to the graph of \(f(x)=x^2\) at the point \((1,1)\) is 2. The diagram below shows how the slope of the secant line from \((1,1)\) to \((1+h, f(1+h))\) approaches the slope of the tangent as \(h\) gets smaller.

Derivative Function

By finding the derivative at a general point \(x\) instead of a specific point \(a\), we can construct a new function, \(f'(x)\), whose value at any \(x\) is the slope of the tangent to the original function \(f(x)\) at that point.
The process of finding the derivative using this limit is called differentiation from first principles.
Definition The Derivative Function
The derivative function of \(f\), denoted \(f'\), is the function defined by:$$ f'(x) = \lim_{h \to 0} \dfrac{f(x+h)-f(x)}{h} $$
Example
For \(f(x)=x^2\), find \(f'(x)\).

We evaluate the limit of the rate of change.$$\begin{aligned}\dfrac{f(x+h)-f(x)}{h} &= \dfrac{(x+h)^2 - x^2}{h} \\ &= \dfrac{x^2+2xh+h^2-x^2}{h} \\ &= \dfrac{2xh+h^2}{h}\\ &= \dfrac{h(2x+h)}{h}\\ & = 2x+h \quad (\text{for } h \neq 0)\\ &\xrightarrow[h \to 0]{ } 2x.\end{aligned}$$So$$ f'(x) = \lim_{h \to 0} \dfrac{f(x+h)-f(x)}{h} = 2x $$

While the "prime" notation \(f'(x)\) is compact, an alternative notation developed by Gottfried Wilhelm Leibniz is often more descriptive and versatile, especially when dealing with the chain rule or differential equations.
Definition Leibniz Notation
Let \(y\) be a function of \(x\), i.e., \(y=f(x)\).
The derivative function can be written as:$$ \dfrac{dy}{dx}=f'(x)$$This is read as "dee y by dee x" and represents the derivative of \(y\) with respect to the variable \(x\).
  • The term \(\dfrac{dy}{dx}\) should be thought of as a single operator, not a fraction. However, it is derived from the idea of the fraction \(\dfrac{\Delta y}{\Delta x}\) as the change in \(x\) becomes infinitesimally small.
  • We can also use the notation \(\dfrac{d}{dx}[f(x)]\), which is read as "the derivative with respect to \(x\) of \(f(x)\)".
Example
For \(y=x^2\), find \(\dfrac{dy}{dx}\).

The derivative of \(x^2\) is \(2x\). In Leibniz notation, we write:$$ \dfrac{dy}{dx} = 2x $$

Conditions of Differentiability

Before we explore more advanced differentiation rules, it is important to understand the conditions under which a function can be differentiated. This brings us to the concepts of continuity and differentiability.
  • A function is continuous if its graph can be drawn without lifting your pen from the paper. There are no breaks, holes, or jumps.
  • A function is differentiable if it is continuous and its graph is "smooth," meaning it has no sharp corners or vertical tangents.
The most important relationship is that differentiability implies continuity. If a function has a well-defined tangent slope at a point, it must be continuous at that point. However, the reverse is not true; a function can be continuous but not differentiable.
Proposition When a Function is Not Differentiable
A function \(f\) is not differentiable at a point \(x=a\) if its graph has:
  • A discontinuity (a hole or jump).
  • A sharp corner (where the slope from the left does not equal the slope from the right).
  • A vertical tangent (where the slope is infinite).
Example
The graph of a function \(y=f(x)\) is shown. At which x-values is the function not differentiable, and why?

The function is not differentiable at two points:
  • At \(\boldsymbol{x=-1}\), there is a jump discontinuity. Since the function is not continuous here, it cannot be differentiable.
  • At \(\boldsymbol{x=1}\), there is a sharp corner. The slope of the line segment from the left is \(-0.5\), while the tangent to the parabola from the right has a slope of \(-2(1-2)=2\). Since the left and right slopes are not equal, the function is not differentiable at this point.

Rules of Differentiation

While finding a derivative from first principles using the limit definition is fundamental to understanding the concept, it is often a long and repetitive process. To differentiate more complex functions efficiently, mathematicians have developed a set of powerful rules. This section will introduce these essential rules, which form the bedrock of practical differentiation. By mastering them, you will be able to find the derivative of almost any function you encounter.

Basic Rules and Power Functions

We begin with the foundational rules that apply to the most common components of functions, such as constants, powers, and simple arithmetic combinations. These rules can be used to differentiate any polynomial function, as well as many other simple functions, without having to use the limit definition each time.
Proposition Basic Derivative Rules
  • Constant Rule: If \(f(x)=c\), then \(f'(x)=0\).
  • Power Rule: If \(f(x)=x^n\), then \(f'(x)=nx^{n-1}\) for any \(n \in \mathbb{R}\).
  • Constant Multiple Rule: If \(f(x)=c \cdot u(x)\), then \(f'(x)=c \cdot u'(x)\).
  • Sum Rule: If \(f(x)=u(x) + v(x)\), then \(f'(x)=u'(x) + v'(x)\).

Proof for if \(f(x)=u(x)+v(x)\), then \(f'(x)=u'(x)+v'(x)\):
We evaluate the limit of the rate of change.$$\begin{aligned}\dfrac{f(x+h)-f(x)}{h} &= \dfrac{\left[u(x+h)+v(x+h)\right] - \left[u(x)+v(x)\right]}{h} \\ &= \dfrac{\left[u(x+h)-u(x)\right] + \left[v(x+h)-v(x)\right]}{h} \\ &= \dfrac{u(x+h)-u(x)}{h} + \dfrac{v(x+h)-v(x)}{h} \\ &\xrightarrow[h \to 0]{ } u'(x) + v'(x)\quad \text{(sum of limits)}.\end{aligned}$$So \( f'(x) = u'(x)+v'(x) \).
The other proofs are done in Examples.

Example
Find the derivative of \(f(x) = 4x^3 - 5x^2 + 7x - 2\).

We apply the rules to each term:$$\begin{aligned}f'(x) &= \dfrac{d}{dx}(4x^3) - \dfrac{d}{dx}(5x^2) + \dfrac{d}{dx}(7x) - \dfrac{d}{dx}(2) \\ &= 4(3x^2) - 5(2x) + 7(1) - 0 \\ &= 12x^2 - 10x + 7\end{aligned}$$

Product Rule

While the derivative of a sum is the sum of the derivatives, the same is not true for a product. To find the derivative of a function that is the product of two other functions, such as \(f(x) = x^2 \sin(x)\), we must use a specific formula called the Product Rule.
Proposition Product Rule
If \(f(x)=u(x)v(x)\), then$$ f'(x) = u'(x)v(x) + u(x)v'(x) $$In Leibniz notation, if \(y=u\cdot v\) :$$ \dfrac{dy}{dx}= \dfrac{du}{dx}v + u\dfrac{dv}{dx} $$
In words: "The derivative of the first times the second, plus the first times the derivative of the second."
Example
Find the derivative of \(f(x) = (x+1)(x^2+3)\).

  • Using prime notation:
    For \(f(x)=u(x)v(x)\) where \(u(x)=x+1\) and \(v(x)=x^2+3\), the derivatives are \(u'(x)=1\) and \(v'(x)=2x\).$$\begin{aligned}f'(x) &= u'(x)v(x) + u(x)v'(x) \\ &= (1)(x^2+3) + (x+1)(2x) \\ &= x^2+3 + 2x^2+2x \\ &= 3x^2+2x+3\end{aligned}$$
  • Using Leibniz's notation (\(y=f(x)\)):
    For \(y=uv\) where \(u=x+1\) and \(v=x^2+3\), the derivatives are \(\frac{du}{dx}=1\) and \(\frac{dv}{dx}=2x\).$$\begin{aligned}\dfrac{dy}{dx} &= \dfrac{du}{dx}v + u\dfrac{dv}{dx} \\ &= (1)(x^2+3) + (x+1)(2x) \\ &= x^2+3 + 2x^2+2x \\ &= 3x^2+2x+3\end{aligned}$$

Quotient Rule

Just as with products, finding the derivative of a quotient of two functions requires a specific formula. The Quotient Rule is used to differentiate functions of the form \(f(x) = \dfrac{u(x)}{v(x)}\), such as \(f(x) = \dfrac{e^x}{x^2+1}\).
Proposition Quotient Rule
For \(f(x)=\dfrac{u(x)}{v(x)}\), then$$ f'(x) = \dfrac{u'(x)v(x) - u(x)v'(x)}{[v(x)]^2} $$In Leibniz notation, \(y=\dfrac{u}{v}\), then$$ \frac{dy}{dx} = \dfrac{\frac{du}{dx}v - u\frac{dv}{dx}}{v^2} $$

We can write the quotient as a product:$$ f(x) = \frac{u(x)}{v(x)} = u(x) \cdot [v(x)]^{-1} $$Let \(a(x) = u(x)\) and \(b(x) = [v(x)]^{-1}\). The derivatives are:
  • \(a'(x) = u'(x)\)
  • Using the chain rule for \(b(x)\), we get \(b'(x) = -1 \cdot [v(x)]^{-2} \cdot v'(x) = -\dfrac{v'(x)}{[v(x)]^2}\).
Applying the product rule:$$\begin{aligned}f'(x) &= \left[a(x)b(x)\right]' \\ &= a'(x)b(x) + a(x)b'(x) \\ &= u'(x) \cdot [v(x)]^{-1} + u(x) \cdot \left(-\dfrac{v'(x)}{[v(x)]^2}\right) \\ &= \dfrac{u'(x)}{v(x)} - \dfrac{u(x)v'(x)}{[v(x)]^2}\\ &= \dfrac{u'(x)v(x)}{[v(x)]^2} - \dfrac{u(x)v'(x)}{[v(x)]^2} \\ &= \dfrac{u'(x)v(x) - u(x)v'(x)}{[v(x)]^2}\end{aligned}$$

Example
Find the derivative of \(f(x) = \frac{x}{x+1}\).

  • Using prime notation:
    For \(f(x)=\frac{u(x)}{v(x)}\) where \(u(x)=x\) and \(v(x)=x+1\), the derivatives are \(u'(x)=1\) and \(v'(x)=1\).$$\begin{aligned}f'(x) &= \frac{u'(x)v(x) - u(x)v'(x)}{[v(x)]^2} \\ &= \frac{(1)(x+1) - (x)(1)}{(x+1)^2} \\ &= \frac{x+1-x}{(x+1)^2} \\ &= \frac{1}{(x+1)^2}\end{aligned}$$
  • Using Leibniz's notation \((y=f(x))\):
    For \(y=\frac{u}{v}\) where \(u=x\) and \(v=x+1\), the derivatives are \(\frac{du}{dx}=1\) and \(\frac{dv}{dx}=1\).$$\begin{aligned}\frac{dy}{dx} &= \frac{\frac{du}{dx}v - u\frac{dv}{dx}}{v^2} \\ &= \frac{(1)(x+1) - (x)(1)}{(x+1)^2} \\ &= \frac{x+1-x}{(x+1)^2} \\ &= \frac{1}{(x+1)^2}\end{aligned}$$