So I was thinking about what I have learnt and I realised that I kind of took the derivative of a function for granted. So I did some research as I wanted to find out how this was discovered and I stumbled upon this.
More specially, here is a passage from it:
Without going into too much complicated detail, Newton (and his contemporary Gottfried Leibniz independently) calculated a derivative function $f'(x)$ which gives the slope at any point of a function $f(x)$. This process of calculating the slope or derivative of a curve or function is called differential calculus or differentiation (or, in Newton’s terminology, the “method of fluxions” - he called the instantaneous rate of change at a particular point on a curve the "fluxion", and the changing values of x and y the "fluents"). For instance, the derivative of a straight line of the type $f(x) = 4x$ is just $4$; the derivative of a squared function $f(x) = x^2$ is $2x$; the derivative of cubic function $f(x) = x^3$ is $3x^2$.
I was wondering if anyone could explain (or point me to a resource) the "complicated details" (or hopefully, a rigorous proof) of how the derivative function $f'(x)$ was discovered?