Now, let's see how to differentiate composite functions.
Suppose that we are given a function h ( x ) = f ( g ( x ) ) {h}{\left({x}\right)}={f{{\left({g{{\left({x}\right)}}}\right)}}} h ( x ) = f ( g ( x ) ) . Remembering that g ′ ( x ) {g{'}}{\left({x}\right)} g ′ ( x ) is the rate of change of g ( x ) {g{{\left({x}\right)}}} g ( x ) with respect to x {x} x and f ′ ( g ( x ) ) {f{'}}{\left({g{{\left({x}\right)}}}\right)} f ′ ( g ( x ) ) is the rate of change of f {f{}} f with respect to g ( x ) {g{{\left({x}\right)}}} g ( x ) , it is reasonable to suggest that the rate of change of f {f{}} f with respect to x {x} x is the product of f ′ ( g ( x ) ) {f{'}}{\left({g{{\left({x}\right)}}}\right)} f ′ ( g ( x ) ) and g ′ ( x ) {g{'}}{\left({x}\right)} g ′ ( x ) .
Indeed, if g {g{}} g changes twice as fast as x {x} x and f {f{}} f changes three times as fast as g {g{}} g , we can state that f {f{}} f changes six times as fast as x {x} x .
Chain Rule. If f {f{}} f and g {g{}} g are both differentiable and h = f ∘ g {h}={f{\circ}}{g{}} h = f ∘ g is a composite function defined by h ( x ) = f ( g ( x ) ) {h}{\left({x}\right)}={f{{\left({g{{\left({x}\right)}}}\right)}}} h ( x ) = f ( g ( x ) ) , we have that h {h} h is differentiable and h ′ ( x ) = f ′ ( g ( x ) ) g ′ ( x ) {h}'{\left({x}\right)}={f{'}}{\left({g{{\left({x}\right)}}}\right)}{g{'}}{\left({x}\right)} h ′ ( x ) = f ′ ( g ( x ) ) g ′ ( x ) .
Proof. Recall that if y = f ( x ) {y}={f{{\left({x}\right)}}} y = f ( x ) and x {x} x changes from a {a} a to a + Δ x {a}+\Delta{x} a + Δ x , the increment of y {y} y is Δ y = f ( a + Δ x ) − f ( a ) \Delta{y}={f{{\left({a}+\Delta{x}\right)}}}-{f{{\left({a}\right)}}} Δ y = f ( a + Δ x ) − f ( a ) . According to the definition of derivative, lim Δ x → 0 Δ y Δ x = f ′ ( a ) \lim_{{\Delta{x}\to{0}}}\frac{{\Delta{y}}}{{\Delta{x}}}={f{'}}{\left({a}\right)} lim Δ x → 0 Δ x Δ y = f ′ ( a ) .
So, if we denote by ϵ \epsilon ϵ the difference between the difference quotient and the derivative, we obtain that lim Δ x → 0 ϵ = lim Δ x → 0 ( Δ y Δ x − f ′ ( a ) ) = f ′ ( a ) − f ′ ( a ) = 0 \lim_{{\Delta{x}\to{0}}}\epsilon=\lim_{{\Delta{x}\to{0}}}{\left(\frac{{\Delta{y}}}{{\Delta{x}}}-{f{'}}{\left({a}\right)}\right)}={f{'}}{\left({a}\right)}-{f{'}}{\left({a}\right)}={0} lim Δ x → 0 ϵ = lim Δ x → 0 ( Δ x Δ y − f ′ ( a ) ) = f ′ ( a ) − f ′ ( a ) = 0 .
But ϵ = Δ y Δ x − f ′ ( a ) \epsilon=\frac{{\Delta{y}}}{{\Delta{x}}}-{f{'}}{\left({a}\right)} ϵ = Δ x Δ y − f ′ ( a ) , or Δ y = f ′ ( a ) Δ x + ϵ Δ x \Delta{y}={f{'}}{\left({a}\right)}\Delta{x}+\epsilon\Delta{x} Δ y = f ′ ( a ) Δ x + ϵ Δ x .
Thus, for any differentiable function f {f{}} f , Δ y = f ′ ( a ) Δ x + ϵ Δ x \Delta{y}={f{'}}{\left({a}\right)}\Delta{x}+\epsilon\Delta{x} Δ y = f ′ ( a ) Δ x + ϵ Δ x , where ϵ → 0 \epsilon\to{0} ϵ → 0 as Δ x → 0 \Delta{x}\to{0} Δ x → 0 .
Now, suppose u = g ( x ) {u}={g{{\left({x}\right)}}} u = g ( x ) is differentiable at a {a} a and y = f ( u ) {y}={f{{\left({u}\right)}}} y = f ( u ) is differentiable at b = g ( a ) {b}={g{{\left({a}\right)}}} b = g ( a ) . If Δ x \Delta{x} Δ x is an increment in x {x} x and Δ u \Delta{u} Δ u and Δ y \Delta{y} Δ y are the corresponding increments in u {u} u and y {y} y , we have that:
Δ u = g ′ ( a ) Δ x + ϵ 1 Δ x = ( g ′ ( a ) + ϵ 1 ) Δ x \Delta{u}={g{'}}{\left({a}\right)}\Delta{x}+\epsilon_{{1}}\Delta{x}={\left({g{'}}{\left({a}\right)}+\epsilon_{{1}}\right)}\Delta{x} Δ u = g ′ ( a ) Δ x + ϵ 1 Δ x = ( g ′ ( a ) + ϵ 1 ) Δ x , where ϵ 1 → 0 \epsilon_{{1}}\to{0} ϵ 1 → 0 as Δ x → 0 \Delta{x}\to{0} Δ x → 0 .
Δ y = f ′ ( b ) Δ u + ϵ 2 Δ u = ( f ′ ( b ) + ϵ 2 ) Δ u \Delta{y}={f{'}}{\left({b}\right)}\Delta{u}+\epsilon_{{2}}\Delta{u}={\left({f{'}}{\left({b}\right)}+\epsilon_{{2}}\right)}\Delta{u} Δ y = f ′ ( b ) Δ u + ϵ 2 Δ u = ( f ′ ( b ) + ϵ 2 ) Δ u , where ϵ 2 → 0 \epsilon_{{2}}\to{0} ϵ 2 → 0 as Δ u → 0 \Delta{u}\to{0} Δ u → 0 .
Now, substitute the expression for Δ u \Delta{u} Δ u in the last equation:
Δ y = ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 ) Δ x \Delta{y}={\left({f{'}}{\left({b}\right)}+\epsilon_{{2}}\right)}{\left({g{'}}{\left({a}\right)}+\epsilon_{{1}}\right)}\Delta{x} Δ y = ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 ) Δ x ,
Or
Δ y Δ x = ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 ) \frac{{\Delta{y}}}{{\Delta{x}}}={\left({f{'}}{\left({b}\right)}+\epsilon_{{2}}\right)}{\left({g{'}}{\left({a}\right)}+\epsilon_{{1}}\right)} Δ x Δ y = ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 )
As Δ x → 0 \Delta{x}\to{0} Δ x → 0 , it can be stated that Δ u → 0 \Delta{u}\to{0} Δ u → 0 . So, both ϵ 1 → 0 \epsilon_{{1}}\to{0} ϵ 1 → 0 and ϵ 2 → 0 \epsilon_{{2}}\to{0} ϵ 2 → 0 as Δ x → 0 \Delta{x}\to{0} Δ x → 0 .
Therefore, d y d x = lim Δ x → 0 ( ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 ) ) = f ′ ( b ) g ′ ( a ) = f ′ ( g ( a ) ) g ′ ( a ) \frac{{{d}{y}}}{{{d}{x}}}=\lim_{{\Delta{x}\to{0}}}{\left({\left({f{'}}{\left({b}\right)}+\epsilon_{{2}}\right)}{\left({g{'}}{\left({a}\right)}+\epsilon_{{1}}\right)}\right)}={f{'}}{\left({b}\right)}{g{'}}{\left({a}\right)}={f{'}}{\left({g{{\left({a}\right)}}}\right)}{g{'}}{\left({a}\right)} d x d y = lim Δ x → 0 ( ( f ′ ( b ) + ϵ 2 ) ( g ′ ( a ) + ϵ 1 ) ) = f ′ ( b ) g ′ ( a ) = f ′ ( g ( a ) ) g ′ ( a ) .
In Leibniz's notation, if y = f ( u ) {y}={f{{\left({u}\right)}}} y = f ( u ) and u = g ( x ) {u}={g{{\left({x}\right)}}} u = g ( x ) are both differentiable, d y d x = d y d u d u d x \frac{{{d}{y}}}{{{d}{x}}}=\frac{{{d}{y}}}{{{d}{u}}}\frac{{{d}{u}}}{{{d}{x}}} d x d y = d u d y d x d u .
In Leibniz's notation, it is especially easy to remember the chain rule, because if d y d u \frac{{{d}{y}}}{{{d}{u}}} d u d y and d u d x \frac{{{d}{u}}}{{{d}{x}}} d x d u were quotients, we could cancel d u {d}{u} d u . Remember, however, that d u {d}{u} d u has not been defined and d u d x \frac{{{d}{u}}}{{{d}{x}}} d x d u should not be thought of as an actual quotient.
Example 1 . Find the derivative of h ( x ) = x 2 + 1 {h}{\left({x}\right)}=\sqrt{{{{x}}^{{2}}+{1}}} h ( x ) = x 2 + 1 .
Here, f ( u ) = u {f{{\left({u}\right)}}}=\sqrt{{{u}}} f ( u ) = u , g ( x ) = x 2 + 1 {g{{\left({x}\right)}}}={{x}}^{{2}}+{1} g ( x ) = x 2 + 1 , and h ( x ) = f ( g ( x ) ) {h}{\left({x}\right)}={f{{\left({g{{\left({x}\right)}}}\right)}}} h ( x ) = f ( g ( x ) ) ; therefore,
f ′ ( u ) = ( u ) ′ = 1 2 u {f{'}}{\left({u}\right)}={\left(\sqrt{{{u}}}\right)}'=\frac{{1}}{{{2}\sqrt{{{u}}}}} f ′ ( u ) = ( u ) ′ = 2 u 1 , and g ′ ( x ) = ( x 2 + 1 ) ′ = 2 x {g{'}}{\left({x}\right)}={\left({{x}}^{{2}}+{1}\right)}'={2}{x} g ′ ( x ) = ( x 2 + 1 ) ′ = 2 x .
So, h ′ ( x ) = f ′ ( g ( x ) ) g ′ ( x ) = f ′ ( x 2 + 1 ) 2 x = 1 2 x 2 + 1 2 x = x x 2 + 1 {h}'{\left({x}\right)}={f{'}}{\left({g{{\left({x}\right)}}}\right)}{g{'}}{\left({x}\right)}={f{'}}{\left(\sqrt{{{{x}}^{{2}}+{1}}}\right)}{2}{x}=\frac{{1}}{{{2}\sqrt{{{{x}}^{{2}}+{1}}}}}{2}{x}=\frac{{x}}{{\sqrt{{{{x}}^{{2}}+{1}}}}} h ′ ( x ) = f ′ ( g ( x ) ) g ′ ( x ) = f ′ ( x 2 + 1 ) 2 x = 2 x 2 + 1 1 2 x = x 2 + 1 x .
When using the chain rule, we work from the outside to the inside. We differentiate the outer function [at the inner function g ( x ) g(x) g ( x ) ] and then we multiply by the derivative of the inner function.
Example 2 . Differentiate y = cos ( x 3 ) {y}={\cos{{\left({{x}}^{{3}}\right)}}} y = cos ( x 3 ) and y = ( cos ( x ) ) 3 {y}={{\left({\cos{{\left({x}\right)}}}\right)}}^{{3}} y = ( cos ( x ) ) 3 .
If y = cos ( x 3 ) {y}={\cos{{\left({{x}}^{{3}}\right)}}} y = cos ( x 3 ) , the outer function is a cosine and the inner is a cubic function; so, y ′ = − sin ( x 3 ) ⋅ ( x 3 ) ′ = − 3 x 2 sin ( x 3 ) {y}'=-{\sin{{\left({{x}}^{{3}}\right)}}}\cdot{\left({{x}}^{{3}}\right)}'=-{3}{{x}}^{{2}}{\sin{{\left({{x}}^{{3}}\right)}}} y ′ = − sin ( x 3 ) ⋅ ( x 3 ) ′ = − 3 x 2 sin ( x 3 ) .
If y = ( cos ( x ) ) 3 {y}={{\left({\cos{{\left({x}\right)}}}\right)}}^{{3}} y = ( cos ( x ) ) 3 , the outer function is cubic and the inner is a cosine; so, y ′ = 3 ( cos ( x ) ) 2 ⋅ ( cos ( x ) ) ′ = − 3 ( cos ( x ) ) 2 sin ( x ) {y}'={3}{{\left({\cos{{\left({x}\right)}}}\right)}}^{{2}}\cdot{\left({\cos{{\left({x}\right)}}}\right)}'=-{3}{{\left({\cos{{\left({x}\right)}}}\right)}}^{{2}}{\sin{{\left({x}\right)}}} y ′ = 3 ( cos ( x ) ) 2 ⋅ ( cos ( x ) ) ′ = − 3 ( cos ( x ) ) 2 sin ( x ) .
One more example.
Example 3 . Differentiate y = ( x 2 + 1 ) 7 {y}={{\left({{x}}^{{2}}+{1}\right)}}^{{7}} y = ( x 2 + 1 ) 7 .
y ′ = 7 ( x 2 + 1 ) 6 ⋅ ( x 2 + 1 ) ′ = 7 ( x 2 + 1 ) 6 ⋅ 2 x = 14 x ( x 2 + 1 ) 6 {y}'={7}{{\left({{x}}^{{2}}+{1}\right)}}^{{6}}\cdot{\left({{x}}^{{2}}+{1}\right)}'={7}{{\left({{x}}^{{2}}+{1}\right)}}^{{6}}\cdot{2}{x}={14}{x}{{\left({{x}}^{{2}}+{1}\right)}}^{{6}} y ′ = 7 ( x 2 + 1 ) 6 ⋅ ( x 2 + 1 ) ′ = 7 ( x 2 + 1 ) 6 ⋅ 2 x = 14 x ( x 2 + 1 ) 6 .
Let's work another example.
Example 4 . Differentiate y = ( 2 t + 3 t − 5 ) 8 {y}={{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}}^{{8}} y = ( t − 5 2 t + 3 ) 8 .
Here, we use the chain rule and the quotient rule.
y ′ = 8 ( 2 t + 3 t − 5 ) 8 − 1 ⋅ ( 2 t + 3 t − 5 ) ′ = 8 ( 2 t + 3 t − 5 ) 7 ( 2 t + 3 ) ′ ( t − 5 ) − ( 2 t + 3 ) ( t − 5 ) ′ ( t − 5 ) 2 = {y}'={8}{{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}}^{{{8}-{1}}}\cdot{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}'={8}{{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}}^{{7}}\frac{{{\left({2}{t}+{3}\right)}'{\left({t}-{5}\right)}-{\left({2}{t}+{3}\right)}{\left({t}-{5}\right)}'}}{{{\left({t}-{5}\right)}}^{{2}}}= y ′ = 8 ( t − 5 2 t + 3 ) 8 − 1 ⋅ ( t − 5 2 t + 3 ) ′ = 8 ( t − 5 2 t + 3 ) 7 ( t − 5 ) 2 ( 2 t + 3 ) ′ ( t − 5 ) − ( 2 t + 3 ) ( t − 5 ) ′ =
= 8 ( 2 t + 3 t − 5 ) 7 2 ( t − 5 ) − ( 2 t + 3 ) ( t − 5 ) 2 = 8 ( 2 t + 3 t − 5 ) 7 − 13 ( t − 5 ) 2 = − 104 ( 2 t + 3 ) 7 ( t − 5 ) 9 ={8}{{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}}^{{7}}\frac{{{2}{\left({t}-{5}\right)}-{\left({2}{t}+{3}\right)}}}{{{\left({t}-{5}\right)}}^{{2}}}={8}{{\left(\frac{{{2}{t}+{3}}}{{{t}-{5}}}\right)}}^{{7}}\frac{{-{13}}}{{{\left({t}-{5}\right)}}^{{2}}}=-{104}\frac{{{{\left({2}{t}+{3}\right)}}^{{7}}}}{{{{\left({t}-{5}\right)}}^{{9}}}} = 8 ( t − 5 2 t + 3 ) 7 ( t − 5 ) 2 2 ( t − 5 ) − ( 2 t + 3 ) = 8 ( t − 5 2 t + 3 ) 7 ( t − 5 ) 2 − 13 = − 104 ( t − 5 ) 9 ( 2 t + 3 ) 7 .
This is clear. Let's do a more complex one.
Example 5 . Find the derivative of f ( x ) = ( 3 x 2 + 4 x + 1 ) 5 ( e x + sin ( x ) ) 2 {f{{\left({x}\right)}}}={{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{5}}{{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}}^{{2}} f ( x ) = ( 3 x 2 + 4 x + 1 ) 5 ( e x + sin ( x ) ) 2 .
We need to use the product rule together with the chain rule.
f ′ ( x ) = ( ( 3 x 2 + 4 x + 1 ) 5 ) ′ ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 ( ( e x + sin ( x ) ) 2 ) ′ = {f{'}}{\left({x}\right)}={\left({{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{5}}\right)}'{{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}}^{{2}}+{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{5}}{\left({{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}}^{{2}}\right)}'= f ′ ( x ) = ( ( 3 x 2 + 4 x + 1 ) 5 ) ′ ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 ( ( e x + sin ( x ) ) 2 ) ′ =
= 5 ( 3 x 2 + 4 x + 1 ) 4 ⋅ ( 3 x 2 + 4 x + 1 ) ′ ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 2 ( e x + sin ( x ) ) ( e x + sin ( x ) ) ′ = ={5}{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{4}}\cdot{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}'{{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}}^{{2}}+{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{5}}{2}{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}'= = 5 ( 3 x 2 + 4 x + 1 ) 4 ⋅ ( 3 x 2 + 4 x + 1 ) ′ ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 2 ( e x + sin ( x ) ) ( e x + sin ( x ) ) ′ =
= 5 ( 3 x 2 + 4 x + 1 ) 4 ⋅ ( 6 x + 4 ) ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 2 ( e x + sin ( x ) ) ( e x + cos ( x ) ) = ={5}{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{4}}\cdot{\left({6}{x}+{4}\right)}{{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}}^{{2}}+{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{5}}{2}{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}{\left({{e}}^{{x}}+{\cos{{\left({x}\right)}}}\right)}= = 5 ( 3 x 2 + 4 x + 1 ) 4 ⋅ ( 6 x + 4 ) ( e x + sin ( x ) ) 2 + ( 3 x 2 + 4 x + 1 ) 5 2 ( e x + sin ( x ) ) ( e x + cos ( x ) ) =
= 2 ( 3 x 2 + 4 x + 1 ) 4 ( e x + sin ( x ) ) ( 5 ( 3 x + 2 ) ( e x + sin ( x ) ) + ( 3 x 2 + 4 x + 1 ) ( e x + cos ( x ) ) ) ={2}{{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}}^{{4}}{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}{\left({5}{\left({3}{x}+{2}\right)}{\left({{e}}^{{x}}+{\sin{{\left({x}\right)}}}\right)}+{\left({3}{{x}}^{{2}}+{4}{x}+{1}\right)}{\left({{e}}^{{x}}+{\cos{{\left({x}\right)}}}\right)}\right)} = 2 ( 3 x 2 + 4 x + 1 ) 4 ( e x + sin ( x ) ) ( 5 ( 3 x + 2 ) ( e x + sin ( x ) ) + ( 3 x 2 + 4 x + 1 ) ( e x + cos ( x ) ) ) .
Now, let's see how to use the chain rule more than once.
Example 6 . Differentiate f ( t ) = e cos ( 2 t ) {f{{\left({t}\right)}}}={{e}}^{{{\cos{{\left({2}{t}\right)}}}}} f ( t ) = e c o s ( 2 t ) .
We apply the chain rule twice.
f ′ ( t ) = ( e cos ( 2 t ) ) ′ = e cos ( 2 t ) ⋅ ( cos ( 2 t ) ) ′ = e cos ( 2 t ) ⋅ ( − sin ( 2 t ) ) ⋅ ( 2 t ) ′ = {f{'}}{\left({t}\right)}={\left({{e}}^{{{\cos{{\left({2}{t}\right)}}}}}\right)}'={{e}}^{{{\cos{{\left({2}{t}\right)}}}}}\cdot{\left({\cos{{\left({2}{t}\right)}}}\right)}'={{e}}^{{{\cos{{\left({2}{t}\right)}}}}}\cdot{\left(-{\sin{{\left({2}{t}\right)}}}\right)}\cdot{\left({2}{t}\right)}'= f ′ ( t ) = ( e c o s ( 2 t ) ) ′ = e c o s ( 2 t ) ⋅ ( cos ( 2 t ) ) ′ = e c o s ( 2 t ) ⋅ ( − sin ( 2 t ) ) ⋅ ( 2 t ) ′ =
= − 2 sin ( 2 t ) e cos ( 2 t ) =-{2}{\sin{{\left({2}{t}\right)}}}{{e}}^{{{\cos{{\left({2}{t}\right)}}}}} = − 2 sin ( 2 t ) e c o s ( 2 t ) .
And our final example.
Example 7 . Differentiate f ( x ) = cos ( sin ( tan ( x ) ) ) {f{{\left({x}\right)}}}={\cos{{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}}} f ( x ) = cos ( sin ( tan ( x ) ) ) .
Here we apply the chain rule twice again.
f ′ ( x ) = ( cos ( sin ( tan ( x ) ) ) ) ′ = − sin ( sin ( tan ( x ) ) ) ⋅ ( sin ( tan ( x ) ) ) ′ = {f{'}}{\left({x}\right)}={\left({\cos{{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}}}\right)}'=-{\sin{{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}}}\cdot{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}'= f ′ ( x ) = ( cos ( sin ( tan ( x ) ) ) ) ′ = − sin ( sin ( tan ( x ) ) ) ⋅ ( sin ( tan ( x ) ) ) ′ =
= − sin ( sin ( tan ( x ) ) ) ⋅ ( cos ( tan ( x ) ) ) ⋅ ( tan ( x ) ) ′ = =-{\sin{{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}}}\cdot{\left({\cos{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}\cdot{\left({\tan{{\left({x}\right)}}}\right)}'= = − sin ( sin ( tan ( x ) ) ) ⋅ ( cos ( tan ( x ) ) ) ⋅ ( tan ( x ) ) ′ =
= − sec 2 ( x ) cos ( tan ( x ) ) sin ( sin ( tan ( x ) ) ) =-{{\sec}}^{{2}}{\left({x}\right)}{\cos{{\left({\tan{{\left({x}\right)}}}\right)}}}{\sin{{\left({\sin{{\left({\tan{{\left({x}\right)}}}\right)}}}\right)}}} = − sec 2 ( x ) cos ( tan ( x ) ) sin ( sin ( tan ( x ) ) ) .
In general, we can apply the chain rule even more than two times. We should use it as many times as we need.