Differential Calculus#

Introduction#

Calculus is the mathematical study of continously changing quantities. It has two main branches: differential calculus and integral calculus. Differential calculus is concerned with the study of the rates at which quantities change. Integral calculus is concerned with the study of the accumulation of quantities, and is often appleid to the areas under and between curves.

In this section, we will revise the rules for differentiating functions, and then look at some examples of differentiating functions.

Differentiation#

Given a smooth, continuous function \(f(x)\), the derivative of \(f(x)\) with respect to \(x\) is defined (providing the limit exists) as:

\[ \frac{df}{dx} = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h} \]

The derivative of a function \(f(x)\) is often denoted as \(f'(x)\) or \(\frac{df}{dx}\), although authors sometimes pick other notations for convenience.

As is seen in the \(f'(x)\) notation, the derivative of a function is itself a function which is (usually) still dependent on \(x\). This means that the derivative of a function can be evaluated at any point \(x=a\) to give the rate of change of the function at that point. If the derivative is smooth enough, then it can also be differentiated again to give the second derivative, \(f''(x)\), which is the rate of change of the rate of change of the function, and so on to higher powers

When plotting a function, the derivative of the function can be plotted as a second curve on the same plot. The derivative curve will show the rate of change of the function at each point. If the function is increasing, then the derivative will be positive. If the function is decreasing, then the derivative will be negative. If the function is (locally) staying constant, then the derivative will be zero. The derivative curve will also show the rate of change of the function at each point.

Differentiation Rules#

Sum Rule#

The sum rule states that the derivative of a sum of functions is equal to the sum of the derivatives of the functions:

\[ \frac{d}{dx} \left( f(x) + g(x) \right) = \frac{df}{dx} + \frac{dg}{dx} \]

Product Rule#

The product rule states that the derivative of a product of functions is equal to the first function times the derivative of the second function plus the second function times the derivative of the first function:

\[ \frac{d}{dx} \left( f(x) g(x) \right) = f(x) \frac{dg}{dx} + g(x) \frac{df}{dx} \]

Chain Rule#

The chain rule states that the derivative of a function which takes another function as its input is equal to the derivative of the outer function evaluated at the inner function times the derivative of the inner function:

\[ \frac{d}{dx} f(g(x)) = \frac{df}{dg} \frac{dg}{dx}. \]

Quotient Rule#

The quotient rule defines the derivative of a quotient (ie. ratio) of functions as:

\[ \frac{d}{dx} \left( \frac{f(x)}{g(x)} \right) = \frac{g(x) \frac{df}{dx} - f(x) \frac{dg}{dx}}{g(x)^2}. \]

This result can be derived by combining the product rule and the chain rule.

Examples#

Polynomial Functions#

Polynomial functions are functions of the form:

\[ f(x) = a_0 + a_1 x + a_2 x^2 + a_3 x^3 + \dots + a_n x^n \]

where \(a_0, a_1, a_2, \dots, a_n\) are constants. The derivative of a polynomial function is given by:

\[ \frac{df}{dx} = a_1 + 2 a_2 x + 3 a_3 x^2 + \dots + n a_n x^{n-1} \]

This formula can be derived by applying the sum rule and the product rule to the polynomial function, and using the Binomial Theorem to expand the terms in powers of \(h\).

In fact, the formula

\[ \frac{d(x^n)}{dx} = n x^{n-1} \]

holds for all real values of \(n\), including negative values and fractional values, providing we note that \(a^0 = 1\) for all \(a \neq 0\), so there is a slight ambiguity at \(x=0\) and \(n=0\) or \(n=1\).

Exponential Functions#

The derivative of an exponential function is given by:

\[ \frac{d}{dx} e^x = e^x, \]

or more generally,

\[ \frac{d}{dx} a^x = a^x \ln(a) \]

where \(a\) is a positive constant. This last value can be derived by applying the chain rule to the function \(e^{x \ln(a)}=a^x\).

Trigonometric Functions#

The primary Trigonometric functions have derivatives given by:

\[ \frac{d}{dx} \sin(x) = \cos(x), \]
\[ \frac{d}{dx} \cos(x) = -\sin(x), \]
\[ \frac{d}{dx} \tan(x) = \sec^2(x), \]

providing that the argument of the function being used is in radians. The derivatives of the other trigonometric functions can be derived from these using the quotient rule, etc.