Skip to content

DA5. Related Rates Problems

Statement

In our practical life related rates are used in many areas including the medical field to measure tumor growth, recovery from cancer, etc. Create/write an original related rate problem with a theme in mind. Your problem should utilize a mathematical relationship (Pythagorean theorem, cone, trig ratios, etc.) like the related rates problems that we solved in our Reading and Written Assignments.

Solution

The related rates problems usually involve two or more variables that change according to a function to a third variable (usually time). In these problems the implicit differentiation in respect to the third variable and some other mathematical concepts (like the Pythagorean theorem, trigonometric ratios, etc.) are used to find unknowns in the problem (Dawkins, n.d.).

Problem Example

A badly designed web page that queries all rows in the database table and shows each one in a card box on the page (no limiting or pagination is used). Each box adds 300 Bytes to the total page size and increases the load time by 1.5 ms. Knowing that at midnight of 01/01/2020, there were 2000 rows in the table, average writes operations (only creations) are 50 rows/hour at a constant rate(for simplicity).

  • At which time the page will take 30 seconds to load?
  • What will be the page size when it takes 12 seconds to load?

Problem Solution

Let’s define the following variables:

  • \(t\): time in seconds, thus any time units must be converted to seconds before used.
  • \(rows(t)\): the number of rows in the table at time \(t\).
\[ \begin{aligned} rows(t) &= 2000 + 50t \text{ (t in hours)} \\ rows(t) &= 2000 + 50/3600t \text{ (t in seconds)} \\ &\approx 2000 + 0.014t \end{aligned} \]
  • \(size(t)\): the page size in bytes at time \(t\).
\[ \begin{aligned} size(t) &= 300 rows(t) \\ &= 300(2000 + 0.014t) \\ &= 600000 + 42t \end{aligned} \]
  • \(load(t)\): the page load time in milliseconds at time \(t\).
\[ \begin{aligned} load(t) &= 1.rows(t) \text{ (t in ms)} \\ load(t) &= 1.rows(t)/1000 \text{ (t in seconds)} \\ &= 0.rows(t) \\ &= 0.0015(2000 + 0.014t) \\ &= 3 + 0.000021t \end{aligned} \]

At which time the page will take 30 seconds to load?

We will set \(load(t) = 30\) and solve for \(t\).

\[ \begin{aligned} load(t) &= 30 \\ 3 + 0.000021t &= 30 \\ 0.000021t &= 27 \\ t &= 27/0.000021 \\ t &\approx 1296000\text{ seconds} \\ t &\approx 15 \text{ days} \end{aligned} \]

let’s find the page size \(size(t)\) at \(t = 1296000\).

\[ \begin{aligned} size(t) &= 600000 + 42t \\ &= 600000 + 42(1296000) \\ &= 54480000 \text{ bytes} \\ &= 54 \text{ MB} \end{aligned} \]

What will be the page size when it takes 12 seconds to load?

We will set \(load(t) = 12\) and find the time \(t\), then compute the page size \(size(t)\).

\[ \begin{aligned} load(t) &= 12 \\ 3 + 0.000021t &= 12 \\ 0.000021t &= 9 \\ t &= 9/0.000021 \\ t &\approx 428572 \text{ seconds} \\ \end{aligned} \]

Now we can compute the page size \(size(t)\).

\[ \begin{aligned} size(t) &= 600000 + 42t \\ &= 600000 + 42(428572) \\ &= 18000024 \text{ bytes} \\ &= 18 \text{ MB} \end{aligned} \]

Conclusion

The example problem is an interesting one, it shows how a badly designed web page can affect the user experience and the server performance; and also demonstrates how the related rates problems can be used in real life.

According to the parameters above, it will take 15 days for the page to take 30 seconds to load with 54 MB in size; and 12 seconds to load with 18 MB in size.

References