## Section5.2Related Rates

As we have seen, $$\frac{dy}{dx}$$ is the instantaneous rate of change of $$y$$ with respect to $$x\text{.}$$ In [cross-reference to target(s) "chap-4-SymbolicDIfferentiation" missing or not unique] we learned techniques for finding $$\frac{dy}{dx}$$ when $$y$$ is defined as a function of $$x\text{.}$$ In the last section we learned how to use implicit differentiation to find $$\frac{dy}{dx}$$ when we were given an equation in $$x$$ and $$y\text{.}$$ In this section we want find $$\frac{dy}{dx}$$ when $$x$$ and $$y$$ are both described in terms of another variable. As with the section on related rates, we will start with an example where we can solve the problem by eliminating the extra variable before differentiating, and then look at how to solve with related rates.

### Example5.2.1.Change in revenue with respect to expense, doable two ways.

We can buy widgets for $10. The demand price of widgets is$20 minus 0.1 times the quantity to be sold. Find the derivative of revenue with respect to expense.

Solution 1. Solution A

The revenue and cost functions for widgets depend on the quantity $$q\text{.}$$ The formulas for revenue and cost are:

\begin{align*} \revenue\amp =q(20-0.1q)=20q-0.1q^2\\ \cost\amp =10q\text{.} \end{align*}

We can solve the second equation for quantity and substitute back into the first equation. This now gives us the revenue function in terms of cost ($$c$$).

\begin{align*} \quantity \amp =0.1*c\\ \revenue \amp =2c-0.001 c^2\text{.} \end{align*}

It is straightforward to take the derivative:

\begin{equation*} \frac{d\revenue}{d\cost}=2-0.002*\cost\text{.} \end{equation*}

Note that the derivative is positive for cost between $0 and$1000. This implies that the revenue is rising until the cost is $1000. After we hit a cost of$1000, the derivative becomes negative. This indicates that the revenue will actually decrease.

Solution 2. Solution B

The alternative method is to differentiate the equations for revenue ($$r$$) and cost ($$c$$) with respect to quantity ($$q$$), and find the two derivatives $$\frac{d r}{d q}$$ and $$\frac{d c}{d q}\text{,}$$ then treat them as fractions. The derivative we want is the quotient of these fractions.

The revenue and cost functions for widgets are the same as above.

\begin{align*} \revenue\amp =20q-0.1 q^2\\ \cost\amp =10q \end{align*}

We now differentiate:

\begin{align*} \frac{d r}{d q} \amp =20-0.2 q\\ \frac{d c}{d q}\amp =10 \end{align*}

We divide these derivatives to get the desired derivative.

\begin{equation*} \frac{\text{change in revenue}}{\text{change in cost}}: \frac{d r}{d c}=\frac{d r}{d q}/\frac{d c}{d q}=(20-0.2 q)/10\text{.} \end{equation*}

Substituting $$q =0.1 c$$ gives the same solution we had from the first method.

When using the method of related rates, we act as if the derivatives are fractions that we can multiply or divide to obtain the appropriate fraction. We want to use a bit of caution with that approach, because it does not work with higher order derivatives, or with derivatives of functions of several variables. However, for derivatives of one variable the intuition works. Once again, if we zoom in far enough, the curve will look like a straight line and the derivative is the quotient of rise over run.

For the first example we could use both methods. We either use algebra to eliminate the extra variable, or find two rates of change and combine them to find the rate we are interested in. For some problems we will only have one choice, either because the algebra is too hard, or because we have been given partial information and the algebraic method is impossible.

### Example5.2.2.Change in revenue with respect to expense, $$q$$ elimination hard.

The cost ($$c(q)$$) and revenue ($$r(q)$$) equations for gizmos are both given in terms of quantity ($$q$$)

\begin{align*} r(q)\amp =30q-0.1 q^2-0.001 q^3\\ c(q)\amp =500+10q-0.01 q^2 \end{align*}

Find the derivative of revenue with respect to cost (i.e. $$\frac{dr}{dc}$$ when $$q=50\text{.}$$

Solution.

Since the cost is quadratic in quantity, solving for revenue as a function of cost involves more work than we need for this problem. The appropriate derivatives are:

\begin{align*} \frac{d r}{d q} \amp =30-0.2 q-0.003 q^2\\ \frac{d c}{d q} \amp =10-0.02 q\text{.} \end{align*}

When $$q =50\text{,}$$ we have

\begin{align*} \frac{d r}{d q} \amp =30-0.2*50-0.003*50^2=12.5\\ \frac{d c}{d q}\amp =10-0.02*50=9\text{.} \end{align*}

We divide these derivatives to get the desired derivative.

\begin{equation*} \frac{d r}{d c} =\frac{d r}{d q}/\frac{d c}{d q}=\frac{12.5}{9}\approx 1.389\text{.} \end{equation*}

This means that when $$\quantity=50\text{,}$$ there is an increase of \$1.39 for every dollar increase in cost of investment.

### Example5.2.3.Change in revenue with respect to expense, long variable names.

We have the following cost and revenue information for whatchamacallits:

\begin{gather*} \revenue=50*\quantity-0.01*\quantity^2\\ \frac{d \cost}{d\quantity}=15\text{.} \end{gather*}

Find the derivative of revenue with respect to cost when $$\quantity=100\text{.}$$

Solution.

In this example we do not have a formula that lets us solve for revenue as a function of cost, so we must use the method of related rates. The other derivatives is:

\begin{equation*} \frac{d\revenue}{d\quantity} =50-0.02*\quantity\text{.} \end{equation*}

When $$\quantity=100\text{,}$$ we have $$\frac{d\revenue}{d\quantity} =50-0.02*100=48\text{.}$$ Thus

\begin{equation*} \frac{d\revenue}{d\cost} =\frac{d\revenue}{d\quantity}/\frac{d\cost}{d\quantity}=\frac{48}{15}=3.2\text{.} \end{equation*}

Related rates are also useful when we are looking at a two-step process and we are interested in the rate of the combined process.

### Example5.2.4.Composition of functions.

We are producing widgets ($$w$$). The manufacturing process turns goop ($$g$$) into sludge ($$s$$) and sludge into widgets. The yield equations in the appropriate units are:

\begin{equation*} \text{widgets(sludge)}=4*\text{sludge}-0.1*\text{sludge}^2\text{,} \end{equation*}

or in shorthand notation: $$w(s)=4 s-0.1 s^2\text{,}$$ and

\begin{equation*} \text{sludge(goop)}=3*\text{goop}+.1*\text{goop}^2\text{,} \end{equation*}

or in shorthand notation: $$s(g)=3 g+.1 g^2\text{.}$$

Find the derivative of widgets with respect to goop when $$g=10\text{.}$$

Solution.

We note that when $$g=10\text{,}$$ we have $$s=3*10+.1*10^2=40\text{.}$$ In this example we will take the derivatives of our equation. We will then multiply them to get the derivative we want.

\begin{align*} \frac{d\text{ widgets}}{d\text{ sludge}}\amp=\frac{dw}{ds}=4-0.02*s\\ \frac{d\text{ sludge}}{d\text{ goop}}\amp =\frac{ds}{dg}=3+.2*g\text{.} \end{align*}

When $$g=10\text{,}$$ $$\frac{d w}{d s} =(4-0.02*40)=3.2\text{,}$$ and $$\frac{d s}{d g}\text{.}$$ We need to multiply the derivatives to cancel the $$d s\text{.}$$

\begin{equation*} \frac{dw}{dg} =\frac{dw}{ds}*\frac{ds}{dg}=(3.2)(5)=16\text{.} \end{equation*}

Thus the rate of widget production is increasing by 16 units per increase in on unit of goop at that point.

We often run into situations where several quantities are related by some constraint or equation. In such situations we will want to know the rate at which quantities are changing with time. The technique of related rates gives us a way to move from one rate with respect to time to another. Recall the Cobb-Douglas equation from the last section:

\begin{equation*} Y=AL^\alpha K^\beta\text{,} \end{equation*}

where $$Y\text{,}$$ $$L\text{,}$$ and $$K$$ represent total production, labor, and capital, respectively. If we know the rate of investment in capital equipment, we will be interested in the rate of change of labor with respect to time. An interesting question is to ask for the rate of change of capital with respect to labor, or how increasing or reducing capital investment will raise or lower labor costs.

### Example5.2.5.Cobb-Douglas.

A gizmo manufacturer has a production function given by

\begin{equation*} Y=50L^{0.75} K^{0.25}\text{.} \end{equation*}

The manufacturer currently uses 16 units of labor and 81 units of capital. The total production is constant but the manufacturer is investing in automation. The derivative of capital with respect to time is 5. How fast is the amount of labor needed changing?

Solution.

We are gong to assume that both labor and capital are functions of time and the $$Y$$ is a constant. We start by implicitly differentiating our equation with respect to time.

\begin{align*} \frac{d}{dt}(Y\amp =50L^{0.75} K^{0.25})\\ 0\amp =50*(0.75*L^{-0.25}*\frac{dL}{dt}*K^{.25}+L^{.75}*.25*K^{-0.75}*\frac{dK}{dt})\text{.} \end{align*}

We now substitute in for the values of $$K\text{,}$$ $$L\text{,}$$ and $$\frac{dK}{dt}\text{,}$$ which were given.

\begin{align*} 0\amp =50*(0.75*16^{-0.25}*\frac{d\ L}{(d\ t}*81^{0.25}+16^{0.75}*.25*81^{-0.75}*2)\\ 0\amp =3/4*1/2*\frac{dL}{dt}*3+8*1/4*1/27*2\\ \frac{dL}{dt}\amp =-32/243\approx -0.1317\text{.} \end{align*}

If capital is increasing at a rate of 2 per unit of time, then labor is decreasing at a rate of $$-0.1317$$ per unit of time.

### Summary.

The related rates technique is an application of the chain rule. We use this technique when we have either three variables. We may want the rate of change of one variable with respect to a second, and those variables may be connected through equations using a third variable. We may also want to relate the rate of change of two variables with respect to time. We take advantage of the fact that we can think of a derivative as a fraction of two small values. We either want to multiply or divide theses fractions to obtain the desired derivative.

### ExercisesExercises: Related Rates Problems

#### 1.

Let $$y=3x+5$$ and $$z=4y+7\text{.}$$ Find $$\frac{dz}{dx}$$ when $$x=2$$ by solving for $$z$$ as a function of $$x$$ and taking the derivative, and also by finding $$\frac{dz}{dy}$$ and $$\frac{dy}{dx}$$ and using related rates to apply the chain rule.

Solution.
• \begin{align*} z\amp =4y+7= 4(3x+5)+7=12x+27\\ \frac{dz}{dx}\amp=12 \end{align*}
• \begin{align*} z\amp =4y+7 \amp y\amp =3x+5\\ \frac{dz}{dy}\amp =4 \amp \frac{dy}{dx}\amp =3\\ \frac{dz}{dx}\amp =\frac{dz}{dy} \amp \frac{dy}{dx}\amp =4*3=12 \end{align*}

#### 2.

Let $$y=x^2-3x+5$$ and $$z=y^2-y+6\text{.}$$ Find $$dz/dx$$ when $$x=1$$ by solving for $$z$$ as a function of $$x$$ and taking the derivative, and also by finding $$\frac{dz}{dy}$$ and $$\frac{dy}{dx}$$ and using related rates to apply the chain rule.

#### 3.

Let $$y=1000*1.06^x$$ and $$z=200y+3\text{.}$$ Find $$\frac{dz}{dx}$$ when $$x=5\text{.}$$

Solution.

First find the derivative

\begin{equation*} \frac{dz}{dx}=\frac{dz}{dy} \frac{dy}{dx}=(200) (1000*1.06^x \ln(1.06) )= 200,000 \ln(1.06) 1.06^x\text{.} \end{equation*}

Next plug in our value of $$x\text{:}$$

\begin{equation*} \text{When }x=5,\quad \frac{dz}{dx}= 200,000 \ln(1.06) 1.06^5\text{.} \end{equation*}

#### 4.

Let $$y=200*1.08^x+500x$$ and $$z=y^2+y\text{.}$$ Find $$\frac{dz}{dx}$$ when $$x= 3\text{.}$$

#### 5.

Let $$y=3x+5$$ and $$z=4x+7\text{.}$$ Find $$\frac{dz}{dy}$$ when $$x=2$$ by solving for $$z$$ as a function of $$y$$ and taking the derivative, and also by finding $$\frac{dz}{dx}$$ and$$\frac{dy}{dx}$$ and using related rates to apply the chain rule.

Solution.
• If $$y=3x+5$$ then $$x=\frac{y-5}{3}\text{.}$$ Hence $$z=4x+7=\frac{4}{3} (y-5)+7=\frac{4}{3} y+\frac{1}{3}\text{,}$$ so $$\frac{dz}{dy}=\frac{4}{3}\text{.}$$

• $$\displaystyle \frac{dz}{dx}=4, \quad \frac{dy}{dx}=3,\quad\frac{dz}{dy}= \frac{dz/dx}{dy/dx}=\frac{4}{3}$$

#### 6.

Let $$y=x^2-3x+5$$ and $$z=x^2+4x+5\text{.}$$ Find $$\frac{dz}{dy}$$ when $$x=3\text{.}$$

#### 7.

Let $$y=1000*1.05^x$$ and $$z=100*(1+.5x)\text{.}$$ Find $$\frac{dz}{dy}$$ when $$x=10\text{.}$$

Solution.

First find the derivative:

\begin{equation*} \frac{dz}{dy}= \frac{dz/dx}{dy/dx}=\frac{50}{1000*1.05^x*\ln(1.05)}\text{.} \end{equation*}

Next plug in our value of $$x\text{:}$$

\begin{equation*} \text{When }x=10, \frac{dz}{dy}=\frac{50}{1000*1.05^{10}*\ln(1.05)}\text{.} \end{equation*}

#### 8.

Let $$y=100*1.08^x$$ and $$z=100*1.02^x\text{.}$$ Find $$\frac{dz}{dy}$$ when x=10.

#### 9.

Let $$y=x^2-3x+5$$ and $$\frac{dz}{dy} =3\text{.}$$ Find $$\frac{dz}{dx}$$ when $$x=7\text{.}$$

Solution.

We want to find $$\frac{dz}{dx}\text{.}$$ We know $$\frac{dz}{dy}$$ and we can compute $$\frac{dy}{dx}\text{,}$$ hence we compute:

\begin{align*} \frac{dy}{dx}\amp =2x-3,\text{ hence at }x=7\text{ we have }\frac{dy}{dx}=11\\ \frac{dz}{dx}\amp=\frac{dz}{dy}\frac{dy}{dx}=(3)(11)=33 \end{align*}

#### 10.

Let $$y=500*.96^x$$ and $$\frac{dz}{dy}=5\text{.}$$ Find $$\frac{dz}{dx}$$ when $$x=4\text{.}$$

#### 11.

Let $$y=x^2-5x+7$$ and $$\frac{dz}{dx} =8\text{.}$$ Find $$\frac{dz}{dy}$$ when $$x=7\text{.}$$

Solution.

We want to find $$\frac{dz}{dy}\text{.}$$ We know $$\frac{dz}{dx}$$ and we can compute $$\frac{dy}{dx}\text{,}$$ hence we compute:

\begin{align*} \frac{dy}{dx}\amp =2x-5,\text{ hence at }x=7\text{ we have }\frac{dy}{dx}=9\\ \frac{dz}{dy}\amp =\frac{dz/dx}{dy/dx}=\frac{8}{9} \end{align*}

#### 12.

Let $$z=x^2-3x+5$$ and $$\frac{dy}{dx} =3\text{.}$$ Find dy/dz when x=7.

#### 13.

The revenue and expense equations for gizmos are

\begin{align*} \revenue\amp=30*\quantity-0.1*\quantity^2\\ \expense\amp =500+10*\quantity \end{align*}

Find the derivative of revenue with respect to expense when $$\quantity=100\text{.}$$

Solution.

If $$R= \revenue=30q-0.1q^2\text{,}$$ then $$\frac{dR}{dq}=30-0.2q\text{.}$$

If $$E= \expense=500+10q\text{,}$$ then $$\frac{dE}{dq}=10\text{.}$$

Combining the two rates we get

\begin{equation*} \frac{dR}{dE}=\frac{dR/dq}{dE/dq}=\frac{30-0.2q}{10}\text{.} \end{equation*}

Hence at $$q =100$$ we have that

\begin{equation*} \frac{dR}{dE}={30-0.2(100)}{10}=\frac{10}{10}=1\text{.} \end{equation*}

#### 14.

The revenue and expense equations for widgets are

\begin{align*} \revenue\amp =200*\quantity-0.1*\quantity^2+.005*\quantity^3\\ \expense\amp =1000+20*\quantity\text{.} \end{align*}

Find the derivative of revenue with respect to expense when $$\quantity=50\text{.}$$

#### 15.

The production of gadgets is a two step process:

\begin{align*} \text{productA}\amp =50*\text{RawMaterial}+.01*\text{RawMaterial}^2\\ \text{gadgets}\amp =4*\text{productA}-0.0001*\text{productA}^2\text{.} \end{align*}

Find the derivative of gadgets with respect to RawMaterial when $$\text{productA} =20\text{.}$$

Solution.

Let’s simplify the notation and write the two equations as

\begin{align*} p\amp =50r+0.01 r^2\\ g\amp =4 p-0.0001 p^2\text{.} \end{align*}

We want to find $$\frac{dg}{dr}$$ when $$p = 20\text{.}$$

What do we have?

\begin{align*} \frac{dp}{dr}\amp =50+0.02 r\\ \frac{dg}{dp}\amp =4 -0.0002 p\\ \text{Then }\frac{dp}{dr}r\amp =\frac{dg}{dp} \frac{dp}{dr}r=(4 -0.0002 p) (50+0.02 r)\text{.} \end{align*}

We know $$p = 20$$ (given), but we need $$r$$ to plug into the second part of the equation. The only function that tells us anything about $$r$$ is $$p=50r+0.01 r^2\text{.}$$ If $$p = 20$$ this means $$20=50r+0.01 r^2\text{.}$$ So $$0.01 r^2+50r-20=0\text{.}$$

By the quadratic equation we have $$r= \frac{-50\pm \sqrt{2500-4(0.01)(-20)}}{0.02}\text{.}$$

Using Wolfram Alpha we have that $$r = 0.4\text{.}$$ Then

\begin{equation*} \frac{dg}{dr}=(4 -0.004 ) (50+0.008 )\approx 199.83\frac{gadgets}{raw\ material}\text{.} \end{equation*}

#### 16.

The production of whatchamacallits is a three step process:

\begin{align*} \text{productA}\amp =10*\text{RawMaterial}-7\\ \text{productB}\amp=15*\text{productA}-20\\ \text{whatchamacallits}=6*\text{productB}-5\text{.} \end{align*}

Find the derivative of $$\text{whatchamacallits}$$ with respect to $$\text{RawMaterial}$$ when $$\text{productA} =15\text{.}$$

#### Exercise Group.

Find the indicated derivative for the production function.

##### 17.

Our production function is $$960=5L^{0.25} K^{0.75}\text{.}$$ Find $$\frac{dL}{dt}$$ if $$L=81\text{,}$$ $$K=256\text{,}$$ $$\frac{dK}{dt}=5\text{.}$$

Solution.

Take the derivative with respect to $$t\text{:}$$

\begin{align*} \frac{d}{dt} 960\amp =5 \frac{d}{dt}[L^{0.25} K^{0.75}]\\ 0\amp =5[\frac{d}{dt} (L{0.25}) K^{0.75}+L^{0.25} \frac{d}{dt} (K^{0.75}) ] \\ 0\amp =[0.25 L^{-0.75} \frac{dL}{dt} K^{0.75}+L^{0.25} 0.75K^(-0.25) \frac{dK}{dt}]\text{.} \end{align*}

Solve for $$\frac{dL}{dt}\text{:}$$

\begin{align*} 0.25 L^{-0.75} \frac{dL}{dt} K^{0.75}\amp =-L^{0.25} 0.75K^(-0.25) \frac{dK}{dt}\\ \frac{dL}{dt}\amp =\frac{-L^{0.25} 0.75K^(-0.25)}{ 0.25 L^{-0.75} K^{0.75}} \frac{dK}{dt}=-3\frac{L}{K}\frac{dK}{dt}\text{.} \end{align*}

If $$L=81\text{,}$$ $$K=256\text{,}$$ $$\frac{dK}{dt}=5\text{,}$$ then we have $$\frac{dL}{dt}=-3 \frac{81}{256}5 \approx -4.75\text{.}$$

##### 18.

Our production function is $$4000=4L^.25 K^.75\text{.}$$ Find $$\frac{dK}{dt}$$ if $$L=1000\text{,}$$ $$K=1000\text{,}$$ $$\frac{dL}{dt}=10\text{.}$$