### Differentiable

In calculus (a branch of mathematics), a differentiable function of one real variable is a function whose derivative exists at each point in its domain. The graph of a differentiable function must have a non-vertical tangent line at each point in its domain. As a result, the graph of a differentiable function must be relatively smooth, and cannot contain any breaks, bends, cusps, or any points with a vertical tangent.

More generally, if x0 is a point in the domain of a function f, then f is said to be differentiable at x0 if the derivative f′(x0) exists. This means that the graph of f has a non-vertical tangent line at the point (x0f(x0)). The function f may also be called locally linear at x0, as it can be well approximated by a linear function near this point.

For a function of several real variables, there is no notion of derivative. Nevertheless the notion of differentiable function is well defined and widely used; see Differentiability in higher dimensions, below.

## Differentiability and continuity

If f is differentiable at a point x0, then f must also be continuous at x0. In particular, any differentiable function must be continuous at every point in its domain. The converse does not hold: a continuous function need not be differentiable. For example, a function with a bend, cusp, or vertical tangent may be continuous, but fails to be differentiable at the location of the anomaly.

Most functions which occur in practice have derivatives at all points or at almost every point. However, a result of Stefan Banach states that the set of functions which have a derivative at some point is a meager set in the space of all continuous functions. Informally, this means that differentiable functions are very atypical among continuous functions. The first known example of a function that is continuous everywhere but differentiable nowhere is the Weierstrass function.

## Differentiability classes

Main article: Smooth function

A function f is said to be continuously differentiable if the derivative f′(x) exists, and is itself a continuous function. Though the derivative of a differentiable function never has a jump discontinuity, it is possible for the derivative to have an essential discontinuity. For example, the function

$f\left(x\right) \;=\; \begin\left\{cases\right\} x^2\sin \left(1/x\right) & \text\left\{if \right\}x \ne 0 \\ 0 & \text\left\{if \right\}x=0\end\left\{cases\right\}$

is differentiable at 0, since

$f\text{'}\left(0\right)=\lim_\left\{\Delta\to0\right\}\left\left(\frac\left\{\Delta^2\sin\left(1/\Delta\right)-0\right\}\left\{\Delta\right\}\right\right)=0,$

exists. However, for x≠0,

$f\text{'}\left(x\right)=2x\sin\left(1/x\right)-\cos\left(1/x\right)$

which has no limit as x → 0. Nevertheless, Darboux's theorem implies that the derivative of any function satisfies the conclusion of the intermediate value theorem.

Sometimes continuously differentiable functions are said to be of class C1. A function is of class C2 if the first and second derivative of the function both exist and are continuous. More generally, a function is said to be of class Ck if the first k derivatives f′(x), f″(x), ..., f(k)(x) all exist and are continuous. If derivatives f(n) exist for all positive integers n, the function is smooth or, equivalently, of class C.

## Differentiability in higher dimensions

A function f: RmRn is said to be differentiable at a point x0 if there exists a linear map J: RmRn such that

$\lim_\left\{\mathbf\left\{h\right\}\to \mathbf\left\{0\right\}\right\} \frac\left\{\mathbf\left\{f\right\}\left(\mathbf\left\{x_0\right\}+\mathbf\left\{h\right\}\right) - \mathbf\left\{f\right\}\left(\mathbf\left\{x_0\right\}\right) - \mathbf\left\{J\right\}\left(\mathbf\left\{x_0\right\}\right)\mathbf\left\{h\right\}\right\}\left\{\| \mathbf\left\{h\right\} \|\right\} = \mathbf\left\{0\right\}.$

If a function is differentiable at x0, then all of the partial derivatives must exist at x0, in which case the linear map J is given by the Jacobian matrix. A similar formulation of the higher-dimensional derivative is provided by the fundamental increment lemma found in single-variable calculus.

Note that existence of the partial derivatives (or even all of the directional derivatives) does not guarantee that a function is differentiable at a point. For example, the function f: R2R defined by

$f\left(x,y\right) = \begin\left\{cases\right\}y & \text\left\{if \right\}y \ne x^2 \\ 0 & \text\left\{if \right\}y = x^2\end\left\{cases\right\}$

is not differentiable at (0, 0), but all of the partial derivatives and directional derivatives exist at this point. For a continuous example, the function

$f\left(x,y\right) = \begin\left\{cases\right\}y^3/\left(x^2+y^2\right) & \text\left\{if \right\}\left(x,y\right) \ne \left(0,0\right) \\ 0 & \text\left\{if \right\}\left(x,y\right) = \left(0,0\right)\end\left\{cases\right\}$

is not differentiable at (0, 0), but again all of the partial derivatives and directional derivatives exist.

It is known that if the partial derivatives of a function all exist and are continuous in a neighborhood of a point, then the function must be differentiable at that point, and is in fact of class C1.

## Differentiability in complex analysis

Main article: Holomorphic function

In complex analysis, any function that is complex-differentiable in a neighborhood of a point is called holomorphic. Such a function is necessarily infinitely differentiable, and in fact analytic.

## Differentiable functions on manifolds

If M is a differentiable manifold, a real or complex-valued function f on M is said to be differentiable at a point p if it is differentiable with respect to some (or any) coordinate chart defined around p. More generally, if M and N are differentiable manifolds, a function fM → N is said to be differentiable at a point p if it is differentiable with respect to some (or any) coordinate charts defined around p and f(p).