Calculus/Chain Rule

From testwiki
Revision as of 17:36, 5 June 2024 by imported>ShakespeareFan00 (Reinstate previous repair)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Calculus/Top Nav

The chain rule is a method to compute the derivative of the functional composition of two or more functions.

If a function f depends on a variable u , which in turn depends on another variable x , that is f=y(u(x)) , then the rate of change of f with respect to x can be computed as the rate of change of y with respect to u multiplied by the rate of change of u with respect to x .

Chain Rule

If a function f is composed to two differentiable functions y(x) and u(x) , so that f(x)=y(u(x)) , then f(x) is differentiable and,

dfdx=dydududx

The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another. [1] For example, if f is a function of g which is in turn a function of h , which is in turn a function of x , that is

f(g(h(x)))

the derivative of f with respect to x is given by

dfdx=dfdgdgdhdhdx and so on.

A useful mnemonic is to think of the differentials as individual entities that can be canceled algebraically, such as

dfdx=dfdgdgdhdhdx

However, keep in mind that this trick comes about through a clever choice of notation rather than through actual algebraic cancellation.

The chain rule has broad applications in physics, chemistry, and engineering, as well as being used to study related rates in many disciplines. The chain rule can also be generalized to multiple variables in cases where the nested functions depend on more than one variable.

Examples

Example I

Suppose that a mountain climber ascends at a rate of 0.5kmh . The temperature is lower at higher elevations; suppose the rate by which it decreases is 6C per kilometer. To calculate the decrease in air temperature per hour that the climber experiences, one multiplies 6Ckm by 0.5kmh , to obtain 3Ch . This calculation is a typical chain rule application.

Example II

Consider the function f(x)=(x2+1)3 . It follows from the chain rule that

f(x)=(x2+1)3 Function to differentiate
u(x)=x2+1 Define u(x) as inside function
f(x)=u(x)3 Express f(x) in terms of u(x)
dfdx=dfdududx Express chain rule applicable here
dfdx=dduu3ddx(x2+1) Substitute in f(u) and u(x)
dfdx=3u22x Compute derivatives with power rule
dfdx=3(x2+1)22x Substitute u(x) back in terms of x
dfdx=6x(x2+1)2 Simplify.

Example III

In order to differentiate the trigonometric function

f(x)=sin(x2)

one can write:

f(x)=sin(x2) Function to differentiate
u(x)=x2 Define u(x) as inside function
f(x)=sin(u) Express f(x) in terms of u(x)
dfdx=dfdududx Express chain rule applicable here
dfdx=ddusin(u)ddx(x2) Substitute in f(u) and u(x)
dfdx=cos(u)2x Evaluate derivatives
dfdx=cos(x2)2x Substitute u in terms of x .

Example IV: absolute value

The chain rule can be used to differentiate |x| , the absolute value function:

f(x)=|x| Function to differentiate
f(x)=x2 Equivalent function
u(x)=x2 Define u(x) as inside function
f(x)=u(x)12 Express f(x) in terms of u(x)
dfdx=dfdududx Express chain rule applicable here
dfdx=dduu12ddx(x2) Substitute in f(u) and u(x)
dfdx=u1222x Compute derivatives with power rule
dfdx=(x2)1222x Substitute u(x) back in terms of x
dfdx=xx2 Simplify
dfdx=x|x| Express x2 as absolute value.

Example V: three nested functions

The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another. For example, if f(g(h(x)))=esin(x2) , sequential application of the chain rule yields the derivative as follows (we make use of the fact that ddxex=ex , which will be proved in a later section):

f(x)=esin(x2)=eg Original (outermost) function
h(x)=x2 Define h(x) as innermost function
g(x)=sin(h)=sin(x2) g(h)=sin(h) as middle function
dfdx=dfdgdgdhdhdx Express chain rule applicable here
dfdg=eg=esin(x2) Differentiate f(g)[2]
dgdh=cos(h)=cos(x2) Differentiate g(h)
dhdx=2x Differentiate h(x)
ddxesin(x2)=esin(x2)cos(x2)2x Substitute into chain rule.

Chain Rule in Physics

Because one physical quantity often depends on another, which, in turn depends on others, the chain rule has broad applications in physics. This section presents examples of the chain rule in kinematics and simple harmonic motion. The chain rule is also useful in electromagnetic induction.

Physics Example I: relative kinematics of two vehicles

One vehicle is headed north and currently located at (0,3) ; the other vehicle is headed west and currently located at (4,0) . The chain rule can be used to find whether they are getting closer or further apart.

For example, one can consider the kinematics problem where one vehicle is heading west toward an intersection at 80mph while another is heading north away from the intersection at 60mph. One can ask whether the vehicles are getting closer or further apart and at what rate at the moment when the northbound vehicle is 3 miles north of the intersection and the westbound vehicle is 4 miles east of the intersection.

Big idea: use chain rule to compute rate of change of distance between two vehicles.

Plan
  1. Choose coordinate system
  2. Identify variables
  3. Draw picture
  4. Big idea: use chain rule to compute rate of change of distance between two vehicles
  5. Express c in terms of x and y via Pythagorean theorem
  6. Express dcdt using chain rule in terms of dxdt and dydt
  7. Substitute in x,y,dxdt,dydt
  8. Simplify.

Choose coordinate system: Let the y-axis point north and the x-axis point east.

Identify variables: Define y(t) to be the distance of the vehicle heading north from the origin and x(t) to be the distance of the vehicle heading west from the origin.

Express c in terms of x and y via Pythagorean theorem:

c=(x2+y2)12

Express dcdt using chain rule in terms of dxdt and dydt :

dcdt=ddt(x2+y2)12 Apply derivative operator to entire function
=(x2+y2)122ddt(x2+y2) Sum of squares is inside function
=(x2+y2)122[ddt(x2)+ddt(y2)] Distribute differentiation operator
=(x2+y2)122[2xdxdt+2ydydt] Apply chain rule to x(t) and y(t)
=xdxdt+ydydtx2+y2 Simplify.


Substitute in x=4 mi , y=3 mi , dxdt=80 mih , dydt=60 mih and simplify

dcdt =4 mi(80 mih)+3 mi(60 mih)(4 mi)2+(3 mi)2
=320 mi2h+180 mi2h25 mi
=140 mi2h5 mi
=28 mih

Consequently, the two vehicles are getting closer together at a rate of =28 mih .

Physics Example II: harmonic oscillator

An undamped spring-mass system is a simple harmonic oscillator.

If the displacement of a simple harmonic oscillator from equilibrium is given by x , and it is released from its maximum displacement A at time t=0 , then the position at later times is given by

x(t)=Acos(ωt)

where ω=2πT is the angular frequency and T is the period of oscillation. The velocity, v , being the first time derivative of the position can be computed with the chain rule:

v(t)=dxdt Definition of velocity in one dimension
=ddtAcos(ωt) Substitute x(t)
=Addtcos(ωt) Bring constant A outside of derivative
=A(sin(ωt))ddt(ωt) Differentiate outside function (cosine)
=Asin(ωt)ddt(ωt) Bring negative sign in front
=Asin(ωt)ω Evaluate remaining derivative
v(t)=ωAsin(ωt) Simplify.

The acceleration is then the second time derivative of position, or simply dvdt .

a(t)=dvdt Definition of acceleration in one dimension
=ddt(ωAsin(ωt)) Substitute v(t)
=ωAddtsin(ωt) Bring constant term outside of derivative
=ωAcos(ωt)ddt(ωt) Differentiate outside function (sine)
=ωAcos(ωt)ω Evaluate remaining derivative
a(t)=ω2Acos(ωt) Simplify.

From Newton's second law, F=ma , where F is the net force and m is the object's mass.

F=ma Newton's second law
=m(ω2Acos(ωt)) Substitute a(t)
=mω2Acos(ωt) Simplify
F=mω2x(t) Substitute original x(t) .

Thus it can be seen that these results are consistent with the observation that the force on a simple harmonic oscillator is a negative constant times the displacement.

Chain Rule in Chemistry

The chain rule has many applications in Chemistry because many equations in Chemistry describe how one physical quantity depends on another, which in turn depends on another. For example, the ideal gas law describes the relationship between pressure, volume, temperature, and number of moles, all of which can also depend on time.

Chemistry Example I: Ideal Gas Law

Isotherms of an ideal gas. The curved lines represent the relationship between pressure and volume for an ideal gas at different temperatures: lines which are further away from the origin (that is, lines that are nearer to the top right-hand corner of the diagram) represent higher temperatures.

Suppose a sample of n moles of an ideal gas is held in an isothermal (constant temperature, T) chamber with initial volume V0 . The ideal gas is compressed by a piston so that its volume changes at a constant rate so that V(t)=V0kt , where t is the time. The chain rule can be employed to find the time rate of change of the pressure.[3] The ideal gas law can be solved for the pressure, P to give:

P(t)=nRTV(t)

where P(t) and V(t) have been written as explicit functions of time and the other symbols are constant. Differentiating both sides yields

dP(t)dt=nRTddt(1V(t))

where the constant terms n,R,T have been moved to the left of the derivative operator. Applying the chain rule gives

dPdt=nRTddV(1V(t))dVdt=nRT(1V2)dVdt

where the power rule has been used to differentiate 1V , Since V(t)=V0kt , dVdt=k . Substituting in for V and dVdt yields dPdt .

dPdt=nRTk(V0kt)2

Chemistry Example II: Kinetic Theory of Gases

The temperature of an ideal monatomic gas is a measure of the average kinetic energy of its atoms. The size of helium atoms relative to their spacing is shown to scale under 1950 atmospheres of pressure. The atoms have a certain, average speed, slowed down here two trillion fold from room temperature.

A second application of the chain rule in Chemistry is finding the rate of change of the average molecular speed, v , in an ideal gas as the absolute temperature T , increases at a constant rate so that T=T0+at , where T0 is the initial temperature and t is the time.[3] The kinetic theory of gases relates the root mean square of the molecular speed to the temperature, so that if v(t) and T(t) are functions of time,

v(t)=3RT(t)M

where R is the ideal gas constant, and M is the molecular weight.

Differentiating both sides with respect to time yields:

ddtv(t)=ddt(3RT(t)M)

Using the chain rule to express the right side in terms of the with respect to temperature, T , and time, t , respectively gives

dvdt=ddT(3RTM)dTdt

Evaluating the derivative with respect to temperature, T , yields

dvdt=12M3RTddT(3RTM)dTdt

Evaluating the remaining derivative with respect to T , taking the reciprocal of the negative power, and substituting T=T0+at , produces

dvdt=12M3R(T0+at)3RMddt(T0+at)

Evaluating the derivative with respect to t yields

dvdt=12M3R(T0+at)3RMa

which simplifies to

dvdt=a23RM(T0+at)

Proof of the chain rule

Suppose y is a function of u which is a function of x (it is assumed that y is differentiable at u and x , and u is differentiable at x . To prove the chain rule we use the definition of the derivative.

dydx=limΔx0ΔyΔx

We now multiply ΔyΔx by ΔuΔu and perform some algebraic manipulation.

limΔx0ΔyΔx=limΔx0ΔyΔuΔuΔx=limΔx0ΔyΔulimΔx0ΔuΔx=limΔx0ΔyΔududx

Note that as Δx approaches 0 , Δu also approaches 0 . So taking the limit as of a function as Δx approaches 0 is the same as taking its limit as Δu approaches 0 . Thus

limΔx0ΔyΔu=limΔu0ΔyΔu=dydu

So we have

dydx=dydududx

Exercises

Template:Question-answer

Template:Question-answer Solutions

References

Template:Reflist

Template:Calculus/Top Nav Template:Calculus/TOC

  1. http://www.math.brown.edu/help/derivtips.html
  2. The derivative of ex is ex ; see [[../Derivatives of Exponential and Logarithm Functions]].
  3. 3.0 3.1 University of British Columbia, UBC Calculus Online Course Notes, Applications of the Chain Rule, http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/derivative/chainap.html Accessed 11/15/2010.