Why can a derivative be non-linear?

Edited

OK, so I'll try to make this post more self contained.

To find an equation of the tangent line to any function $y = f(x)$ at the point $A(x_0, y_0)$, iff $f(x)$ is differentiable at that point, one needs to calculate its algebraic form as $$ y = y_0 + f'(x_0)(x - x_0) $$ so, as you can see, even though you calculate $f'(x)$ to find tangent line slope, it's evaluated at $x_0$, which makes it a number, but that number will change when you move from point to point.

Now, let's consider that example $$ y = x^3 \implies y' = 3x^2 \implies y = x_0^3 + 3x_0^2(x - x_0) = 3x_0^2 x - 2x_0^3 $$ Simple animation of the tangent line when point it was calculated at is moving provided below.

enter image description here


The slope of a single tangent line is a constant: it's the $m$ in the equation $y=mx+b$ for that line. So if the derivative of $f(x)$ is $2x$ (for example) then you already have a different slope at each point of $y=f(x)$, and therefore an entirely different tangent line at each point.


The derivative at a precise point $x$ is the slope of the tangent line at this point. But the derivative is a function so the slope is moving while $x$ is moving. Actually the derivative can be viewed as the variation of the slope of the tangent line.

For exemple, the slope of the tangent line of the function $x \to x^3$ increases faster than the slope of $x \to x^2$. In the first case quadratically and in the second linearly.


Maybe you are searching for the differential not the derivative. The differential of a function in a point is a linear map of the displacement (by definition). Please note that linear map means that the transformation law is linear AND the domain and the codomain of the map is a linear space. Indeed the displacement can be taken to be as large as you want and the differential will always be defined and linear, even though the displaced point is not anymore in the domain of the function. That's why physicists call the increment of the indipendent variable "virtual displacement" when they deal with differentials (and also differential forms in general), because the displaced point can be impossible, that is not available in the domain of the function that you are differentiating, so it is "virtual".


The derivative is a limit at a single point. When the limit exists for a given point this specific point is said to be differentiable.

A differential equation is an equation that generalises all of the differentiable points for a given function.

In your case the function $f(x) = x^{3}$ has all of its derivatives generalised by the equation $g(x) = 3x^{2}$. At a given point, say $x=2$, the derivative will be $3×(2)^{2} = 12$, so the gradient of a tangent line at $x=2$ will be $12$.