Calculus

Differentiation of Functions

The Chain Rule

Page 1
Problems 1-5
Page 2
Problems 6-25
Page 3
Problems 26-45

Consider first the notion of a composite function. Let the function \(g\) be defined on the set \(X\) and can take values in the set \(U\). In this case we say that the function \(g\) maps the set \(X\) to \(U\) and the function is written as

\[{u = g\left( x \right),\;\;\text{where}\;\;\;}\kern-0.3pt{x \in X,u \in U.}\]

Now imagine that another function \(f\) is defined on the set \(U\). This function maps the set \(U\) to \(Y\):

\[{y = f\left( u \right),\;\;\text{where}\;\;\;}\kern-0.3pt{u \in U,y \in Y.}\]

This double mapping, in which the range of the first map is a subset of the domain of the second map is called the composition of maps, and the corresponding functions form a composition of functions.

If \(g:X \to U\) and \(f:U \to Y\), then the composition of functions \(g\) and \(f\) is denoted as

\[{y = \left( {f \circ g} \right)\left( x \right) }={ f\left( {g\left( x \right)} \right) }={ f\left( u \right)}\]

and represents a “two-layer” composite function or a function of a function.

If \(f\) and \(g\) are differentiable functions, then the composite function \(y = f\left( {g\left( x \right)} \right)\) is also differentiable in \(x\) and its derivative is given by

\[
{\frac{{dy}}{{dx}} = \frac{d}{{dx}}\left( {f \circ g} \right)\left( x \right) }
= {\frac{d}{{dx}}f\left( {g\left( x \right)} \right)g’\left( x \right) }
= {\frac{{df}}{{du}}\frac{{du}}{{dx}}.}
\]

Looking more closely at the formula, we notice that it involves multiplication of a derivative value for the outer function times a derivative value for the inner function. However, when we differentiate the composite function \(y = f\left( {g\left( x \right)} \right)\) at the point \(x\), we multiply the derivative value of the inner function at \(x\) times the derivative value of the outer function at \(u = g\left( x \right)\) … not at \(x!\)

Let us prove the above formula.

Take an arbitrary point \({x_0}\). We assume that the function \(u = g\left( x \right)\) is differentiable at \({x_0}\) and the function \(y = f\left( u \right)\), respectively, is differentiable at \({u_0} = g\left( {{x_0}} \right)\). This means that the derivatives \(g’\left( x \right)\) and \(f’\left( u \right)\) exist at the indicated points, and the functions \(g\left( x \right)\) and \(f\left( u \right)\) are continuous in a neighborhood of these points.

The derivative of the outer function \(y = f\left( u \right)\) at the point \({u_0}\) is written using the limit definition as

\[f’\left( {{u_0}} \right) = \lim\limits_{\Delta u \to 0} \frac{{\Delta y}}{{\Delta u}}.\]

This expression can be rewritten in the form:

\[{\Delta y }={ f’\left( {{u_0}} \right)\Delta u + \varepsilon \left( {\Delta u} \right)\Delta u,}\]

where the error \(\varepsilon \left( {\Delta u} \right)\)) depends on the increment \(\Delta u\) and the following condition is met:

\[{\lim\limits_{\Delta u \to 0} \varepsilon \left( {\Delta u} \right) }={ \varepsilon \left( 0 \right) = 0.}\]

Divide the expression for \(\Delta y\) by the increment of the internal variable \(\Delta x \ne 0:\)

\[{\frac{{\Delta y}}{{\Delta x}} }={ f’\left( {{u_0}} \right)\frac{{\Delta u}}{{\Delta x}} + \varepsilon \left( {\Delta u} \right)\frac{{\Delta u}}{{\Delta x}}.}\]

Because the inner function \(u = g\left( x \right)\) is differentiable at \({x_0}\), then

\[\lim\limits_{\Delta x \to 0} \frac{{\Delta u}}{{\Delta x}} = g’\left( {{x_0}} \right).\]

We also note that \(\lim\limits_{\Delta x \to 0} \Delta u = 0\) by the continuity of the function \(u\left( x \right)\) and hence

\[
{\lim\limits_{\Delta x \to 0} \varepsilon \left( {\Delta u} \right) = \varepsilon \left( {\lim\limits_{\Delta x \to 0} \Delta u} \right) }
= {\varepsilon \left( 0 \right) = 0.}
\]

As a result, the derivative of the composite function at \({x_0}\) is expressed by the following formula:

\[
{y’\left( {{x_0}} \right) }={ \lim\limits_{\Delta x \to 0} \frac{{\Delta y}}{{\Delta x}} }
= {\lim\limits_{\Delta x \to 0} \left[ {f’\left( {{u_0}} \right)\frac{{\Delta u}}{{\Delta x}} }\right.}+{\left.{ \varepsilon \left( {\Delta u} \right)\frac{{\Delta u}}{{\Delta x}}} \right] }
= {f’\left( {{u_0}} \right)\lim\limits_{\Delta x \to 0} \frac{{\Delta u}}{{\Delta x}} }+{ \lim\limits_{\Delta x \to 0} \varepsilon \left( {\Delta u} \right) \cdot \lim\limits_{\Delta x \to 0} \frac{{\Delta u}}{{\Delta x}} }
= {f’\left( {{u_0}} \right)g’\left( {{x_0}} \right) + 0 \cdot g’\left( {{x_0}} \right) }
= {f’\left( {{u_0}} \right)g’\left( {{x_0}} \right) }
= {f’\left( {g\left( {{x_0}} \right)} \right)g’\left( {{x_0}} \right).}
\]

This rule is easily generalized for composite functions consisting of three and more “layers”. For example, the derivative of a “three-layer” composite function \(y = f\left( {g\left( {h\left( x \right)} \right)} \right)\) is given by the formula

\[
{y’ = {\left( {f \circ g \circ h} \right)^\prime }\left( x \right) }
= {{\left[ {f\left( {g\left( {h\left( x \right)} \right)} \right)} \right]^\prime } }
= {f’\left( {g\left( {h\left( x \right)} \right)} \right) \cdot g’\left( {h\left( x \right)} \right) \cdot h’\left( x \right).}
\]

You may notice that the derivative of a composite function is represented as a serial product of the derivatives of the constituent functions. The arguments of the functions are linked (chained) so that the value of an internal function is the argument for the following external function. Therefore, the rule for differentiating a composite function is often called the chain rule.

In Examples \(1-45,\) find the derivatives of the given functions:

Solved Problems

Click on problem description to see solution.

 Example 1

\[y = \ln {x^2}\]

 Example 2

\[y = {\ln ^2}x\]

 Example 3

\[y = \cos {x^3}\]

 Example 4

\[y = \cos \left( {3x + 2} \right)\]

 Example 5

\[y = \tan 2x\]

 Example 6

\[y = {\sin ^3}x\]

 Example 7

\[y = {\cos ^4}x\]

 Example 8

\[y = {3^{\cos x}}\]

 Example 9

\[y = \ln \sin x\]

 Example 10

\[y = \ln \tan x\]

 Example 11

\[y = \sqrt {{x^2} + 2x + 3} \]

 Example 12

\[y = {\tan ^2}\frac{x}{2}\]

 Example 13

\[y = \ln \ln x\]

 Example 14

\[y = {\left( {\sqrt x – 2} \right)^7}\]

 Example 15

\[y = {\log _3}{x^2}\]

 Example 16

\[y = {e^{\sin x}}\]

 Example 17

\[y = \sqrt {3{x^2} + 1} \]

 Example 18

Find the value of the derivative of the function \(y = \sin {\large\frac{x}{3}\normalsize}\) at \(x = 2\pi\).

 Example 19

\[y = \frac{1}{a}\arctan \frac{x}{a}\]

 Example 20

\[y = \tan \frac{x}{2} – \cot \frac{x}{2}\]

 Example 21

\[y = \sqrt {\sin 2x + 1} \]

 Example 22

\[y = \sin \left( {\ln \cos x} \right)\]

 Example 23

\[y = x\sqrt {1 + {x^2}} \]

 Example 24

\[y = {\left( {\frac{{x + 1}}{{x – 1}}} \right)^3}\]

 Example 25

\[y = \ln \left( {\sqrt {x + 1} – \sqrt x } \right)\]

 Example 26

\[y = \sqrt[\large 3\normalsize]{{9{x^2} – 1}}\]

 Example 27

\[y = {\left( {5x + 2} \right)^{13}} – {\left( {6x + 7} \right)^{10}}\]

 Example 28

\[y = {\left( {x + \sqrt x } \right)^3}\]

 Example 29

\[y = \ln \left( {\frac{{x + 1}}{{x – 1}}} \right)\]

 Example 30

\[y = \sin {x^3}\cos {x^2}\]

 Example 31

\[y = \sin \left( {{{\cos }^2}x} \right)\]

 Example 32

\[y = \arcsin \frac{1}{x}\]

 Example 33

\[y = \sqrt {x\sqrt x } \]

 Example 34

\[y = {\sin ^4}x + {\cos ^4}x\]

 Example 35

\[y = \arccos \frac{a}{x}\]

 Example 36

\[y = \text{arccot}\,\frac{{{x^2}}}{a}\;\left( {a \ne 0} \right)\]

 Example 37

\[y = \sqrt[\large 3\normalsize]{{{{\cot }^8}\frac{x}{2}}}\]

 Example 38

\[y = {\log _5}\sin 2x\]

 Example 39

\[y = x\sin \frac{1}{x}\]

 Example 40

\[y = \ln \left( {x + \sqrt {{x^2} + 1} } \right)\]

 Example 41

\[y = \sin \left[ {\sin\left( {\sin x} \right)} \right]\]

 Example 42

\[y = \frac{1}{{{{\cos }^n}x}}\]

 Example 43

\[y = \frac{2}{3}\sqrt {{{\left( {1 + \ln x} \right)}^3}} \]

 Example 44

\[y = \ln \frac{1}{{\sqrt {1 – {x^4}} }}\]

 Example 45

\[y = \ln \tan \left( {\frac{x}{2} + \frac{\pi }{4}} \right)\]

Example 1.

\[y = \ln {x^2}\]

Solution.

\[
{y’\left( x \right) = {\left( {\ln {x^2}} \right)^\prime } }
= {\frac{1}{{{x^2}}} \cdot {\left( {{x^2}} \right)^\prime } }
= {\frac{1}{{{x^2}}} \cdot 2x = \frac{{2x}}{{{x^2}}} }
= {\frac{2}{x}\;\;\left( {x \ne 0} \right).}
\]

Example 2.

\[y = {\ln ^2}x\]

Solution.

\[
{y’\left( x \right) = {\left( {{{\ln }^2}x} \right)^\prime } }
= {2\ln x \cdot {\left( {\ln x} \right)^\prime } }
= {2\ln x \cdot \frac{1}{x} }
= {\frac{{2\ln x}}{x}\;\;\;}\kern-0.3pt{\left( {x \gt 0} \right).}
\]

Example 3.

\[y = \cos {x^3}\]

Solution.

\[
{y’\left( x \right) = {\left( {\cos {x^3}} \right)^\prime } }
= {\sin {x^3} \cdot {\left( {{x^3}} \right)^\prime } }
= {\sin {x^3} \cdot 3{x^2} }
= {3{x^2}\sin {x^3}.}
\]

Example 4.

\[y = \cos \left( {3x + 2} \right)\]

Solution.

\[
{y’\left( x \right) }={ {\left[ {\cos \left( {3x + 2} \right)} \right]^\prime } }
= { – \sin \left( {3x + 2} \right) \cdot {\left( {3x + 2} \right)^\prime } }
= { – 3\sin \left( {3x + 2} \right).}
\]

Example 5.

\[y = \tan 2x\]

Solution.

\[
{y’\left( x \right) = {\left( {\tan 2x} \right)^\prime } }
= {\frac{1}{{{{\cos }^2}2x}} \cdot {\left( {2x} \right)^\prime } }
= {\frac{2}{{{{\cos }^2}2x}}.}
\]

The domain of the function and the derivative is given by

\[
{2x \ne \frac{\pi }{2} + \pi n,\;\;}\Rightarrow
{x \ne \frac{\pi }{4} + \frac{{\pi n}}{2},\;\;}\kern0pt{n \in \mathbb{Z}.}
\]
Page 1
Problems 1-5
Page 2
Problems 6-25
Page 3
Problems 26-45