Differential calculus
Differential calculus is the study of rates-of-change, with the objects of study being the derivatives of functions. The derivative of a function (older names include gradient function and differential coefficient) is a function that yields the instantaneous rate-of-change (the ‘gradient’) of the original function at each input value.
The Leibniz notation for derivatives gives us the derivative operator \frac{d}{dx}, where x is the input value. This is used as in \frac{dy}{dx}, which represents the derivative of the function y with respect to x. The n-th derivative is notated as \frac{d^n}{dx^n}, such as with the notation \frac{d^2y}{dx^2} for the second derivative of the function y.
The Lagrange notation for derivatives is useful for concisely notating functions in abstract, where for the function f(x), the first derivative is notated f’(x), the second derivative is notated f’’(x), etc. For higher derivatives where this notation could become cumbersome, the notation f^{(n)}(x) can be used, such as with the notation f^{(4)}(x) for the fourth derivative of f.
Derivative of an affine function
An affine function is a function which describes a straight line (a line of constant gradient). The derivative of an affine function is a constant function (a function with output the same for every input value) which gives the gradient of the entire line.
The gradient m of a straight line is given by the ratio of the vertical and horizontal delta between any two distinct points on the line:
This can be stated with respect to the function y = f(x) that specifies the line and the two distinct input values x_0 and x_1:
It can also be stated in terms of a single input value x and a non-zero horizontal delta \Delta x:
As an example, we can find the gradient m of the line y = 2x + 3, using an input value 0 and a horizontal delta of 1:
Derivative of a continuous function
A continuous function is a function which describes a single unbroken curve (every point on the curve has a non-vertical tangent). The derivative of a continuous function is a function which gives the gradient of the original function for any input value. More specifically, the gradient at a particular input value is the gradient of the tangent to the graph of the function for that input value.
The gradient at a point of a continuous function can be approximated by the equation for the gradient of a straight line, where the error is proportional to the value of \Delta x:
From this, the derivative of a function can be seen to be the limit of the prior equation as \Delta x approaches 0 (we can’t directly substitute \Delta x for 0 here, as this would result in a division by 0, which is undefined):
As an example, we can find the derivative \frac{dy}{dx} of the function y = x^2:
The sum rule
To differentiate the sum of two functions, such as with the equation y=(x^2+c)+(ax^4+b) which is the sum of the functions u=x^2+c and v=ax^4+b, the two functions can be differentiated independently and the derivatives summed. For this example, the independent derivatives are \frac{du}{dx} = 2x and \frac{dv}{dx} = 4ax, with the derivative of the whole equation being \frac{dy}{dx} = 2x + 4ax.
This can be proven by seeing that:
The chain rule
To differentiate an equation that can be represented as a nesting of functions, such as with the equation y=(x^2+a^2)^\frac{3}{2} which is the nesting of the functions u=x^2+a^2 and y=u^\frac{3}{2}, each function can be differentiated independently and the derivatives multiplied together. For this example, the independent derivatives are \frac{du}{dx} = 2x and \frac{dy}{du} = \frac{3}{2}u^\frac{1}{2}, which are then multiplied together:
This can be proven by seeing that: