Shared08 - Related Rates Assignment / Related Rates Notes.sagewsOpen in CoCalc
This material was developed by Aaron Tresham at the University of Hawaii at Hilo and is
licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

### Prerequisites:

• Intro to Sage
• Differentiation
• Implicit Differentiation

# Related Rates

Related rates problems involve two or more changing quantities. The quantities are related to each other, and you know the rate of change of all but one quantity. The goal is to find the rate of change of the last quantity.

The computations are similar to implicit differentiation.

## Example 1

The length of a rectangle is increasing at a rate of 8 cm/s and its width is increasing at a rate of 3 cm/s. At what rate is the area of the rectangle increasing when the length is 20 cm and the width is 10 cm?

Solution

This example involves three quantities: length, width, and area of a rectangle. Let's call these , , and .

We know from geometry that these three quantities are related: .

We know the rate of change of two of the three quantities with respect to time ():

cm/s

cm/s

The question asks us about the third rate of change, .

The idea is to take the derivative of the equation with respect to (all three quantities are functions of time).

Similar to what we did with implicit differentiation, we must tell Sage that , , and are functions of , and then we can take the derivative.

%var t
l=function('l')(t)  #l is a function of t
w=function('w')(t)  #w is a function of t
A=function('A')(t)  #A is a function of t
derivative(A==l*w,t)  #don't forget the double equal sign ==
show(_)

diff(A(t), t) == w(t)*diff(l(t), t) + l(t)*diff(w(t), t)

Notice that Sage writes , , and as functions of .

Usually we don't write all of these as functions of , but we will use Liebniz's notation to make it clear that the derivatives are with respect to time:

Notice that this equation gives us a formula for the rate of change of area (what the question asks for) in terms of things we know (length, width, and their rates of change).

Although the rates of change of both length and width are constants, notice that the rate of change of area is not a constant.

Now that we have the derivative, we can start plugging in values. The question asks for when and .

So at the time specified, the area is changing at a rate of .

10*8+20*3

140

## Example 2

A 12 m ladder rests on horizontal ground and leans against a vertical wall. The foot of the ladder is pulled away from the wall at the rate of m/s. How fast is the top sliding down the wall when the foot of the ladder is 4 m from the wall?

Solution

Let be the vertical distance from the top of the ladder to the ground, and let be the horizontal distance from the wall to the foot of the ladder.

We are told , and we are asked to find when .

Since the ladder, wall, and ground form a right triangle, the Pythagorean Theorem relates and :

We now take the derivative of this equation with respect to time.

[Note: 12 is a constant, so we can plug it in now. But and are changing, so do not plug in values for these until after you have found the derivative.]

%var t
x=function('x')(t)
y=function('y')(t)
derivative(x^2+y^2==12^2,t)  #don't forget ==
show(_)

2*x(t)*diff(x(t), t) + 2*y(t)*diff(y(t), t) == 0

Let's rewrite this:

We want , so let's have Sage solve for this:

solve(derivative(x^2+y^2==12^2,t),derivative(y,t))
show(_)

[diff(y(t), t) == -x(t)*diff(x(t), t)/y(t)]
[]

We are given and , but we also need to know .

When , what is ?

solve(4^2+y^2==12^2,y)
show(_)

[y(t) == -8*sqrt(2), y(t) == 8*sqrt(2)]
[, ]

We don't care about the negative solution ( since it is a distance). So when we have .

Now let's plug in all the given information:

Notice that the derivative is negative, since the distance is decreasing (top of ladder sliding down the wall).

The top of the ladder is sliding down the wall at a rate of about 0.0354 m/s.

-4/(8*sqrt(2))*1/10
N(_)

-1/40*sqrt(2) -0.0353553390593274

## Example 3

A cylindrical tank standing upright (with one circular base on the ground) has radius 20 cm. How fast does the water level in the tank drop when the water is being drained at a rate of 25 cm/s?

Solution

Let be the radius of the tank, be the water level, and the volume of the water. We are given that and [the derivative must be negative, since is decreasing].

The relationship of these three quantities is given by the volume formula for a cylinder: .

In this case , so .

Let's take the derivative:

%var t
V=function('V')(t)
h=function('h')(t)
derivative(V==400*pi*h,t)
show(_)

diff(V(t), t) == 400*pi*diff(h(t), t)

So we see

We want to solve this for , so divide both sides by and plug in the given value of :

Thus, the water level is falling at a rate of about 0.02 cm/s.

-25/(400*pi)
N(_)

-1/16/pi -0.0198943678864869