let us start by taking two points on the curve y=x2, the first with x-coordinate x, and the second x+Δx and drawing a straight line between them. We can form a right-angled triangle, with two sides parallel to the x and the y axes. These have length Δx and Δy respectively. What is the gradient of the straight line connecting the two points? Trivially, it is Δy/Δx by the definition of the gradient. Let us now write Δy = (y + Δy) - y. This seems like an obvious statement, however if we note that since y=x2, (y+Δy) = (x+Δx)2. our expression becomes: Δy = (x+Δx)2 - x2. Expanding, we get: Δy = x2 + 2xΔx + Δx2 - x2, and the x2 terms cancel out. Dividing both sides by Δx gives us: Δy/Δx = 2x + Δx.
Up to this point, we have been talking about a straight line connecting two arbitrarily chosen points on the curve. A straight line is only an approximation to the curve; if the points are far apart, the curve in between the points clearly doesn't follow the straight line. However, as the two points get closer together, the straight line gets closer to the curve; the approximation is improving. In fact, as the separation of the points approaches zero, the approximation becomes exact. Let us therefore take our equation for the approximate gradient of the curve between two points, and take the limit as the separation Δx approaches zero: lim(Δy/Δx) as Δx->0 = dy/dx = 2x; the Δx term vanishes to zero. We have therefore calcuated the gradient of the curve y=x2. It is worth noting that the result, dy/dx = 2x, is a function of x; we can therefore find the gradient at any particular point along the curve by inserting a value of x into the equation. What does this mean? Well as an example, let us suppose the x-axis represents time, and the y axis represents the position of an object at a given time. The gradient is therefore how much distance has been travelled in a given amount of time, i.e. the speed of the object.