Derivative
7921
225342978
2008-07-13T05:03:03Z
Pbroks13
2308181
replaced all ''f'' with ''ƒ''
{{otheruses}}
{{otheruses4||a non-technical overview of the subject|Differential calculus}}
[[Image:Tangent to a curve.svg|thumb|200px|width=150|length=150|The graph of a function, drawn in black, and a tangent line to that function, drawn in red. The slope of the tangent line is equal to the derivative of the function at the marked point.]]
{{Calculus}}
In [[calculus]], a branch of [[mathematics]], the '''derivative''' is a measurement of how a [[function (mathematics)|function]] changes when the values of its inputs change. Loosely speaking, a derivative can be thought of as how much a quantity is changing at some given point. For example, the derivative of the position or distance of a car at some point in time is the instantaneous velocity, or instantaneous speed (respectively), at which that car is traveling (conversely the [[integral]] of the velocity is the car's position).
A closely related notion is the [[differential (calculus)|differential]] of a function.
The derivative of a function at a chosen input value describes the best [[linear approximation]] of the function near that input value. For a [[real-valued function]] of a single real variable, the derivative at a point equals the [[slope]] of the [[tangent#Geometry|tangent line]] to the [[graph of a function|graph of the function]] at that point. In higher dimensions, the derivative of a function at a point is a [[linear transformation]] called the [[linearization]].<ref>Differential calculus, as discussed in this article, is a very well-established mathematical discipline for which there are many sources. Almost all of the material in this article can be found in Apostol 1967, Apostol 1969, and Spivak 1994.</ref>
The process of finding a derivative is called '''differentiation'''. The [[fundamental theorem of calculus]] states that differentiation is the reverse process to [[integration (mathematics)|integration]].
== Differentiation and the derivative ==
[[image:Graph of sliding derivative line.gif|left|frame|At each point, the derivative is the [[slope]] of a [[line]] that is [[tangent]] to the [[curve]]. The red line is always tangent to the blue curve; its slope is the derivative.]]
'''Differentiation''' is a method to compute the rate at which a dependent output ''y'', changes with respect to the change in the independent input ''x''. This rate of change is called the '''derivative''' of ''y'' with respect to ''x''. In more precise language, the dependency of ''y'' on ''x'' means that ''y'' is a [[function (mathematics)|function]] of ''x''. If ''x'' and ''y'' are [[real number]]s, and if the [[graph of a function|graph]] of ''y'' is plotted against ''x'', the derivative measures the [[slope]] of this graph at each point. This functional relationship is often denoted ''y'' = ''ƒ''(''x''), where ''ƒ'' denotes the function.
The simplest case is when ''y'' is a [[linear function]] of ''x'', meaning that the graph of ''y'' against ''x'' is a straight line. In this case, ''y'' = ''ƒ''(''x'') = ''m'' ''x'' + ''c'', for real numbers ''m'' and ''c'', and the slope ''m'' is given by
:<math>m={\mbox{change in } y \over \mbox{change in } x} = {\Delta y \over{\Delta x}}</math>
where the symbol Δ (the uppercase form of the Greek letter [[Delta (letter)|Delta]]) is an abbreviation for "change in." This formula is true because
:''y'' + Δ''y'' = ''ƒ''(''x''+ Δ''x'') = ''m'' (''x'' + Δ''x'') + ''c'' = ''m'' ''x'' + ''c'' + ''m'' Δ''x'' = ''y'' + ''m''Δ''x''.
It follows that Δ''y'' = ''m'' Δ''x''.
This gives an exact value for the slope of a straight line.
If the function ''ƒ'' is not linear (i.e. its graph is not a straight line), however, then the change in ''y'' divided by the change in ''x'' varies: differentiation is a method to find an exact value for this rate of change at any given value of ''x''.
[[Image:Tangent-calculus.svg|thumb|300px|Figure 1. The [[Tangent#Geometry|tangent]] line at (''x'', ''ƒ''(''x''))]]
[[Image:Secant-calculus.svg|thumb|300px|Figure 2. The [[Secant line|secant]] to curve ''y''= ''ƒ''(''x'') determined by points (''x'', ''ƒ''(''x'')) and (''x''+''h'', ''ƒ''(''x''+''h'')).]]
[[Image:Lim-secant.svg|thumb|300px|Figure 3. The tangent line as limit of secants.]]
The idea, illustrated by Figures 1-3, is to compute the rate of change as the [[limit of a function|limiting value]] of the [[difference quotient|ratio of the differences]] Δ''y'' / Δ''x'' as Δ''x'' becomes infinitely small.
In [[Leibniz's notation]], such an [[infinitesimal]] change in ''x'' is denoted by ''dx'', and the derivative of ''y'' with respect to ''x'' is written
: <math> \frac{dy}{dx} \,\!</math>
suggesting the ratio of two infinitesimal quantities. (The above expression is pronounced in various ways such as "d y by d x" or "d y over d x". The oral form "d y d x" is often used conversationally, although it may lead to confusion.)
The most common approach<ref>Spivak 1994, chapter 10.</ref> to turn this intuitive idea into a precise definition uses [[Limit (mathematics)|limits]], but there are other methods, such as [[non-standard analysis]].<ref>See [[Differential (infinitesimal)]] for an overview. Further approaches include the [[Radon-Nikodym theorem]], and the universal derivation (see [[Kähler differential]]).</ref>
=== Definition via difference quotients ===
Let ''y''=''ƒ''(''x'') be a function of ''x''. In classical geometry, the tangent line at a real number ''a'' was the unique line through the point (''a'', ''ƒ''(''a'')) which did ''not'' meet the graph of ''ƒ'' [[transversality|transversally]], meaning that the line did not pass straight through the graph. The derivative of ''y'' with respect to ''x'' at ''a'' is, geometrically, the slope of the tangent line to the graph of ''ƒ'' at ''a''. The slope of the tangent line is very close to the slope of the line through (''a'', ''ƒ''(''a'')) and a nearby point on the graph, for example (''a'' + ''h'', ''ƒ''(''a'' + ''h'')). These lines are called [[secant line]]s. A value of ''h'' close to zero will give a good approximation to the slope of the tangent line, and smaller values (in [[absolute value]]) of ''h'' will, in general, give better [[approximation]]s. The slope ''m'' of the secant line is the difference between the ''y'' values of these points divided by the difference between the ''x'' values, that is,
:<math>m = \frac{\Delta f(x)}{\Delta x} = \frac{f(a+h)-f(a)}{h}.</math>
This expression is [[Isaac Newton|Newton]]'s '''[[difference quotient]]'''. The derivative is the value of the difference quotient as the secant lines get closer and closer to the tangent line. Formally, the '''derivative''' of the function ''ƒ'' at ''a'' is the [[limit (mathematics)|limit]]
:<math>f'(a)=\lim_{h\to 0}{f(a+h)-f(a)\over h}</math>
of the difference quotient as ''h'' approaches zero, if this limit exists. If the limit exists, then ''ƒ'' is '''differentiable''' at ''a''. Here ''f′'' (''a'') is one of several common notations for the derivative ([[Derivative#Notation for the derivative|see below]]).
Equivalently, the derivative satisfies the property that
:<math>\lim_{h\to 0}{f(a+h)-f(a) - f'(a)\cdot h\over h} = 0,</math>
which has the intuitive interpretation (see Figure 1) that the tangent line to ''ƒ'' at ''a'' gives the ''best [[linear]] approximation''
:<math>f(a+h) \approx f(a) + f'(a)h</math>
to ''ƒ'' near ''a'' (i.e., for small ''h''). This interpretation is the easiest to generalize to other settings ([[Derivative#The Jacobian and the differential|see below]]).
[[Substitution property of equality|Substituting]] 0 for ''h'' in the difference quotient causes [[division by zero]], so the slope of the tangent line cannot be found directly. Instead, define ''Q''(''h'') to be the difference quotient as a function of ''h'':
:<math>Q(h) = \frac{f(a + h) - f(a)}{h}</math>.
''Q''(''h'') is the slope of the secant line between (''a'', ''ƒ''(''a'')) and (''a'' + ''h'', ''ƒ''(''a'' + ''h'')). If ''ƒ'' is a [[continuous function]], meaning that its graph is an unbroken curve with no gaps, then ''Q'' is a continuous function away from the point ''h'' = 0. If the limit <math>\textstyle\lim_{h\to 0} Q(h)</math> exists, meaning that there is a way of choosing a value for ''Q''(0) which makes the graph of ''Q'' a continuous function, then the function ''ƒ'' is differentiable at the point ''a'', and its derivative at ''a'' equals ''Q''(0).
In practice, the existence of a continuous extension of the difference quotient ''Q''(''h'') to ''h'' = 0 is shown by modifying the numerator to cancel ''h'' in the denominator. This process can be long and tedious for complicated functions, and many short cuts are commonly used to simplify the process.
===Example===
The squaring function ''ƒ''(''x'') = ''x''² is differentiable at ''x'' = 3, and its derivative there is 6. This is proven by writing the difference quotient as follows:
:<math>{f(3+h)-f(3)\over h} = {(3+h)^2 - 9\over{h}} = {9 + 6h + h^2 - 9\over{h}} = {6h + h^2\over{h}} = 6 + h. </math>
Then we get the simplified function in the limit:
:<math>\lim_{h\to 0} 6 + h = 6 + 0 = 6. </math>
The last expression shows that the difference quotient equals ''6'' + ''h'' when ''h'' is not zero and is undefined when ''h'' is zero. (Remember that because of the definition of the difference quotient, the difference quotient is always undefined when ''h'' is zero.) However, there is a natural way of filling in a value for the difference quotient at zero, namely ''6''. Hence the slope of the graph of the squaring function at the point (3, 9) is 6, and so its derivative at ''x'' = 3 is ''ƒ'' '(3) = 6.
More generally, a similar computation shows that the derivative of the squaring function at ''x'' = ''a'' is ''ƒ'' '(''a'') = 2''a''.
===Continuity and differentiability===
[[Image:Right-continuous.svg|thumb|right|This function does not have a derivative at the marked point, as the function is not continuous there.]]
If ''y'' = ''ƒ''(''x'') is differentiable at ''a'', then ''ƒ'' must also be [[continuous function|continuous]] at ''a''. As an example, choose a point ''a'' and let ''ƒ'' be the [[step function]] which returns a value, say 1, for all ''x'' less than ''a'', and returns a different value, say 10, for all ''x'' greater than or equal to ''a''. ''ƒ'' cannot have a derivative at ''a''. If ''h'' is negative, then ''a'' + ''h'' is on the low part of the step, so the secant line from ''a'' to ''a'' + ''h'' will be very steep, and as ''h'' tends to zero the slope tends to infinity. If ''h'' is positive, then ''a'' + ''h'' is on the high part of the step, so the secant line from ''a'' to ''a'' + ''h'' will have slope zero. Consequently the secant lines do not approach any single slope, so the limit of the difference quotient does not exist.<ref>Despite this, it is still possible to take the derivative in the sense of [[distribution (mathematics)|distributions]]. The result is nine times the [[Dirac measure]] centered at ''a''.</ref>
[[Image:Absolute value.svg|right|thumb|The absolute value function is continuous, but fails to be differentiable at ''x'' = 0 since it has a sharp corner.]]However, even if a function is continuous at a point, it may not be differentiable there. For example, the [[absolute value]] function ''y'' = |''x''| is continuous at ''x'' = 0, but it is not differentiable there. If ''h'' is positive, then the slope of the secant line from ''0'' to ''h'' is one, whereas if ''h'' is negative, then the slope of the secant line from ''0'' to ''h'' is negative one. This can be seen graphically as a "kink" in the graph at ''x'' = 0. Even a function with a smooth graph is not differentiable at a point where its [[Vertical tangent|tangent is vertical]]: For instance, the function ''y'' = <sup>3</sup>√<span style="text-decoration:overline">''x''</span> is not differentiable at ''x'' = 0.
In summary: in order for a function ''ƒ'' to have a derivative it is ''[[Necessary and sufficient conditions|necessary]]'' for the function ''ƒ'' to be continuous, but continuity alone is not ''[[Necessary and sufficient conditions|sufficient]]''.
Most functions which occur in practice have derivatives at all points or at [[Almost everywhere|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.<ref>{{cite journal|author=Banach, S.|title=Uber die Baire'sche Kategorie gewisser Funktionenmengen|journal=Studia. Math.|issue=3|year=1931|pages=pp. 174–179}}. Cited by {{cite book|author=Hewitt, E and Stromberg, K|title=Real and abstract analysis|publisher=Springer-Verlag|year=1963|pages=Theorem 17.8}}</ref> 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]].
===The derivative as a function===
Let ''ƒ'' be a function that has a derivative at every point ''a'' in the [[domain (mathematics)|domain]] of ''ƒ''. Because every point ''a'' has a derivative, there is a function which sends the point ''a'' to the derivative of ''ƒ'' at ''a''. This function is written ''f′(x)'' and is called the ''derivative function'' or the ''derivative'' of ''ƒ''. The derivative of ''ƒ'' collects all the derivatives of ''ƒ'' at all the points in the domain of ''ƒ''.
Sometimes ''ƒ'' has a derivative at most, but not all, points of its domain. The function whose value at ''a'' equals ''f′(a)'' whenever ''f′(a)'' is defined and is undefined elsewhere is also called the derivative of ''ƒ''. It is still a function, but its domain is strictly smaller than the domain of ''ƒ''.
Using this idea, differentiation becomes a function of functions: The derivative is an [[operator]] whose domain is the set of all functions which have derivatives at every point of their domain and whose range is a set of functions. If we denote this operator by ''D'', then ''D''(''ƒ'') is the function ''f′''(''x''). Since ''D''(''ƒ'') is a function, it can be evaluated at a point ''a''. By the definition of the derivative function, ''D''(''ƒ'')(''a'') = ''f′''(''a'').
For comparison, consider the doubling function ''ƒ''(''x'') =2''x''; ''ƒ'' is a real-valued function of a real number, meaning that it takes numbers as inputs and has numbers as outputs:
:<math>\begin{align}
1 &{}\mapsto 2,\\
2 &{}\mapsto 4,\\
3 &{}\mapsto 6.
\end{align}</math>
The operator ''D'', however, is not defined on individual numbers. It is only defined on functions:
:<math>\begin{align}
D(x \mapsto 1) &= (x \mapsto 0),\\
D(x \mapsto x) &= (x \mapsto 1),\\
D(x \mapsto x^2) &= (x \mapsto 2\cdot x).
\end{align}</math>
Because the output of ''D'' is a function, the output of ''D'' can be evaluated at a point. For instance, when ''D'' is applied to the squaring function,
:<math>x \mapsto x^2,</math>
''D'' outputs the doubling function,
:<math> x \mapsto 2x ,</math>
which we named ''ƒ''(''x''). This output function can then be evaluated to get ''ƒ''(1) = 2, ''ƒ''(2) = 4, and so on.
===Higher derivatives===
Let ''ƒ'' be a differentiable function, and let ''f′(x)'' be its derivative. The derivative of ''f′(x)'' (if it has one) is written ''f′′(x)'' and is called the '''second derivative of ''ƒ'''''. Similarly, the derivative of a second derivative, if it exists, is written ''f′′′(x)'' and is called the '''third derivative of ''ƒ'''''. These repeated derivatives are called ''higher-order derivatives''.
A function ''ƒ'' need not have a derivative, for example, if it is not continuous. Similarly, even if ''ƒ'' does have a derivative, it may not have a second derivative. For example, let
:<math>f(x) = \begin{cases} x^2, & \mbox{if }x\ge 0 \\ -x^2, & \mbox{if }x \le 0\end{cases}</math>.
An elementary calculation shows that ''ƒ'' is a differentiable function whose derivative is
:<math>f'(x) = \begin{cases} 2x, & \mbox{if }x\ge 0 \\ -2x, & \mbox{if }x \le 0\end{cases}</math>.
''f′(x)'' is twice the absolute value function, and it does not have a derivative at zero. Similar examples show that a function can have ''k'' derivatives for any non-negative integer ''k'' but no ''(k + 1)''-order derivative. A function that has ''k'' successive derivatives is called '''''k'' times differentiable'''. If in addition the ''k''th derivative is continuous, then the function is said to be of [[differentiability class]] ''C<sup>k</sup>''. (This is a stronger condition than having ''k'' derivatives. For an example, see [[differentiability class]].) A function that has infinitely many derivatives is called '''infinitely differentiable''' or '''[[smooth function|smooth]]'''.
On the real line, every [[polynomial function]] is infinitely differentiable. By standard [[differentiation rules]], if a polynomial of degree ''n'' is differentiated ''n'' times, then it becomes a [[constant function]]. All of its subsequent derivatives are identically zero. In particular, they exist, so polynomials are smooth functions.
The derivatives of a function ''ƒ'' at a point ''x'' provide polynomial approximations to that function near ''x''. For example, if ''ƒ'' is twice differentiable, then
:<math> f(x+h) \approx f(x) + f'(x)h + \tfrac12 f''(x) h^2</math>
in the sense that
:<math> \lim_{h\to 0}\frac{f(x+h) - f(x) - f'(x)h - \frac12 f''(x) h^2}{h^2}=0.</math>
If ''ƒ'' is infinitely differentiable, then this is the beginning of the [[Taylor series]] for ''ƒ''.
== Notations for differentiation ==
{{main|Notation for differentiation}}
=== Leibniz's notation ===
{{main|Leibniz's notation}}
The notation for derivatives introduced by [[Gottfried Leibniz]] is one of the earliest. It is still commonly used when the equation ''y'' = ƒ(''x'') is viewed as a functional relationship between [[dependent and independent variables]]. Then the first derivative is denoted by
: <math>\frac{dy}{dx},\quad\frac{d f}{dx}(x),\;\;\mathrm{or}\;\; \frac{d}{dx}f(x).</math>
Higher derivatives are expressed using the notation
: <math>\frac{d^ny}{dx^n},
\quad\frac{d^nf}{dx^n}(x),
\;\;\mathrm{or}\;\;
\frac{d^n}{dx^n}f(x)</math>
for the ''n''th derivative of ''y'' = ƒ(''x'') (with respect to ''x'').
With Leibniz's notation, we can write the derivative of ''y'' at the point ''x'' = ''a'' in two different ways:
: <math>\frac{dy}{dx}\left.{\!\!\frac{}{}}\right|_{x=a} = \frac{dy}{dx}(a).</math>
Leibniz's notation allows one to specify the variable for differentiation (in the denominator). This is especially relevant for [[partial derivative|partial differentiation]]. It also makes the [[chain rule]] easy to remember:<ref>In the formulation of calculus in terms of limits, the ''du'' symbol has been assigned various meanings by various authors. Some authors do not assign a meaning to ''du'' by itself, but only as part of the symbol ''du''/''dx''. Others define "dx" as an independent variable, and define ''du'' by ''du'' = ''dx''•ƒ′ (''x''). In [[non-standard analysis]] ''du'' is defined as an infinitesimal. It is also interpreted as the [[exterior derivative]] d''u'' of a function ''u''. See [[differential (infinitesimal)]] for further information.</ref>
: <math>\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}.</math>
=== Lagrange's notation ===
One of the most common modern notations for differentiation is due to [[Joseph Louis Lagrange]] and uses the [[Prime (symbol)|prime mark]], so that the derivative of a function ƒ(''x'') is denoted ƒ′(''x'') or simply ƒ′. Similarly, the second and third derivatives are denoted
:<math>(f')'=f''\,</math>   and   <math>(f'')'=f'''\,.</math>
Beyond this point, some authors use Roman numerals such as
:<math>f^{\mathrm{iv}}\,</math>
for the fourth derivative, whereas other authors place the number of derivatives in parentheses:
:<math>f^{(4)}\,</math>
The latter notation generalizes to yield the notation ƒ<sup> (''n'')</sup> for the ''n''th derivative of ƒ — this notation is most useful when we wish to talk about the derivative as being a function itself, as in this case the Leibniz notation can become cumbersome.
=== Newton's notation ===
{{main|Newton's notation}}
[[Newton's notation]] for differentiation, also called the dot notation, places a dot over the function name to represent a derivative. If ''y'' = ''ƒ''(''t''), then
:<math>\dot{y}</math>   and   <math>\ddot{y}</math>
denote, respectively, the first and second derivatives of ''y'' with respect to ''t''. This notation is used almost exclusively for [[time derivative]]s, meaning that the independent variable of the function represents [[time]]. It is very common in [[physics]] and in mathematical disciplines connected with physics such as [[differential equation]]s. While the notation becomes unmanageable for high-order derivatives, in practice only very few derivatives are needed.
=== Euler's notation ===
[[Leonhard Euler|Euler]]'s notation uses a [[differential operator]] ''D'', which is applied to a function ''ƒ'' to give the first derivative ''Df''. The second derivative is denoted ''D''<sup>2</sup>''ƒ'', and the ''n''th derivative is denoted ''D''<sup>''n''</sup>''ƒ''.
If ''y'' = ''ƒ''(''x'') is a dependent variable, then often the subscript ''x'' is attached to the ''D'' to clarify the independent variable ''x''.
Euler's notation is then written
:<math>D_x y\,</math>   or   <math>D_x f(x)\,</math>,
although this subscript is often omitted when the variable ''x'' is understood, for instance when this is the only variable present in the expression.
Euler's notation is useful for stating and solving [[linear differential equation]]s.
== Computing the derivative ==<!-- This section is linked from [[Derivative]] -->
The derivative of a function can, in principle, be computed from the definition by considering the difference quotient, and computing its limit. For some examples, see [[Derivative (examples)]]. In practice, once the derivatives of a few simple functions are known, the derivatives of other functions are more easily computed using ''rules'' for obtaining derivatives of more complicated functions from simpler ones.
=== Derivatives of elementary functions ===
{{main|Table of derivatives}}
Most derivative computations eventually require taking the derivative of some common functions. The following incomplete list gives some of the most frequently used functions and their derivatives. For a complete list, see [[Table of derivatives]].
* ''[[Calculus with polynomials|Derivatives of powers]]'': if
:<math> f(x) = x^r\,</math>,
where ''r'' is any [[real number]], then
:<math> f'(x) = rx^{r-1}\,</math>,
wherever this function is defined.
For example, if ''r'' = 1/2, then
:<math> f'(x) = \frac{1}{2}x^{-\tfrac12}\,</math>.
and the function is defined only for non-negative ''x''. When ''r'' = 0, this rule recovers the constant rule.
* ''[[Exponential function|Exponential]] and [[logarithm]]ic functions'':
:<math> \frac{d}{dx}e^x = e^x</math>
:<math> \frac{d}{dx}a^x = \ln(a)a^x</math>
:<math> \frac{d}{dx}\ln(x) = 1/x,\qquad x > 0</math>
:<math> \frac{d}{dx}\log_a(x) = \frac{1}{x\ln(a)}</math>
* ''[[Trigonometric function]]s'':
:<math> \frac{d}{dx}\sin(x) = \cos(x).</math>
:<math> \frac{d}{dx}\cos(x)= -\sin(x).</math>
:<math> \frac{d}{dx}\tan(x)= \sec^2(x).</math>
* ''[[Inverse trigonometric function]]s'':
:<math> \frac{d}{dx}\arcsin(x) = \frac{1}{\sqrt{1-x^2}}.</math>
:<math> \frac{d}{dx}\arccos(x)= -\frac{1}{\sqrt{1-x^2}}.</math>
:<math> \frac{d}{dx}\arctan(x)= \frac{1}{{1+x^2}}.</math>
=== Rules for finding the derivative ===<!-- This section is linked from [[Difference operator]] -->
{{main|Differentiation rules}}
In many cases, complicated limit calculations by direct application of Newton's difference quotient can be avoided using differentiation rules. Some of the most basic rules are the following.
* ''Constant rule'': if ''ƒ''(''x'') is constant, then
:<math>f' = 0 \,</math>
* ''[[Linearity of differentiation|Sum rule]]'':
:<math>(af + bg)' = af' + bg' \,</math> for all functions ''ƒ'' and ''g'' and all real numbers ''a'' and ''b''.
* ''[[Product rule]]'':
:<math>(fg)' = f 'g + fg' \,</math> for all functions ''ƒ'' and ''g''.
* ''[[Quotient rule]]'':
:<math>\left(\frac{f}{g} \right)' = \frac{f'g - fg'}{g^2}</math> for all functions ''ƒ'' and ''g'' where ''g'' ≠ 0.
* ''[[Chain rule]]'': If <math>f(x) = h(g(x))</math>, then
:<math>f'(x) = h'(g(x)) \cdot g'(x) \,</math>.
===Example computation===
The derivative of
: <math>f(x) = x^4 + \sin (x^2) - \ln(x) e^x + 7\,</math>
is
: <math>
\begin{align}
f'(x) &= 4 x^{(4-1)}+ \frac{d\left(x^2\right)}{dx}\cos (x^2) - \frac{d\left(\ln {x}\right)}{dx} e^x - \ln{x} \frac{d\left(e^x\right)}{dx} + 0 \\
&= 4x^3 + 2x\cos (x^2) - \frac{1}{x} e^x - \ln(x) e^x.
\end{align}
</math>
Here the second term was computed using the chain rule and third using the product rule: the known derivatives of the elementary functions ''x''<sup>2</sup>, ''x''<sup>4</sup>, sin(''x''), ln(''x'') and exp(''x'') = ''e''<sup>''x''</sup> were also used.
==Derivatives in higher dimensions==
{{see also|vector calculus|multivariable calculus}}
===Derivatives of vector valued functions===
A [[vector-valued function]] '''y'''(''t'') of a real variable is a function which sends real numbers to vectors in some [[vector space]] '''R'''<sup>''n''</sup>. A vector-valued function can be split up into its coordinate functions ''y''<sub>1</sub>(''t''), ''y''<sub>2</sub>(''t''), …, ''y''<sub>''n''</sub>(''t''), meaning that '''y'''(''t'') = (''y''<sub>1</sub>(''t''), ..., ''y''<sub>''n''</sub>(''t'')). This includes, for example, [[parametric curve]]s in '''R'''<sup>2</sup> or '''R'''<sup>3</sup>. The coordinate functions are real valued functions, so the above definition of derivative applies to them. The derivative of '''y'''(''t'') is defined to be the [[vector (spatial)|vector]], called the [[tangent vector]], whose coordinates are the derivatives of the coordinate functions. That is,
:<math>\mathbf{y}'(t) = (y'_1(t), \ldots, y'_n(t)).</math>
Equivalently,
:<math>\mathbf{y}'(t)=\lim_{h\to 0}\frac{\mathbf{y}(t+h) - \mathbf{y}(t)}{h},</math>
if the limit exists. The subtraction in the numerator is subtraction of vectors, not scalars. If the derivative of '''y''' exists for every value of ''t'', then '''y′''' is another vector valued function.
If '''e'''<sub>1</sub>, …, '''e'''<sub>''n''</sub> is the standard basis for '''R'''<sup>''n''</sup>, then '''y'''(''t'') can also be written as ''y''<sub>1</sub>(''t'')'''e'''<sub>1</sub> + … + ''y''<sub>''n''</sub>(''t'')'''e'''<sub>''n''</sub>. If we assume that the derivative of a vector-valued function retains the [[linearity of differentiation|linearity]] property, then the derivative of '''y'''(''t'') must be
:<math>y'_1(t)\mathbf{e}_1 + \cdots + y'_n(t)\mathbf{e}_n</math>
because each of the basis vectors is a constant.
This generalization is useful, for example, if '''y'''(''t'') is the position vector of a particle at time ''t''; then the derivative '''y'''′(''t'') is the [[velocity]] vector of the particle at time ''t''.
===Partial derivatives===
{{main|Partial derivative}}
Suppose that ''ƒ'' is a function that depends on more than one variable. For instance,
:<math>f(x,y) = x^2 + xy + y^2.\,</math>
''ƒ'' can be reinterpreted as a family of functions of one variable indexed by the other variables:
:<math>f(x,y) = f_x(y) = x^2 + xy + y^2.\,</math>
In other words, every value of ''x'' chooses a function, denoted ''f<sub>x</sub>'', which is a function of one real number.<ref>This can also be expressed as the [[adjoint functors|adjointness]] between the [[product topology|product space]] and [[function space]] constructions.</ref> That is,
:<math>x \mapsto f_x,\,</math>
:<math>f_x(y) = x^2 + xy + y^2.\,</math>
Once a value of ''x'' is chosen, say ''a'', then ''f(x,y)'' determines a function ''f<sub>a</sub>'' which sends ''y'' to ''a''² + ay + ''y''²:
:<math>f_a(y) = a^2 + ay + y^2.\,</math>
In this expression, ''a'' is a ''constant'', not a ''variable'', so ''f<sub>a</sub>'' is a function of only one real variable. Consequently the definition of the derivative for a function of one variable applies:
:<math>f_a'(y) = a + 2y.\,</math>
The above procedure can be performed for any choice of ''a''. Assembling the derivatives together into a function gives a function which describes the variation of ''ƒ'' in the ''y'' direction:
:<math>\frac{\part f}{\part y}(x,y) = x + 2y.</math>
This is the partial derivative of ''ƒ'' with respect to ''y''. Here ∂ is a rounded ''d'' called the '''partial derivative symbol'''. To distinguish it from the letter ''d'', ∂ is sometimes pronounced "der", "del", or "partial" instead of "dee".
In general, the '''partial derivative''' of a function ''ƒ''(''x''<sub>1</sub>, …, ''x''<sub>''n''</sub>) in the direction ''x<sub>i</sub>'' at the point (''a''<sub>1</sub> …, ''a''<sub>''n''</sub>) is defined to be:
:<math>\frac{\part f}{\part x_i}(a_1,\ldots,a_n) = \lim_{h \to 0}\frac{f(a_1,\ldots,a_i+h,\ldots,a_n) - f(a_1,\ldots,a_n)}{h}.</math>
In the above difference quotient, all the variables except ''x<sub>i</sub>'' are held fixed. That choice of fixed values determines a function of one variable
:<math>f_{a_1,\ldots,a_{i-1},a_{i+1},\ldots,a_n}(x_i) = f(a_1,\ldots,a_{i-1},x_i,a_{i+1},\ldots,a_n)</math>
and, by definition,
:<math>\frac{df_{a_1,\ldots,a_{i-1},a_{i+1},\ldots,a_n}}{dx_i}(a_1,\ldots,a_n) = \frac{\part f}{\part x_i}(a_1,\ldots,a_n).</math>
In other words, the different choices of ''a'' index a family of one-variable functions just as in the example above. This expression also shows that the computation of partial derivatives reduces to the computation of one-variable derivatives.
An important example of a function of several variables is the case of a [[scalar-valued function]] ''ƒ''(''x''<sub>1</sub>,...''x''<sub>''n''</sub>) on a domain in Euclidean space '''R'''<sup>''n''</sup> (e.g., on '''R'''² or '''R'''³). In this case ''ƒ'' has a partial derivative ∂''ƒ''/∂''x''<sub>''j''</sub> with respect to each variable ''x''<sub>''j''</sub>. At the point ''a'', these partial derivatives define the vector
:<math>\nabla f(a) = \left(\frac{\partial f}{\partial x_1}(a), \ldots, \frac{\partial f}{\partial x_n}(a)\right).</math>
This vector is called the '''[[gradient]]''' of ''ƒ'' at ''a''. If ''ƒ'' is differentiable at every point in some domain, then the gradient is a vector-valued function ∇''ƒ'' which takes the point ''a'' to the vector ∇''f(a)''. Consequently the gradient determines a [[vector field]].
===Directional derivatives===
{{main|Directional derivative}}
If ''ƒ'' is a real-valued function on '''R'''<sup>n</sup>, then the partial derivatives of ''ƒ'' measure its variation in the direction of the coordinate axes. For example, if ''ƒ'' is a function of ''x'' and ''y'', then its partial derivatives measure the variation in ''ƒ'' in the ''x'' direction and the ''y'' direction. They do not, however, directly measure the variation of ''ƒ'' in any other direction, such as along the diagonal line ''y'' = ''x''. These are measured using directional derivatives. Choose a vector
:<math>\mathbf{v} = (v_1,\ldots,v_n).</math>
The '''directional derivative''' of ''ƒ'' in the direction of '''v''' at the point '''x''' is the limit
:<math>D_{\mathbf{v}}{f}(\boldsymbol{x}) = \lim_{h \rightarrow 0}{\frac{f(\boldsymbol{x} + h\mathbf{v}) - f(\boldsymbol{x})}{h}}.</math>
Let λ be a scalar. The substitution of ''h/λ'' for ''h'' changes the λ'''v''' direction's difference quotient into λ times the '''v''' direction's difference quotient. Consequently, the directional derivative in the λ'''v''' direction is λ times the directional derivative in the '''v''' direction. Because of this, directional derivatives are often considered only for unit vectors '''v'''.
If all the partial derivatives of ''ƒ'' exist and are continuous at '''''x''''', then they determine the directional derivative of ''ƒ'' in the direction '''v''' by the formula:
:<math>D_{\mathbf{v}}{f}(\boldsymbol{x}) = \sum_{j=1}^n v_j \frac{\partial f}{\partial x_j}.</math>
This is a consequence of the definition of the [[total derivative]]. It follows that the directional derivative is [[linear map|linear]] in '''v'''.
The same definition also works when ''ƒ'' is a function with values in '''R'''<sup>m</sup>. We just use the above definition in each component of the vectors. In this case, the directional derivative is a vector in '''R'''<sup>m</sup>.
===The total derivative, the total differential and the Jacobian===
{{main|Total derivative}}
Let ''ƒ'' be a function from a domain in '''R''' to '''R'''. The derivative of ''ƒ'' at a point ''a'' in its domain is the best linear approximation to ''ƒ'' at that point. As above, this is a number. Geometrically, if ''v'' is a unit vector starting at ''a'', then ''f′ (a)'' , the best linear approximation to ''ƒ'' at ''a'', should be the length of the vector found by moving ''v'' to the target space using ''ƒ''. (This vector is called the [[pushforward (differential)|pushforward]] of ''v'' by ''ƒ'' and is usually written <math>f_*v</math>.) In other words, if ''v'' is measured in terms of distances on the target, then, because ''v'' can only be measured through ''ƒ'', ''v'' no longer appears to be a unit vector because ''ƒ'' does not preserve unit vectors. Instead ''v'' appears to have length ''f′ (a)''. If ''m'' is greater than one, then by writing ''ƒ'' using coordinate functions, the length of ''v'' in each of the coordinate directions can be measured separately.
Suppose now that ''ƒ'' is a function from a domain in '''R'''<sup>''n''</sup> to '''R'''<sup>''m''</sup> and that '''a''' is a point in the domain of ''ƒ''. The derivative of ''ƒ'' at '''a''' should still be the best linear approximation to ''ƒ'' at '''a'''. In other words, if ''v'' is a vector on '''R'''<sup>''n''</sup>, then ''f′ ''('''a''') should be the [[linear transformation]] that best approximates ''ƒ''. The linear transformation should contain all the information about how ''ƒ'' transforms vectors at '''a''' to vectors at ''f('''a''')'', and in symbols, this means it should be the linear transformation ''f′ ('''a''')'' such that
:<math>\lim_{\|\mathbf{h}\|\rightarrow 0} \frac{\|f(\mathbf{a}+\mathbf{h}) - f(\mathbf{a}) - f'(\mathbf{a})\mathbf{h}\|}{\|\mathbf{h}\|} = 0.</math>
Here '''h''' is a vector in '''R'''<sup>''n''</sup>, so the [[norm (mathematics)|norm]] in the denominator is the standard length on '''R'''<sup>''n''</sup>. However, ''f′ ''('''a''')''h'' is a vector in '''R'''<sup>''m''</sup>, and the norm in the numerator is the standard length on '''R'''<sup>''m''</sup>. The linear transformation ''f′ ''('''''a'''''), if it exists, is called the '''total derivative''' of ''ƒ'' at '''a''' or the '''(total) [[differential (calculus)| differential]]''' of ''ƒ'' at '''a'''.
If the total derivative exists at ''a'', then all the partial derivatives of ''ƒ'' exist at ''a''. If we write ''ƒ'' using coordinate functions, so that ''ƒ'' = (''ƒ''<sub>1</sub>, ''ƒ''<sub>2</sub>, ..., ''ƒ''<sub>''m''</sub>), then the total derivative can be expressed as a [[matrix (mathematics)|matrix]] called the '''[[Jacobian|Jacobian matrix]]''' of ''ƒ'' at '''a''':
:<math>f'(\mathbf{a}) = \text{Jac}_{\mathbf{a}} = \left(\frac{\partial f_i}{\partial x_j}\right)_{ij}.</math>
The existence of the Jacobian is strictly stronger than existence of all the partial derivatives, but if the partial derivatives exist and satisfy mild smoothness conditions, then the total derivative exists and is given by the Jacobian.
The definition of the total derivative subsumes the definition of the derivative in one variable. In this case, the total derivative exists if and only if the usual derivative exists. The Jacobian matrix reduces to a 1×1 matrix whose only entry is the derivative ''f′ (x)''. This 1×1 matrix satisfies the property that ''ƒ''(''a'' + ''h'') − ''ƒ''(''a'') − ''f′''(''a'')''h'' is approximately zero, in other words that
:<math>f(a+h) \approx f(a) + f'(a)h.</math>
Up to changing variables, this is the statement that the function <math>x \mapsto f(a) + f'(a)(x-a)</math> is the best linear approximation to ''ƒ'' at ''a''.
The total derivative of a function does not give another function in the same way as the one-variable case. This is because the total derivative of a multivariable function has to record much more information than the derivative of a single-variable function. Instead, the total derivative gives a function from the [[tangent bundle]] of the source to the tangent bundle of the target.
== Generalizations ==
{{main|Derivative (generalizations)}}
The concept of a derivative can be extended to many other settings. The common thread is that the derivative of a function at a point serves as a [[linear approximation]] of the function at that point.
* An important generalization of the derivative concerns [[complex number|complex]] functions of complex variables, such as functions from (a domain in) the complex numbers '''C''' to '''C'''. The notion of the derivative of such a function is obtained by replacing real variables with complex variables in the definition. However, this innocent definition hides some very deep properties. If '''C''' is identified with '''R'''² by writing a complex number ''z'' as ''x'' + ''i'' ''y'', then a differentiable function from '''C''' to '''C''' is certainly differentiable as a function from '''R'''² to '''R'''² (in the sense that its partial derivatives all exist), but the converse is not true in general: the complex derivative only exists if the real derivative is ''complex linear'' and this imposes relations between the partial derivatives called the [[Cauchy Riemann equations]] — see [[holomorphic function]]s.
* Another generalization concerns functions between [[smooth manifold|differentiable or smooth manifolds]]. Intuitively speaking such a manifold ''M'' is a space which can be approximated near each point ''x'' by a vector space called its [[tangent space]]: the prototypical example is a [[smooth surface]] in '''R'''³. The derivative (or differential) of a (differentiable) map ''ƒ'': ''M'' → ''N'' between manifolds, at a point ''x'' in ''M'', is then a [[linear map]] from the tangent space of ''M'' at ''x'' to the tangent space of ''N'' at ''ƒ''(''x''). The derivative function becomes a map between the [[tangent bundle]]s of ''M'' and ''N''. This definition is fundamental in [[differential geometry]] and has many uses — see [[pushforward (differential)]] and [[pullback (differential geometry)]].
* Differentiation can also be defined for maps between [[Dimension (vector space)|infinite dimensional]] [[vector space]]s such as [[Banach space]]s and [[Fréchet space]]s. There is a generalization both of the directional derivative, called the [[Gâteaux derivative]], and of the differential, called the [[Fréchet derivative]].
* One deficiency of the classical derivative is that not very many functions are differentiable. Nevertheless, there is a way of extending the notion of the derivative so that all [[continuous function|continuous]] functions and many other functions can be differentiated using a concept known as the [[weak derivative]]. The idea is to embed the continuous functions in a larger space called the space of [[distribution (mathematics)|distributions]] and only require that a function is differentiable "on average".
* The properties of the derivative have inspired the introduction and study of many similar objects in algebra and topology — see, for example, [[differential algebra]].
* Also see [[arithmetic derivative]].
== See also ==
{{portalpar|Mathematics}}
{{sisterlinks|Differentiation}}
* [[Calculus]]
* [[Symmetric derivative]]
* [[Automatic differentiation]]
* [[Differentiability class]]
* [[Differintegral]]
* [[Integral]]
* [[Linearization]]
* [[Numerical differentiation]]
* [[Techniques for differentiation]]
* [[Table of derivatives]]
== Notes ==
<div class="references-small" style="-moz-column-count:2; column-count:2;">
<references />
</div>
==References==
=== Print ===
*{{Citation
| last = Anton
| first = Howard
| last2 = Bivens
| first2 = Irl
| last3 = Davis
| first3 = Stephen
| date = February 2, 2005
| title = Calculus: Early Transcendentals Single and Multivariable
| place = New York
| publisher = Wiley
| edition = 8th
| isbn = 978-0471472445
}}
*{{Citation
| last = Apostol
| first = Tom M.
| date = June 1967
| title = Calculus, Vol. 1: One-Variable Calculus with an Introduction to Linear Algebra
| publisher = Wiley
| edition = 2nd
| volume = 1
| isbn = 978-0471000051
}}
*{{Citation
| last = Apostol
| first = Tom M.
| date = June 1969
| title = Calculus, Vol. 2: Multi-Variable Calculus and Linear Algebra with Applications
| publisher = Wiley
| edition = 2nd
| volume = 1
| isbn = 978-0471000075
}}
*{{Citation
| last = Eves
| first = Howard
| date = January 2, 1990
| title = An Introduction to the History of Mathematics
| edition = 6th
| publisher = Brooks Cole
| isbn = 978-0030295584
}}
*{{Citation
| last = Larson
| first = Ron
| last2 = Hostetler
| first2 = Robert P.
| last3 = Edwards
| first3 = Bruce H.
| date = February 28, 2006
| title = Calculus: Early Transcendental Functions
| edition = 4th
| publisher = Houghton Mifflin Company
| isbn = 978-0618606245
}}
*{{Citation
| last = Spivak
| first = Michael
| author-link = Michael Spivak
| date = September 1994
| title = Calculus
| publisher = Publish or Perish
| edition = 3rd
| isbn = 978-0914098898
}}
*{{Citation
| last = Stewart
| first = James
| date = December 24, 2002
| title = Calculus
| publisher = Brooks Cole
| edition = 5th
| isbn = 978-0534393397
}}
*{{Citation
| last = Thompson
| first = Silvanus P.
| date = September 8, 1998
| title = Calculus Made Easy
| edition = Revised, Updated, Expanded
| place = New York
| publisher = St. Martin's Press
| isbn = 978-0312185480
}}
=== Online books ===
*{{Citation
| last = Crowell
| first = Benjamin
| title = Calculus
| date = 2003
| url = http://www.lightandmatter.com/calc/
}}
*{{Citation
| last = Garrett
| first = Paul
| date = 2004
| title = Notes on First-Year Calculus
| url = http://www.math.umn.edu/~garrett/calculus/
}}
*{{Citation
| last = Hussain
| first = Faraz
| date = 2006
| title = Understanding Calculus
| url = http://www.understandingcalculus.com/
}}
*{{Citation
| last = Keisler
| first = H. Jerome
| date = 2000
| title = Elementary Calculus: An Approach Using Infinitesimals
| url = http://www.math.wisc.edu/~keisler/calc.html
}}
*{{Citation
| last = Mauch
| first = Sean
| date = 2004
| title = Unabridged Version of Sean's Applied Math Book
| url = http://www.its.caltech.edu/~sean/book/unabridged.html
}}
*{{Citation
| last = Sloughter
| first = Dan
| date = 2000
| title = Difference Equations to Differential Equations
| url = http://math.furman.edu/~dcs/book/
}}
*{{Citation
| last = Strang
| first = Gilbert
| date = 1991
| title = Calculus
| url = http://ocw.mit.edu/ans7870/resources/Strang/strangtext.htm
}}
*{{Citation
| last = Stroyan
| first = Keith D.
| date = 1997
| title = A Brief Introduction to Infinitesimal Calculus
| url = http://www.math.uiowa.edu/~stroyan/InfsmlCalculus/InfsmlCalc.htm
}}
*{{Citation
| last = Wikibooks
| title = Calculus
| url = http://en.wikibooks.org/wiki/Calculus
}}
== External links ==
* [http://wims.unice.fr/wims/wims.cgi?module=tool/analysis/function.en WIMS Function Calculator] makes online calculation of derivatives; this software also enables interactive exercises.
* [http://www.numberempire.com/derivatives.php Online Derivatives Calculator].
* [http://www.mendelu.cz/user/marik/maw/index.php?lang=en&form=derivace Mathematical Assistant on Web] online calculation of derivatives, including explanation of steps in the solution.
* [http://homepage.mac.com/stray/ib/maths/deriv_fp.pdf Proving Derivatives from First Principles].
* [http://www.bluffton.edu/~nesterd/java/derivs.html Practice finding derivatives of randomly generated functions]
[[Category:Mathematical analysis]]
[[Category:Differential calculus]]
[[Category:Functions and mappings]]
{{Link FA|de}}
{{Link FA|lmo}}
{{Link FA|mk}}
[[af:Afgeleide]]
[[ar:اشتقاق (رياضيات)]]
[[bg:Производна]]
[[ca:Derivada]]
[[cs:Derivace]]
[[da:Differentialregning]]
[[de:Differentialrechnung]]
[[et:Tuletis (matemaatika)]]
[[es:Derivada]]
[[eo:Derivaĵo (matematiko)]]
[[eu:Deribatu]]
[[fa:مشتق]]
[[fr:Dérivée]]
[[fur:Derivade]]
[[gl:Derivada]]
[[ko:미분]]
[[io:Derivajo]]
[[id:Turunan]]
[[is:Deildun]]
[[it:Derivata]]
[[he:נגזרת]]
[[lt:Išvestinė]]
[[lmo:Derivada]]
[[hu:Differenciálhányados]]
[[mk:Диференцијално сметање]]
[[nl:Afgeleide]]
[[ja:微分法]]
[[no:Derivasjon]]
[[pl:Pochodna funkcji]]
[[pt:Derivada]]
[[ro:Derivată]]
[[ru:Производная функции]]
[[sk:Derivácia (funkcia)]]
[[sl:Odvod]]
[[sr:Извод]]
[[fi:Derivaatta]]
[[sv:Derivata]]
[[th:อนุพันธ์]]
[[vi:Đạo hàm và vi phân của hàm số]]
[[tr:Türev]]
[[uk:Похідна]]
[[zh-yue:微分]]
[[zh:导数]]