# What is the derivative of a function?

Derivatives play an important role in setting up balances that deal with a change of mass, energy, and momentum. The post Introduction to mass, energy, and momentum balances explains this idea further. But what is a derivative? And can we define a mathematical proof of this concept? This article will help to clarify these questions. We will do this by studying the derivatives of linear and polynomial equations. We will however not study the derivatives of more complex equations like logarithmic, trigonometric, and power functions.

## Definition of the derivative

The derivative of a function is defined as the change of the function (y) relative to a small change of the variable (x). The derivative is written in the form of y’ or dy/dx. The process of calculating the derivative is called differentiation.

$y'=\frac{dy}{dx}=\frac{\triangle y}{\triangle x}$

An example from the introduction to balances was a population balance of the Netherlands. So can we therefore now apply the concept of derivatives to the concept of balances? Indeed, yes we can.

The general framework of balances consisted of accumulation, in, out, and production.

$accumulation=in - out + prod$

Accumulation is just another word for change of the variable over time. Then this takes the form of the time derivative. We will denote the number of people with N and the time with t.

$accumulation=\frac{dN}{dt}=\frac{\triangle N}{\triangle t}$

Filling in the numbers (see picture) gives the value for the time derivative as a result.

$\frac{dN}{dt}= 230 739-151 545+172 520-148 997=102 717$

This example served to convey the idea that the derivative is ratio of the change of the function (number of people) over the change the variable (time). However, the accuracy of the derivative is dependent on the step size of the variable. Therefore more accurate values of the derivative would we obtained by taking the numbers on a monthly, daily, or even hourly basis.

## Derivative of linear equations

Linear equations consist of a slope (a) and an intersect (b).

$y=ax + b$.

The derivative is equal to the change of y relative to the change of x. Or to the slope in the case of linear equations.

$\frac{dy}{dx}=\frac{y2 - y1}{x2 - x1}=\frac{a(x2-x1)}{x2-x1}=a$

Let’s test this principle with an example. What is the derivative of the following function?

$y=6x+3$

$y'=\frac{dy}{dx}=a=6$

We can also use the definition of the derivative to check this result. This can be done by calculating the rate of change of y over a small change of x. We can for example take the difference between x2 = 2.1 and x1 = 2.

$y'=\frac{y(2.1) - y(2)}{2.1 - 2}=\frac{6 \cdot 2.1 + 3 - 6 \cdot 2 - 3}{0,1}=\frac{0.6}{0.1}=6$

The definition of the derivative gives also a value of 6. This equation and it’s derivative can also be plotted in a graph. It can be seen that the function is changing with a constant speed of 6 and that the derivative of the function is always equal to 6.

## Derivative polynomial equation

Polynomial equations are characterized by containing a variable x that is raised to a power of 2 or higher. For example a second order polynomial:

$y=ax^2 + bx + c$

Then the derivative takes the general form:

$y'=2ax + b$

This indicates that the derivative of polynomial equations is dependent on the value of x. Let’s study this concept further with an example of a second order polynomial.

$y=6x^2 + 4x + 3$

The derivative of the function appears to be linear with a slope of 12 and an intersect of 4.

$y'=2 \cdot 6x + 4=12x + 4$

### Derivative at specific values of x

The function at point x = 2 is equal to 35.

$y(2)=6 \cdot 2^2+4 \cdot 2+3=35$

The derivative at point x = 2 is equal to 28.

$y'(2)=12 \cdot 2 + 4=28$

This means that the original function is changing with a slope of 28 at point x = 2. Although other values would be obtained for different values of x. Polynomial equations therefore differ from linear equations by having a variable slope. This result can be approximated by calculating the difference of the function over a very small step around x = 2.

$y'(2)=\frac{y(2.01) - y(2)}{2.01 - 2}=\frac{(6 \cdot 2.01^2+4 \cdot 2.01) - (6 \cdot 2^2+4 \cdot 2)}{0.01}$

$y'(2)=\frac{0.2806}{0.01}=28.06$

We could approximate the actual value of 28 more accurately by taking a smaller step size around x = 2.

### Second derivative

The derivative of the first derivative is called the second derivative.

$(y''=\frac{d^2y}{dx^2})$

The derivation of the second derivative proceeds in similar way as the first derivative. The blue line in the following graph indicates that the function proceeds with an increasing slope. This can also be seen by noting that the red line or first derivative is changing linearly over x. This linearity means that the second derivative is a constant.

## Higher order polynomial equations

Higher order polynomials contain the variable x that is raised to a power bigger than 2.

$y = a \cdot x^n$

The general form of the derivative can be computed by the following form:

$y' = n \cdot a \cdot x^{n-1}$

We could for example have the following polynomial:

$y = 6x^3 + 4x^2 + 8x + 1$

Then the first derivative would be:

$\frac{dy}{dx} = 3 \cdot 6x^2 + 2 \cdot 4x^1 + 1 \cdot 8x^0$

$\frac{dy}{dx} = 18x^2 + 8x + 8$

And proceeding the differentiation even further:

$\frac{d^2 y}{dx^2} = 2 \cdot 18x^1 + 1 \cdot 8x^0$

$\frac{d^2 y}{dx^2} = 36x + 8$

The third derivative is a constant.

$\frac{d^3 y}{dx^3} = 36$