Search This Blog

Chain Rule - Solved Examples

Example 1

Differentiate the following function by the help of the chain rule:
f(x) = sin(cos(x))

Solution:

Step 1: Identify the inner and outer functions
  • Inner function is cos(x)
  • Outer function is sin(cos(x))
Step 2: Differentiate the inner and outer functions separately
Inner function:
d/dx cos(x) = -sin(x)
Outer function:
Substitute a single variable in place of the inner function. Let u = cos(x), then
sin(cos(x)) = sin(u)
Differentiate the outer function with respect to the variable taken, u
d/dx sin(u) = cos(u)
Substitute back u = cos(x)
d/dx sin(u) = cos(cos(x))
Step 3: Multiply the derivatives of the inner and outer functions to get the derivative
f`(x) = -sin(x) * cos(cos(x)) = -sin(x)cos(cos(x))

The derivative of sin(cos(x)) is -sin(x)cos(cos(x))

Example 2

Differentiate the following function with the help of the chain rule:
f(x) = 2sin(x)

Solution:

Identify the inner and outer functions. Here the inner function is sin(x) and outer function is an exponential function 2sin(x). But we have a formula to differentiate the exponential functions, and it works only when there is a single variable in the exponent of a constant, so we will try to get a single variable instead of sin(x).

Substituting u = sin(x) we get 2u. Now applying the chain rule formula:

d/dx f(g(x)) = d/du f(u) * d/dx u ... where u = g(x)

d/dx 2sin(x) = d/du 2u * d/dx u ... where u = sin(x)

Applying the derivative formula for exponential functions, derivative of 2u =  2u

d/dx 2sin(x) = 2u * d/dx u ... where u = sin(x)

Substituting u = sin(x),

d/dx 2sin(x) = 2sin(x) * d/dx sin(x)

The cosine function is the derivative of the sine function,

d/dx 2sin(x) = 2sin(x) * cos(x)

Therefore the derivative of  f(x) = 2sin(x) is f `(x) = 2sin(x) * cos(x)

An other, simpler way of doing the above steps without remembering the formula is to differentiate the inner and outer functions separately and then multiply their derivatives:
  • Derivative of inner function, d/dx sin(x) = cos(x)
  • Derivative of outer function, d/dx 2u = 2u
  • Product of the two derivatives: 2u * cos(x)
  • Substitute back u = sin(x), 2sin(x) * cos(x)

Example 3

Differentiate the following function with the help of the chain rule:
f(x) = (x2 + 4x)4

Solution:

Method 1:
Identify the inner and outer functions.
  • Inner function: x2 + 4x
  • Outer function: (x2 + 4x)4
Substitute u = inner function so you get
Outer function: u4
Take the derivative of the inner and outer functions separately
  • Inner function: d/dx (x2 + 4x) = 2x + 4
  • Outer function: d/du u4 = 4u3
Multiply the two derivatives and substitute back the inner function for u
f `(x) = (2x + 4) * 4u3
f `(x) = (2x + 4) * 4(x2 + 4x)3
That is the derivative

Method 2:
After substituting u for the inner function, apply the chain rule formula:
d/dx f(g(x)) = d/du f(u) * d/dx g(x) where u = g(x)
d/dx (x2 + 4x)4 = d/du u4 * d/dx (x2 + 4x)
Apply the differentiation formulas and substitute the inner function back for u,
f `(x) = 4u3 * (2x + 4) 
f `(x) = 4(x2 + 4x)3 * (2x + 4)

Example 4

Differentiate the following function by the help of the chain rule:
f(x) = ln(2x2 + 3x + 1) 

Solution: 

Method 1:
Identify the inner and outer function:
  • Inner function:  2x2 + 3x + 1
  • Outer function: ln(2x2 + 3x + 1)
Substitute u for the inner function to get a single variable inside the outer function:
ln(2x2 + 3x + 1) = ln(u), u = 2x2 + 3x + 1
Differentiate the inner and outer functions separately:

  • Inner function:  d/dx (2x2 + 3x + 1) = 4x + 3
  • Outer function: d/du ln(u) = 1/u
Substitute back the inner function for u
1/u = 1/(2x2 + 3x + 1)
Multiply the two derivatives to get the derivative of f(x),
f `(x) = (4x + 3) * 1/(2x2 + 3x + 1)
Simplify the expression as much as possible
f `(x) = (4x + 3)/(2x2 + 3x + 1) 
Therefore the derivative of ln(2x2 + 3x + 1) is (4x + 3)/(2x2 + 3x + 1).

Method 2:
Identify the inner and outer functions. The inner function is (2x2 + 3x + 1) and the outer one is the logarithmic function. Substitute u = inner function so you get the following. Remember that 'u' is not variable but a function, that is the inner function.
log(2x2 + 3x + 1) = log(u)
Applying the chain rule formula,
d/dx f(g(x)) = d/du f(u) * d/dx g(x) where u = g(x)
d/dx log(2x2 + 3x + 1) = d/du log(u) * d/dx (2x2 + 3x + 1)
Compute the derivatives,
1/u * (4x + 3)
Substitute back the inner function for u,
1/(2x2 + 3x + 1)  * (4x + 3)
Simplify,
(4x + 3)/(2x2 + 3x + 1).

Example 5

Differentiate the following function with the help of the chain rule:
f(x) = √x2 + 4x - 3

Solution:

Identify the inner and outer functions:
  • Inner function: x2 + 4x - 3
  • Outer function:  √x2 + 4x - 3
Substitute u = inner function in the outer function,
x2 + 4x - 3 = √u
Differentiate the inner and outer functions separately,
  • Inner function: d/dx x2 + 4x - 3 = 2x + 4
  • Outer function: d/du √u = d/du u1/2 = 1/2 u-1/2
Multiply the two derivatives and substitute the inner function back for u,
(2x + 4) * (1/2 u-1/2) = (2x + 4) * (1/2(x2 + 4x - 3)-1/2)
Simplify the expression,
(2x + 4)/(2√x2 + 4x - 3 ) 
Therefore the derivative of √x2 + 4x - 3 is (2x + 4)/(2√x2 + 4x - 3 )

Example 6

Differentiate the following function with the help of the chain rule.
f(x) = sin(cos(tan(x)))

Solution:

Identify the inner and outer functions.
  • Inner function: cos(tan(x)) 
  • Outer function: sin(cos(tan(x))) 
Substitute u for the inner function
  • Inner function: u = cos(tan(x)) 
  • Outer function: sin(u) 
Apply the chain rule formula,
d/dx f(g(x)) = d/du f(u) * d/dx g(x) ... where u = g(x),
d/dx sin(cos(tan(x))) = d/du sin(u) * d/dx cos(tan(x))
Derivative of sin(u) is cos(u),
 = cos(u) * d/dx cos(tan(x))
Substitute back u = cos(tan(x)),
 = cos(cos(tan(x))) * d/dx cos(tan(x))
Use chain rule again on the second derivative because it is a composition of two functions. Identify the inner and outer functions,
  • Inner function: tan(x) 
  • Outer function: cos(tan(x)) 
Substitute u for the inner function
  • Inner function: u = tan(x) 
  • Outer function: cos(u) 
Apply the chain rule formula,
d/dx f(g(x)) = d/du f(u) * d/dx g(x) ... where u = g(x), 
d/dx cos(tan(x)) = d/du cos(u) * d/dx tan(x)
Derivative of cos(u) is -sin(u) and that of tan(x) is sec2(x)
 = -sin(u) * sec2(x)
Substitute back u = tan(x),
 = -sin(tan(x)) * sec2(x)
Substitute this derivative of cos(tan(x)) in the derivative obtained after the first application of the chain rule,
 = cos(cos(tan(x))) * d/dx cos(tan(x)) 
 = cos(cos(tan(x))) * -sin(tan(x)) * sec2(x)
Simplify the expression,
 = -sin(tan(x)) cos(cos(tan(x))) sec2(x)

No comments:

Post a Comment