In order to fully understand how differentiation works, it is useful to be able to derive it. To do this, we must first consider the general curve y = f(x), we'll make this curve more specific later on. First, take a general point on this curve, (x1, f(x1)) and draw the tangent to the curve at this point, this is the gradient we will try and find. Then, take another point with an x coordinate "h" larger, (x1+h, f(x1+h)), this value will vary as we continue. By drawing a line between these two points, and calculating the gradient (using change in y/change in x, i.e. [f(x1 + h) - f(x1)]/h) we get an approximation to the gradient at x1. One thing that's important to notice, is that if you were to reduce "h", the line drawn gets increasingly close to the tangent we drew previously. The first thought here would be to set "h" to zero, but this isn't feasible as we would need to divide by zero i. Luckily, some clever mathematicians thought about this and came up with something called a limit. If we set the limit as "h" tends to zero, we are effectively able to choose when to set h = 0. Because of this, we can freely rearrange the gradient equation without worrying about division by zero. By rearranging the equation so that there is also a factor of “h” in every term in the numerator (possible with any f(x) ), we can cancel out the other “h”. Now it is possible to set h = 0 as it is not present in the denominator and therefore no division by zero will occur. Depending on your f(x), this process will vary in difficulty, but it will always be possible, and will always output the derivative. (I would give an example with f(x)= x2.)