1.2 Rules of differentiation
From Förberedande kurs i matematik 2
(Ny sida: __NOTOC__ {{Info| '''Innehåll:''' * Derivata av en produkt och kvot * Derivata av en sammansatt funktion (kedjeregeln) * Högre ordningars derivata }} {{Info| '''Färdigheter:''' Efter d...) |
m (Robot: Automated text replacement (-{{Fristående formel +{{Displayed math)) |
||
(11 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | {| border="0" cellspacing="0" cellpadding="0" height="30" width="100%" | ||
+ | | style="border-bottom:1px solid #797979" width="5px" | | ||
+ | {{Selected tab|[[1.2 Rules of differentiation|Theory]]}} | ||
+ | {{Not selected tab|[[1.2 Exercises|Exercises]]}} | ||
+ | | style="border-bottom:1px solid #797979" width="100%"| | ||
+ | |} | ||
+ | |||
{{Info| | {{Info| | ||
- | ''' | + | '''Contents:''' |
- | * | + | * Derivative of a product and quotient |
- | * | + | * Derivative of a composite function (chain rule) |
- | * | + | * Higher order derivatives |
}} | }} | ||
{{Info| | {{Info| | ||
- | ''' | + | '''Learning outcomes:''' |
- | + | After this section, you will have learned : | |
- | * | + | * To be able, in principle, to differentiate any function composed of elementary functions |
}} | }} | ||
- | == | + | == Differentiation of products and quotients== |
- | + | Using the definition of a derivative one can obtain the rules for differentiation of products and quotients of functional expressions: | |
<div class="regel"> | <div class="regel"> | ||
- | ''' | + | '''Rules of differentiation for products and quotients: ''' |
- | {{ | + | {{Displayed math||<math>\begin{align*} D\,\bigl(\,f(x) \cdot g(x) \bigr) &= f^{\,\prime}(x) \cdot g(x) + f(x) \cdot g'(x)\\[4pt] D\,\Bigl( \frac{f(x)}{g(x)} \Bigr) &= \frac{f^{\,\prime}(x)\cdot g(x) - f(x)\cdot g'(x)}{\bigl(g(x)\bigr)^2} \end{align*}</math>}} |
</div> | </div> | ||
- | ( | + | (Note that the derivatives of products and quotients are not as simple as the derivatives of sums and differences, where one can differentiate the functional expression term by term, i.e. individually!) |
<div class="exempel"> | <div class="exempel"> | ||
- | ''' | + | ''' Example 1''' |
<ol type="a"> | <ol type="a"> | ||
<li><math>D\,(x^2 e^x) = 2x\cdot e^x + x^2\cdot e^x | <li><math>D\,(x^2 e^x) = 2x\cdot e^x + x^2\cdot e^x | ||
Line 61: | Line 68: | ||
- | == | + | == Derivatives of composite functions == |
- | + | A function <math>y=f(g)</math> where the variable ''g'' in turn, is dependent on a variable ''x'' takes the form <math>y=f \bigl( g(x)\bigr)</math> and is called a composite function. If one differentiates a composite function with respect to the independent variable ''x'', one uses the following rule | |
- | {{ | + | {{Displayed math||<math>y'(x) = f^{\,\prime}\bigl( g(x) \bigr) |
\cdot g'(x)\,\mbox{.}</math>}} | \cdot g'(x)\,\mbox{.}</math>}} | ||
- | + | This rule is commonly called the chain rule and may, depending on the notation be written in different ways. If we in the above example put <math>y=f(u)</math> and <math>u=g(x)</math> the chain rule can be written | |
- | {{ | + | {{Displayed math||<math>\frac{dy}{dx} |
= \frac{dy}{du} \cdot \frac{du}{dx}\,\mbox{.}</math>}} | = \frac{dy}{du} \cdot \frac{du}{dx}\,\mbox{.}</math>}} | ||
- | + | One usually says that the composite function ''y'' consists of the ''outer'' function ''f'' and the ''inner'' function ''g''. Analogously <math>f^{\,\prime}</math> is said to be the ''outer derivative'' and <math>g'</math> the ''inner derivative''. | |
<div class="exempel"> | <div class="exempel"> | ||
- | ''' | + | ''' Example 2''' |
- | + | In the function <math>y=(x^2 + 2x)^4</math> | |
<center> | <center> | ||
{| align="center" cellspacing="3em" cellpadding="0" | {| align="center" cellspacing="3em" cellpadding="0" | ||
| align="left" |<math>y=u^4</math> | | align="left" |<math>y=u^4</math> | ||
- | | align="left" | | + | | align="left" | is an outer function, and |
| align="left" |<math>u=x^2+2x</math> | | align="left" |<math>u=x^2+2x</math> | ||
- | | align="left" | | + | | align="left" |an inner function, |
|- | |- | ||
| align="left" |<math>\dfrac{dy}{du}=4u^3</math> | | align="left" |<math>\dfrac{dy}{du}=4u^3</math> | ||
- | | align="left" | | + | | align="left" | is an outer derivative and |
| align="left" |<math>\dfrac{du}{dx}=2x+2</math> | | align="left" |<math>\dfrac{du}{dx}=2x+2</math> | ||
- | | align="left" | | + | | align="left" |an inner derivative. |
|} | |} | ||
</center> | </center> | ||
- | + | The derivative of the function ''y'' with respect to ''x'' is given by the chain rule, and is | |
- | {{ | + | {{Displayed math||<math>\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} |
= 4 u^3 \cdot (2x +2) = 4(x^2 + 2x)^3 \cdot (2x +2)\,\mbox{.}</math>}} | = 4 u^3 \cdot (2x +2) = 4(x^2 + 2x)^3 \cdot (2x +2)\,\mbox{.}</math>}} | ||
</div> | </div> | ||
- | + | When one has become accustomed to using the chain rule one seldom introduces new symbols for the inner and outer functions, but one learns to recognise them intuitively and can differentiate ”immediately”, according to the rule | |
- | {{ | + | {{Displayed math||<math>(\text{outer derivative}) |
- | \cdot (\text{ | + | \cdot (\text{ inner derivative})\,\mbox{.}</math>}} |
- | + | Do not forget to use the product and quotient rules where necessary. | |
<div class="exempel"> | <div class="exempel"> | ||
- | ''' | + | ''' Example 3''' |
<ol type="a"> | <ol type="a"> | ||
<li><math> f(x) = \sin (3x^2 + 1)</math><br><br> | <li><math> f(x) = \sin (3x^2 + 1)</math><br><br> | ||
<math>\begin{array}{ll} | <math>\begin{array}{ll} | ||
- | \text{ | + | \text{Outer derivative:} & \cos (3x^2 +1)\\ |
- | \text{ | + | \text{ Inner derivative:} & 6x |
\end{array}</math><br><br> | \end{array}</math><br><br> | ||
<math>f^{\,\prime}(x) = \cos (3x^2 + 1) \cdot 6x | <math>f^{\,\prime}(x) = \cos (3x^2 + 1) \cdot 6x | ||
Line 122: | Line 129: | ||
<li><math> y = 5 \, e^{x^2}</math><br><br> | <li><math> y = 5 \, e^{x^2}</math><br><br> | ||
<math>\begin{array}{ll} | <math>\begin{array}{ll} | ||
- | \text{ | + | \text{Outer derivative:} & 5\,e^{x^2}\\ |
- | \text{ | + | \text{ Inner derivative:} & 2x |
\end{array}</math><br><br> | \end{array}</math><br><br> | ||
<math>y' = 5 \, e^{x^2} \cdot 2x = 10x\, e^{x^2}</math> | <math>y' = 5 \, e^{x^2} \cdot 2x = 10x\, e^{x^2}</math> | ||
Line 130: | Line 137: | ||
<li><math> f(x) = e^{x\cdot \sin x}</math><br><br> | <li><math> f(x) = e^{x\cdot \sin x}</math><br><br> | ||
<math>\begin{array}{ll} | <math>\begin{array}{ll} | ||
- | \text{ | + | \text{Outer derivative:} & e^{x\cdot \sin x}\\ |
- | \text{ | + | \text{ Inner derivative:} & 1\cdot \sin x + x \cos x |
\end{array}</math><br><br> | \end{array}</math><br><br> | ||
<math>f^{\,\prime}(x) = e^{x\cdot \sin x} (\sin x + x \cos x)</math> | <math>f^{\,\prime}(x) = e^{x\cdot \sin x} (\sin x + x \cos x)</math> | ||
Line 155: | Line 162: | ||
</div> | </div> | ||
- | + | The chain rule also can be used repeatedly on a function that is composed at several levels. For example, the function <math>y= f \bigl( g(h(x))\bigr)</math> has the derivative | |
+ | |||
- | {{ | + | {{Displayed math||<math>y'= f^{\,\prime} \bigl ( g(h(x))\bigr) |
\cdot g'(h(x)) \cdot h'(x)\,\mbox{.}</math>}} | \cdot g'(h(x)) \cdot h'(x)\,\mbox{.}</math>}} | ||
<div class="exempel"> | <div class="exempel"> | ||
- | ''' | + | ''' Example 4''' |
<ol type="a"> | <ol type="a"> | ||
<li><math> D\,\sin^3 2x = D\,(\sin 2x)^3 | <li><math> D\,\sin^3 2x = D\,(\sin 2x)^3 | ||
Line 172: | Line 180: | ||
<li><math> D\,\sin \bigl((x^2 -3x)^4 \bigr) | <li><math> D\,\sin \bigl((x^2 -3x)^4 \bigr) | ||
= \cos \bigl((x^2 -3x)^4\bigr) | = \cos \bigl((x^2 -3x)^4\bigr) | ||
- | \cdot D\, | + | \cdot D\,(x^2 -3x)^4 |
\vphantom{\Bigl(}</math><br> | \vphantom{\Bigl(}</math><br> | ||
<math>\phantom{D\,\sin \bigl((x^2 -3x)^4 \bigr)}{} | <math>\phantom{D\,\sin \bigl((x^2 -3x)^4 \bigr)}{} | ||
Line 206: | Line 214: | ||
- | == | + | ==Higher order derivatives == |
- | + | If a function is differentiable more than once, one can consider higher derivatives like the second derivative, third derivative, and so on. | |
- | + | The second derivative usually is written as <math>f^{\,\prime\prime}</math> (sometimes referred to as "double-prime"), while the third, fourth, etc. derivatives, are written as <math>f^{\,(3)}</math>, <math>f^{\,(4)}</math> and so on. | |
- | + | Other usual notations for these quantities are <math>D^2 f</math>, <math>D^3 f</math>, <math>\ldots\,</math>, <math>\frac{d^2 y}{dx^2}</math>, <math>\frac{d^3 y}{dx^3}</math>, <math>\ldots</math>. | |
<div class="exempel"> | <div class="exempel"> | ||
- | ''' | + | ''' Example 5''' |
<ol type="a"> | <ol type="a"> | ||
<li><math>f(x) = 3\,e^{x^2 -1}</math> <br> | <li><math>f(x) = 3\,e^{x^2 -1}</math> <br> |
Current revision
Theory | Exercises |
Contents:
- Derivative of a product and quotient
- Derivative of a composite function (chain rule)
- Higher order derivatives
Learning outcomes:
After this section, you will have learned :
- To be able, in principle, to differentiate any function composed of elementary functions
Differentiation of products and quotients
Using the definition of a derivative one can obtain the rules for differentiation of products and quotients of functional expressions:
Rules of differentiation for products and quotients:
\displaystyle \begin{align*} D\,\bigl(\,f(x) \cdot g(x) \bigr) &= f^{\,\prime}(x) \cdot g(x) + f(x) \cdot g'(x)\\[4pt] D\,\Bigl( \frac{f(x)}{g(x)} \Bigr) &= \frac{f^{\,\prime}(x)\cdot g(x) - f(x)\cdot g'(x)}{\bigl(g(x)\bigr)^2} \end{align*} |
(Note that the derivatives of products and quotients are not as simple as the derivatives of sums and differences, where one can differentiate the functional expression term by term, i.e. individually!)
Example 1
- \displaystyle D\,(x^2 e^x) = 2x\cdot e^x + x^2\cdot e^x = (2x +x^2)\,e^x\,.
- \displaystyle D\,(x \sin x) = 1\cdot \sin x + x\cdot\cos x = \sin x + x \cos x\,.
- \displaystyle D\,(x \ln x -x) = 1 \cdot \ln x + x\cdot \frac{1}{x} - 1 = \ln x + 1 -1 = \ln x\,.
- \displaystyle D\,\tan x = D\,\frac{\sin x}{\cos x}
= \frac{ \cos x \cdot \cos x
- \sin x \cdot (-\sin x)}{(\cos x)^2}
\vphantom{\biggl(}
\displaystyle \phantom{D\,\tan x}{} = \frac{\cos^2 x + \sin^2 x }{ \cos^2 x} = \frac{1}{\cos^2 x}\,. - \displaystyle D\,\frac{1+x}{\sqrt{x}}
= \frac{\displaystyle 1 \cdot \sqrt{x}
- (1+x) \cdot \frac{1}{2\sqrt{x}}}{(\sqrt{x}\,)^2}
= \frac{\displaystyle\frac{2x}{2\sqrt{x}} - \frac{1}{2\sqrt{x}}
- \frac{x}{2\sqrt{x}}}{x}
\vphantom{\biggl(}
\displaystyle \phantom{D\,\frac{1+x}{\sqrt{x}}}{} = \frac {\displaystyle \frac {x-1}{2\sqrt{x}}}{x} = \frac{x-1}{2x\sqrt{x}}\,. - \displaystyle D\,\frac{x\,e^x}{1+x}
= \frac{(1\cdot e^x + x\cdot e^x)(1+x)
- x\,e^x \cdot 1}{(1+x)^2}
\vphantom{\Biggl(}
\displaystyle \phantom{D\,\frac{x\,e^x}{1+x}}{} = \frac{ e^x + x\,e^x + x\,e^x + x^2\,e^x - x\,e^x}{(1+x)^2} = \frac{(1 + x + x^2)\,e^x} {(1+x)^2}\,.
Derivatives of composite functions
A function \displaystyle y=f(g) where the variable g in turn, is dependent on a variable x takes the form \displaystyle y=f \bigl( g(x)\bigr) and is called a composite function. If one differentiates a composite function with respect to the independent variable x, one uses the following rule
\displaystyle y'(x) = f^{\,\prime}\bigl( g(x) \bigr)
\cdot g'(x)\,\mbox{.} |
This rule is commonly called the chain rule and may, depending on the notation be written in different ways. If we in the above example put \displaystyle y=f(u) and \displaystyle u=g(x) the chain rule can be written
\displaystyle \frac{dy}{dx}
= \frac{dy}{du} \cdot \frac{du}{dx}\,\mbox{.} |
One usually says that the composite function y consists of the outer function f and the inner function g. Analogously \displaystyle f^{\,\prime} is said to be the outer derivative and \displaystyle g' the inner derivative.
Example 2
In the function \displaystyle y=(x^2 + 2x)^4
\displaystyle y=u^4 | is an outer function, and | \displaystyle u=x^2+2x | an inner function, |
\displaystyle \dfrac{dy}{du}=4u^3 | is an outer derivative and | \displaystyle \dfrac{du}{dx}=2x+2 | an inner derivative. |
The derivative of the function y with respect to x is given by the chain rule, and is
\displaystyle \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}
= 4 u^3 \cdot (2x +2) = 4(x^2 + 2x)^3 \cdot (2x +2)\,\mbox{.} |
When one has become accustomed to using the chain rule one seldom introduces new symbols for the inner and outer functions, but one learns to recognise them intuitively and can differentiate ”immediately”, according to the rule
\displaystyle (\text{outer derivative})
\cdot (\text{ inner derivative})\,\mbox{.} |
Do not forget to use the product and quotient rules where necessary.
Example 3
- \displaystyle f(x) = \sin (3x^2 + 1)
\displaystyle \begin{array}{ll} \text{Outer derivative:} & \cos (3x^2 +1)\\ \text{ Inner derivative:} & 6x \end{array}
\displaystyle f^{\,\prime}(x) = \cos (3x^2 + 1) \cdot 6x = 6x \cos (3x^2 +1) - \displaystyle y = 5 \, e^{x^2}
\displaystyle \begin{array}{ll} \text{Outer derivative:} & 5\,e^{x^2}\\ \text{ Inner derivative:} & 2x \end{array}
\displaystyle y' = 5 \, e^{x^2} \cdot 2x = 10x\, e^{x^2} - \displaystyle f(x) = e^{x\cdot \sin x}
\displaystyle \begin{array}{ll} \text{Outer derivative:} & e^{x\cdot \sin x}\\ \text{ Inner derivative:} & 1\cdot \sin x + x \cos x \end{array}
\displaystyle f^{\,\prime}(x) = e^{x\cdot \sin x} (\sin x + x \cos x) - \displaystyle s(t) = t^2 \cos (\ln t)
\displaystyle s'(t) = 2t \cdot \cos (\ln t) + t^2 \cdot\Bigl(-\sin (\ln t) \cdot\frac{1}{t}\Bigr) = 2t \cos (\ln t) - t \sin (\ln t) - \displaystyle D\,a^x = D\,\bigl( e^{\ln a} \bigr)^x = D\,e^{\ln a \cdot x} = e^{\ln a \cdot x} \cdot \ln a = a^x \cdot \ln a
- \displaystyle D\,x^a = D\,\bigl( e^{\ln x} \bigr)^a = D\,e^{ a \cdot \ln x } = e^{a \cdot \ln x} \cdot a \cdot \frac{1}{x} = x^a \cdot a \cdot x^{-1} = ax^{a-1}
The chain rule also can be used repeatedly on a function that is composed at several levels. For example, the function \displaystyle y= f \bigl( g(h(x))\bigr) has the derivative
\displaystyle y'= f^{\,\prime} \bigl ( g(h(x))\bigr)
\cdot g'(h(x)) \cdot h'(x)\,\mbox{.} |
Example 4
- \displaystyle D\,\sin^3 2x = D\,(\sin 2x)^3
= 3(\sin 2x)^2 \cdot D\,\sin 2x
= 3(\sin 2x)^2 \cdot \cos 2x \cdot D\,(2x)
\vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin^3 2x}{}= 3 \sin^2 2x\cdot\cos 2x\cdot 2 = 6 \sin^2 2x\,\cos 2x - \displaystyle D\,\sin \bigl((x^2 -3x)^4 \bigr)
= \cos \bigl((x^2 -3x)^4\bigr)
\cdot D\,(x^2 -3x)^4
\vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin \bigl((x^2 -3x)^4 \bigr)}{} = \cos \bigl((x^2 -3x)^4\bigr)\cdot 4 (x^2 -3x)^3 \cdot D\,(x^2-3x) \vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin \bigl((x^2 -3x)^4 \bigr)}{} = \cos \bigl((x^2 -3x)^4\bigr)\cdot 4 (x^2 -3x)^3 \cdot (2x-3) - \displaystyle D\,\sin^4 (x^2 -3x)
= D\,\bigl( \sin (x^2 -3x) \bigr)^4
\vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin^4 (x^2 -3x)}{} = 4 \sin^3 (x^2 - 3x) \cdot D\,\sin(x^2-3x) \vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin^4 (x^2 -3x)}{} = 4 \sin^3 (x^2 - 3x) \cdot\cos (x^2 -3x) \cdot D(x^2 -3x) \vphantom{\Bigl(}
\displaystyle \phantom{D\,\sin^4 (x^2 -3x)}{} = 4 \sin^3 (x^2 - 3x) \cdot\cos (x^2 -3x)\cdot (2x-3) - \displaystyle D\,\Bigl ( e^{\sqrt{x^3-1}}\,\Bigr)
= e^{\sqrt{x^3-1}} \cdot D\,\sqrt{x^3-1}
= e^{\sqrt{x^3-1}} \cdot \frac{1}{2 \sqrt{x^3-1}}
\cdot D\,(x^3-1)
\vphantom{\Biggl(}
\displaystyle \phantom{\displaystyle D\,\Bigl ( e^{\sqrt{x^3-1}}\,\Bigr)}{} = e^{\sqrt{x^3-1}} \cdot \frac{1}{2 \sqrt{x^3-1}} \cdot 3 x^2 = \frac { 3 x^2 e^{\sqrt{x^3-1}}} {2 \sqrt{x^3-1}} \vphantom{\dfrac{\dfrac{()^2}{()}}{()}}
Higher order derivatives
If a function is differentiable more than once, one can consider higher derivatives like the second derivative, third derivative, and so on.
The second derivative usually is written as \displaystyle f^{\,\prime\prime} (sometimes referred to as "double-prime"), while the third, fourth, etc. derivatives, are written as \displaystyle f^{\,(3)}, \displaystyle f^{\,(4)} and so on.
Other usual notations for these quantities are \displaystyle D^2 f, \displaystyle D^3 f, \displaystyle \ldots\,, \displaystyle \frac{d^2 y}{dx^2}, \displaystyle \frac{d^3 y}{dx^3}, \displaystyle \ldots.
Example 5
- \displaystyle f(x) = 3\,e^{x^2 -1}
\displaystyle f^{\,\prime}(x) = 3\,e^{x^2 -1} \cdot D\,(x^2-1) = 3\,e^{x^2 -1} \cdot 2x = 6x\,e^{x^2 -1}\vphantom{\biggl(}
\displaystyle f^{\,\prime\prime}(x) = 6\,e^{x^2 -1} + 6x\,e^{x^2 -1} \cdot 2x = 6\,e^{x^2 -1}\,(1+ 2x^2) - \displaystyle y = \sin x\,\cos x
\displaystyle \frac{dy}{dx} = \cos x\,\cos x + \sin x\,(- \sin x) = \cos^2 x - \sin^2 x\vphantom{\Biggl(}
\displaystyle \frac{d^2 y}{dx^2} = 2 \cos x\,(-\sin x) - 2 \sin x \cos x = -4 \sin x \cos x - \displaystyle D\,( e^x \sin x) = e^x \sin x + e^x \cos x
= e^x (\sin x + \cos x)
\vphantom{\Bigl(}
\displaystyle D^2(e^x\sin x) = D\,\bigl(e^x (\sin x + \cos x)\bigr) \vphantom{\Bigl(} \displaystyle \phantom{D^2(e^x\sin x)}{} = e^x (\sin x + \cos x) + e^x (\cos x - \sin x) = 2\,e^x \cos x \vphantom{\biggl(}
\displaystyle D^3 ( e^x \sin x) = D\,(2\,e^x \cos x) \vphantom{\Bigl(} \displaystyle \phantom{D^3 ( e^x \sin x)}{} = 2\,e^x \cos x + 2\,e^x (-\sin x) = 2\,e^x ( \cos x - \sin x )