Blog

What are derivatives really?

  • #math

TL;DR: Derivatives measure the slope at a given point.

When we have a linear function like:

f(x)=2xf(x)=2x

We know the slope is 2 because as x changes by 1, y changes by 2. So the derivative of 2x is 2.

But if we have a quadratic function (or any other function where the slope isn’t constant) like x2x^2 then the slope changes at different points. We can approximate it at a given point by changing x slightly and then calculating the slope. The smaller the change the more exact our slope is:

dfdx=limh0f(x+h)f(x)h\frac{df}{dx} = \lim\limits_{h \to 0} \frac{f(x+h) - f(x)}{h}

That’s the definition for derivatives with limits. A limit describes the value the function will reach as it gets closer to a value in this case 0. Now from the limit definition we can derive the derivative of x2x^2:

(x+h)2x2h=2xh+h2h=2x+hh02x\frac{(x+h)^2 - x^2}{h} = \frac{2xh + h^2}{h} = 2x + h \xrightarrow{h \to 0} 2x

which generalizes to the power rule:

ddxxn=nxn1\frac{d}{dx} x^n = n \cdot x^{n-1}

There are multiple notations for derivatives. The Leibniz one used here is: dfdx\frac{df}{dx}. Then there’s also the Lagrange notation which uses apostrophes so ff' for the first derivative. Newton uses a dot and it specifically means the derivative with respect to time f˙\dot{f}, you’ll see it mostly in physics.

Now here’s a list of common functions and their derivatives:

f(x)f(x)f(x)f'(x)Notes
cc (a constant)00A flat line has no slope
xx11Power rule with n=1n=1
xnx^nnxn1n \cdot x^{n-1}Works for any real nn, not just integers
exe^xexe^xFunction is the same as the derivative
ln(x)\ln(x)1x\frac{1}{x}Only defined for x>0x > 0
sin(x)\sin(x)cos(x)\cos(x)Differentiate four times and you’re back to sin(x)\sin(x)
cos(x)\cos(x)sin(x)-\sin(x)Watch the minus sign
x\sqrt{x}12x\frac{1}{2\sqrt{x}}Power rule with n=12n=\frac{1}{2}

Now knowing what derivatives are, there are a few nice side effects that are helpful for analyzing functions:

  1. Critical points are where the slope of a function equals 0
  2. The Second Derivative Test (SDT) tells us what kind of critical point that is.

So for example x2x^2 has exactly 1 Critical Point at (0,0)(0,0) because the second derivative is 2, which is positive, so it’s a local minimum. So we can use derivatives to maximize a function and more generally find its critical points and classify them using SDT.

In this post I just scratched the surface of calculus, there is way more to it. If you want to go deeper I’d recommend Dr. Chris Tisdell’s videos. He has a great playlist called Engineering Mathematics