The derivative of a function f at a point
a is formally defined as f′(a)=limh→0[f(a+h)−f(a)]/h, provided this limit exists, in
which case f is called differentiable at a. Computing f′(x) for a general point x
directly from this limit -- expanding f(x+h), subtracting f(x), dividing by h, and only
then letting h→0 -- is called differentiating from first principles, and is the foundation
every later shortcut formula (the power rule, the product and quotient rules, the trigonometric
derivatives) is built on and justified by. As with ordinary limits, a left-hand derivative and a
right-hand derivative can be defined using one-sided limits, and f is differentiable at a
only when both exist and agree -- a function like ∣x∣ at x=0 is a standard example where
they disagree, so the function fails to be differentiable there even though it is perfectly
continuous.