Tutorials › Calculus III › Related Rates with Multiple Changing Inputs

Chain Rule and Implicit Differentiation · Tutorial 371 of 999

Related Rates with Multiple Changing Inputs

Apply the chain and product rules to models with several time-varying inputs, and solve the resulting rate equation for an unknown instantaneous rate.

Intermediate 9 min read

What You'll Learn

  • Distinguish changing quantities from fixed constants in a model
  • Differentiate a relation with several time-dependent inputs
  • Apply the product rule to the ideal gas law
  • Substitute instantaneous values and known rates after differentiating
  • Isolate an unknown rate and verify it in the differentiated equation
  • Recognize when the rate equation cannot determine a unique rate

When Several Quantities Change

In a related-rates problem, the quantities in a model vary as time passes. Often, more than one input changes, so the rate of an output depends on several rates at once. A useful example is the ideal gas law: pressure, volume, amount of gas, and temperature may all vary during a process.

The key is to regard each changing quantity as a function of time, differentiate the relationship with respect to time, and only then substitute the instantaneous values and rates. This keeps the contribution from each changing input visible and makes it possible to isolate a rate that is not given.

Definition: A related rate is the derivative with respect to time of a quantity that is connected to other changing quantities by a mathematical relationship. If \(x=x(t)\), its rate is \(x'(t)=\frac{dx}{dt}\).

In what follows, a quantity written without an explicit \(t\), such as \(P\), denotes its value at the instant being considered; \(P'\) denotes its instantaneous rate of change. A fixed constant has derivative zero. In particular, the gas constant \(R\) in the ideal gas law is treated as fixed.

The General Rate Equation

Suppose quantities \(x_1,\ldots,x_k\) depend on time and satisfy a differentiable relation \(F(x_1,\ldots,x_k)=0\). The chain rule gives the rate equation along their changing values:

$$ \frac{d}{dt}F(x_1(t),\ldots,x_k(t)) = \sum_{j=1}^{k} \frac{\partial F}{\partial x_j}x_j'(t) =0. $$

Each changing input contributes its partial derivative multiplied by its own rate. If the relation is instead written as \(Q=f(x_1,\ldots,x_k)\), then \(Q\) may also change, and its rate is the corresponding sum of these contributions. These are applications of the multivariable chain rule; the task in a related-rates calculation is to apply it to the model and solve the resulting equation.

Method: Write the model with all changing quantities identified, differentiate the entire relationship with respect to time, substitute the instantaneous values and known rates, and solve for the unknown rate. Substitution comes after differentiation because the quantities are functions of time before the instant is evaluated.

Worked Example: Solving for the Temperature Rate

Worked Example: Solving for the Temperature Rate

The ideal gas law is \(PV=nRT\), where \(P,V,n,T\) vary with time and \(R\) is constant. At an instant, suppose \(P=2\), \(V=3\), \(n=1\), \(T=3\), and \(R=2\). The known rates are \(P'=0.2\), \(V'=-0.1\), and \(n'=0.05\). Find \(T'\).

First differentiate both sides with respect to time. On the left, both factors vary, so use the product rule. On the right, \(R\) is fixed, but both \(n\) and \(T\) vary:

$$ P'V+PV'=R(n'T+nT'). $$

Substitute the given values, leaving \(T'\) unknown:

$$ (0.2)(3)+(2)(-0.1) = 2\big((0.05)(3)+(1)T'\big). $$

Evaluate each known product:

$$ 0.6-0.2=2(0.15+T'), \qquad 0.4=0.3+2T'. $$

Subtract \(0.3\) from both sides and divide by \(2\):

$$ 0.1=2T', \qquad T'=0.05. $$

Check by substituting this rate into the differentiated equation. The left side is \(0.6-0.2=0.4\); the right side is \(2(0.15+0.05)=2(0.20)=0.4\). The two sides agree, so the rate satisfies the equation.

Why Differentiating Captures All the Changes

The rate equation is not an additional physical assumption. It follows because the original relationship remains true as time changes. For the gas law, define \(G(t)=P(t)V(t)-n(t)RT(t)\). If the gas-law relation holds throughout the process, then \(G(t)=0\) throughout, so \(G'(t)=0\).

Differentiate each term. The product rule applies to \(P(t)V(t)\) and \(n(t)T(t)\); the constant \(R\) remains a factor. Thus:

$$ G'(t) = P'(t)V(t)+P(t)V'(t) -R\big(n'(t)T(t)+n(t)T'(t)\big) =0. $$

Rearranging gives exactly the rate equation used above. Each term appears because the corresponding factor can change; treating one changing factor as fixed would omit its contribution. The same reasoning works for any differentiable constraint: differentiate the constraint along the time-dependent quantities, and its derivative must remain zero.

Key result: If \(P,V,n,T\) vary with time and satisfy \(PV=nRT\), with \(R\) constant, then $$ P'V+PV'=R(n'T+nT'). $$ Each product contributes the rate of its first factor times its second factor, plus its first factor times the rate of its second factor.

Worked Example: Solving for the Pressure Rate

Worked Example: Solving for the Pressure Rate

Suppose \(P=3\), \(V=4\), \(n=2\), \(T=4\), and \(R=1.5\) at an instant. Let \(V'=0.2\), \(n'=-0.1\), and \(T'=0.3\). Find \(P'\).

Differentiate \(PV=nRT\) before substituting:

$$ P'V+PV'=R(n'T+nT'). $$

Insert the instantaneous values and rates:

$$ 4P'+(3)(0.2) = 1.5\big((-0.1)(4)+(2)(0.3)\big). $$

Calculate the known terms on the right:

$$ 4P'+0.6 = 1.5(-0.4+0.6) = 1.5(0.2) = 0.3. $$

Subtract \(0.6\) and divide by \(4\):

$$ 4P'=-0.3, \qquad P'=-0.075. $$

To check, the left side of the rate equation is \(4(-0.075)+(3)(0.2)=-0.3+0.6=0.3\). The right side is \(1.5((-0.1)(4)+(2)(0.3))=1.5(0.2)=0.3\). The rate equation is satisfied.

Worked Example: A Constraint with Three Changing Inputs

Worked Example: Finding an Unknown Rate in an Implicit Model

Suppose three changing quantities satisfy \(xy^2+z^2=13\). At an instant, \(x=1\), \(y=2\), and \(z=3\), with \(x'=2\) and \(y'=1\). Find \(z'\).

The stated values satisfy the constraint because \((1)(2^2)+3^2=4+9=13\). Differentiate the constraint with respect to time. The term \(xy^2\) has two changing factors, so the product and chain rules give \(x'y^2+2xyy'\); the derivative of \(z^2\) is \(2zz'\):

$$ x'y^2+2xyy'+2zz'=0. $$

Substitute the values and known rates:

$$ (2)(2^2)+2(1)(2)(1)+2(3)z'=0. $$

Evaluate the known terms:

$$ 8+4+6z'=0, \qquad 6z'=-12, \qquad z'=-2. $$

Check in the differentiated constraint: \(8+4+6(-2)=12-12=0\), as required. Thus the unknown rate is \(-2\) at this instant.

Isolating a Rate and Knowing When It Is Possible

After differentiation and substitution, a related-rates problem usually becomes a linear equation in the unknown rate. In the gas-law examples, the coefficient of \(T'\) is \(Rn\), and the coefficient of \(P'\) is \(V\). If that coefficient is nonzero, ordinary algebra isolates the unknown. For example, solving for \(T'\) gives:

$$ T'=\frac{P'V+PV'-Rn'T}{Rn}, \qquad Rn\ne 0. $$

The condition \(Rn\ne 0\) matters: division by zero is not defined. If the coefficient of the unknown rate is zero, the differentiated equation may impose a condition on the known rates without determining the unknown. It may also be inconsistent with those rates. One must inspect the resulting equation rather than divide automatically.

In other models, the coefficient depends on the instantaneous values. For the constraint \(xy^2+z^2=13\), the coefficient of \(z'\) is \(2z\). When \(z=3\), it is nonzero and the rate is determined. If instead \(z=0\), this equation at that instant would have no \(z'\) term; it would not determine \(z'\) from that differentiated constraint alone.

A Common Mistake: Substituting Before Differentiating

A tempting but incorrect approach is to put all instantaneous values into the model first and then differentiate the resulting numerical equality. In the first gas-law example, substituting the values into \(PV=nRT\) gives \(6=6\), a true numerical statement. But this equation contains no time-varying quantities left to differentiate, so it gives no information about \(T'\).

The values describe one instant; they do not replace the functions that change over time. The correct order is to differentiate while the quantities are still functions, then evaluate the resulting rate equation at the instant. For example, differentiating first produces \(P'V+PV'=R(n'T+nT')\), which contains the rates needed to solve the problem.

Takeaway: First differentiate the full relationship. Then substitute the instantaneous values and known rates. Finally, solve for the unknown rate and check it in the differentiated equation.

Why Multiple-Input Rates Matter

Many models connect quantities that change together. In the ideal gas law, pressure can respond to changing volume, amount of gas, and temperature. In a geometric constraint, the rate of one coordinate can depend on the rates of several others. A single-variable calculation that overlooks any changing input generally produces an incomplete rate equation.

Writing each changing quantity as a function of time makes the dependence explicit. Differentiating the whole relationship accounts for every contribution, while the given instantaneous data turn the resulting expression into an equation that can be solved. The final check confirms that the proposed rate satisfies the differentiated model at that instant.

Check Your Understanding

Try each question by identifying which quantities vary, differentiating before substituting, and checking the resulting rate equation.

  1. If \(PV=nRT\) and \(R\) is constant, write the differentiated equation when all four quantities \(P,V,n,T\) vary with time.
  2. In \(PV=nRT\), which coefficient must be nonzero to solve the differentiated equation for \(T'\)?
  3. For \(xy+z=10\), where \(x,y,z\) all vary with time, write the equation that relates \(x',y',z'\).
  4. Why does substituting all instantaneous values into a model before differentiating fail to determine an unknown rate?
  5. What should be checked after solving for an unknown rate?