6.2 Algebraic Methods for Modeling

Image by Design n Print from Pixabay Image by Design n Print from Pixabay

Introduction

Many people are concerned about the amount of mercury they ingest by eating certain species of large fish like shark, swordfish, and tuna. Mercury levels in large fish can be over a million times higher than that found in the surrounding waters, posing a possible health risk.

An accurate mathematical model could help people understand those concerns and make informed decisions. Fortunately, the elimination of substances like mercury from the body are known to have biological half-lives, and we know that half-lives can be modeled with exponential functions.

In this section we'll will point out key words and phrases, like "half-life", that indicate a scenario might be modeled by a particular type of function. We'll also cover algebraic methods for finding those equations.

Identifying Functions from Descriptions

Linear Functions: Constant Rates

When we studied how functions change in Chapter 1, we saw that the average rate of change formula was nothing more than the slope formula rewritten with function notation.

Since the slope of a line remains consistent throughout, the key to identifying a linear function is to spot a constant rate of change.

It helps to remember that a rate is ratio of two quantities. Such rates are often described using the word per (miles per gallon, servings per package, dollars per hour, feet per second) or something equivalent (two tickets for each person, ten-thousand steps every day, etc.).

Whatever that constant rate of change is, it will be the slope of the linear function.

Power Functions: Proportional Changes

Back in Chapter 2 when we introduced the ideas of direct and inverse proportionality, all the examples explicitly stated the type of proportionality. Without specific guidance like that, we'll need to look for other clues.

Specifically, if two quantities increase or decrease together, then they might vary directly. On the other hand, if one goes up while the other goes down, then they could vary inversely.

While those behaviors don't exclusively belong to power functions, they do indicate that a power function should be considered.

Exponential Functions: Constant Percentages

As we saw in Chapter 3 exponential functions often appear in scenarios involving growth or decay that follows a multiplicative pattern.

A distinguishing features of exponential functions is that they involve a constant percentage change over equal intervals. Almost without exception, if a constant percent change is mentioned within a certain time frame, then the scenario is likely exponential in nature.

QUICK CHECK

Identify the type of function (linear, power, or exponential) that would likely be the best model for each scenario.

  1. A bacteria culture doubles every $8$ hours.

    Answer
    The keyword "doubles" implies exponential growth. Since doubling means growing constantly at 100%, this is exponential

  2. The cost of an Uber ride increases $\$2$ per mile.

    Answer
    The cost increases at a constant rate of $2 each mile, so this is linear

  3. The slower you drive the longer it takes to arrive at your destination.

    Answer
    This is likely an inversely proportional relationship, so a power function is probably the best model.

  4. The more horsepower a car has the faster it accelerates.

    Answer
    This sounds like a directly proportional relationship, so a power function is probably best.

  5. A job offers $3\%$ raises every year.

    Answer
    This scenario has a constant percent increase of 3%, so it is exponential

  6. A person spends $\$4$ each day on a bus pass.

    Answer
    $4 each day is a constant rate of change, so this is linear.

Writing Functions from Descriptions

Once we've chosen a function model that seems to fit the description, the next task is to write the equation of that function.

If a starting value is given, then the equations for linear and exponential functions can generally be written without much trouble. Power functions will require two known values, so we'll delay looking at them for a moment.

Writing Linear Functions

As we saw in the previous section, the slope-intercept form of a linear function is $y=mx+b$, where $m$ is the slope and $b$ is the y-intercept.

To pull the slope and y-intercept out of a description, look for the following:

  • The slope $m$ is the constant rate of change of the function.
  • The y-intercept $b$ is a starting value, which is the value of $y$ when $x = 0$.

For instance, suppose a gym has an initial sign-up fee of $\$50$ and monthly membership fee of $\$20$. In this scenario, the initial sign-up fee is the y-intercept and the monthly fee is the slope. Using $m=20$ and $b=50$ the equation of the linear function is: [ y = 20x + 50 ] This linear function allows us to calculate the total cost of the gym membership based on the number of months ($x$).

Writing Exponential Functions

In Chapter 3 we learned that the general form of an exponential function is $y = ab^x$, where $a$ is the initial value (or starting amount) and $b$ is the base (growth/decay factor).

So, much like a linear function, we only need two parameters to write the equation of an exponential function. To extract these from a description, look for the following:

  • The initial value $a$ is the value of $y$ when $x = 0$. It represents the starting point of the exponential growth or decay.
  • The base $b$ is the factor by which $y$ changes for each unit change in $x$. If $b > 1$, it represents exponential growth; if $0 < b < 1$, it represents exponential decay. If a percentage rate $r$ is given then the base is $b=1+r$ for growth and $b=1-r$ for decay. If the change takes $c$ units to occur, then $x$ should be divided by $c$, which is how we obtained the half-life and doubling-time equations.

As a simple example, suppose an aspiring social influencer has $400$ followers and expects that number to grow by $3\%$ every month. Then $y=400(1.03)^x$ allows us the calculate how many followers they have after $x$ months.

QUICK CHECK

  1. Suppose a different gym has a $\$75$ initial fee and $\$10$ monthly dues. Write an equation for the total cost.

    Answer
    $y=10x+75$ where $x$ is months.

  2. Suppose the aspiring social influencer above realizes their number of followers increases by $3\%$ every $2$ months. Write an equation for the number of followers they have after $x$ months.

    Answer
    $y=400(1.03)^{x/2}$ where $x$ is months.

Creating Functions from Two Points

In many cases we may have to determine the parameters of a function from two pairs of data. This can apply to any of the three types of functions we're looking at in this section.

Find a Linear Function from Two Points

The first step in finding a linear function through two points is to use the slope formula [m=\frac{y_2-y_1}{x_2-x_1}]

Once we have the slope in hand we can finish the process with either the point-slope form or the slope-intercept form. Many people prefer the slope-intercept form since it is more familiar, but the point-slope form is actually easier to work with. We'll do the same example both ways and you can decide for yourself.

For our example, let's use the points $(2,5)$ as $(x_1,y_1)$ and $(6,-1)$ as $(x_2,y_2)$. We'll start with the slope

[ \begin{align} m &= \frac{y_2-y_1}{x_2-x_1} && \small \color{#5fa2ce} {\text{slope formula}} \newline &= \frac{-1 - 5}{6-2} && \small \color{#5fa2ce} {\text{insert coordinates of the two points}} \newline &= \frac{-6}{4} && \small \color{#5fa2ce} {\text{evaluate the subtractions}} \newline &= -\frac{3}{2} && \small \color{#5fa2ce} {\text{reduce the fraction}} \newline \end{align} ]

To finish this with the slope-intercept form we need to find the y-intercept $b$. This is done by taking putting the coordinates of either point into the equation and solving for $b$. We will use $(2,5)$ and, of course, $m = \frac{-3}{2}$.

[ \begin{align} y &= m x + b && \small \color{#5fa2ce} {\text{slope-intercept form}} \newline 5 &= -\frac{3}{2}(2)+b && \small \color{#5fa2ce} {\text{insert the slope and the coordinates of the point}} \newline 5 &= -3+b && \small \color{#5fa2ce} {\text{simplify}} \newline 8 &= b && \small \color{#5fa2ce} {\text{add $3$ to both sides}} \end{align} ]

We now have $y=-\frac{3}{2}x+8$ as our linear model in the slope-intercept form.

Since the point-slope form only requires the coordinates of a point and the slope, we can get the equation just by substituting. Here we will also use $(2,5)$ and $m = \frac{-3}{2}$.

[ \begin{align} y &= m(x-x_1) + y_1 && \small \color{#5fa2ce} {\text{point-slope form}} \newline y &= -\frac{3}{2}(x-2)+5 && \small \color{#5fa2ce} {\text{insert the slope and the coordinates of the point}} \end{align} ]

We now have $y=-\frac{3}{2}(x-2)+5$ as our linear model in the point-slope form. It is important to point out that these are the same exact equation, just in different formats. This can be seen clearly if we start with point-slope form, distribute the slope and simplify.

[ \begin{align} y &= -\frac{3}{2}(x-2)+5 && \small \color{#5fa2ce} {\text{point-slope form}} \newline y &= \left(-\frac{3}{2}\cdot x\right)-\left(-\frac{3}{2}\cdot 2\right) + 5 && \small \color{#5fa2ce} {\text{distribute the slope}} \newline y &= -\frac{3}{2}x + 3 + 5 && \small \color{#5fa2ce} {\text{simplify the multiplication}} \newline y &= -\frac{3}{2}x + 8 && \small \color{#5fa2ce} {\text{simplify the addition}} \end{align} ]

The end result is the same slope-intercept form we found earlier. This process can always be used to find a line through any two points, provided both points have different $x$-coordinates. If the points have the same $x$-coordinate then we cannot create a linear function since those points would not pass the vertical line test.

Find a Power Function from Two Points

Suppose we are asked to find a standard power function through the points $(6, 10)$ and $(2, 5)$. Since power functions are not lines, we cannot use the slope formula and must employ different techniques.

One thing that will help is remembering that each point has an $x$ and a $y=f(x)$ coordinate. Substituting those values into the standard power function equation $f(x)=kx^p$ will give us a pair of equations to work with.

Since there are two unknown values, $k$ and $p$, we need to eliminate one of them in order to solve for the other. Notice that if we form a ratio of our equations then $k$'s will cancel. That's our first step.

[ \begin{align} \frac{10}{5} &= \frac{k (6)^{p}}{k (2)^{p}} && \small \color{#5fa2ce}{\text{Form a ratio of the two equations.}} \newline \frac{10}{5} &= \frac{6^{p}}{2^{p}} && \small \color{#5fa2ce}{\text{Cancel $k$'s.}} \newline \frac{10}{5} &= \left(\frac{6}{2}\right)^p && \small \color{#5fa2ce}{\text{Use the rule $\frac{a^x}{b^x}=\left(\frac{a}{b}\right)^{x}$.}} \newline 2 & = 3^p && \small \color{#5fa2ce}{\text{Reduce the fractions.}} \end{align} ]

With $k$ out of the way momentarily, we can focus on finding $p$. Since $p$ is in the exponent, we'll need to use logarithms to find it.

[ \begin{align} \ln(2) &= \ln \left(3^{p}\right) && \small \color{#5fa2ce}{\text{Apply a logarithm to both sides.}} \newline \ln(2) &= p \cdot \ln (3) && \small \color{#5fa2ce}{\text{Use the power rule for logarithms.}} \newline \frac{\ln(2)}{\ln(3)} &= p && \small \color{#5fa2ce}{\text{Divide to isolate $p$.}} \newline p &\approx 0.6309 && \small \color{#5fa2ce}{\text{Decimal approximation.}} \end{align} ]

By putting $p=0.6309$ back into either of our original two equations we'll be able to determine $k$.

[ \begin{align} 10 &= k (6)^{p} && \small \color{#5fa2ce}{\text{Choose one of the original equations.}} \newline 10 &= k (6)^{0.6309} && \small \color{#5fa2ce}{\text{Substitute $p=0.6309$}} \newline 10 &= k \cdot 3.097 && \small \color{#5fa2ce}{\text{Evaluate the power.}} \newline \frac{10}{3.097} &= k && \small \color{#5fa2ce}{\text{Divide both sides by $3.097$}} \newline k &= 3.229 && \small \color{#5fa2ce}{\text{Evaluate the division.}} \end{align} ]

With both $k$ and $p$ in hand, we can now write the equation for our power function.

[ f(x)=3.229x^{0.6309} ]

Keep in mind that, since power functions generally exist only when $x \gt 0$, we should check that both $x$-coordinates are positive before starting this process. Additionally, since logarithms were involved in our solving process, the two $y$-coordinates should be non-zero and have the same sign. For the most part, expect to find power functions only when both points are in the first quadrant.

Find an Exponential Function from Two Points

Suppose we are asked to find an exponential function that passes through the points $(1, 12)$ and $(3, 27)$, how is that done? The process begins the same way it did with a power function--inserting the coordinates into the standard exponential function $f(x)=a \thinspace b^{x}$ to make two equations.

Forming a ratio the two equations worked before, so let's try that again. We'll put the equation with the larger numbers on top, which should help us reduce fractions along the way.

[ \begin{align} \frac{27}{12} &= \frac{ a \thinspace b^{3}}{a \thinspace b^{1}} && \small \color{#5fa2ce}{\text{Form the ratio of the two equations.}} \newline \frac{27}{12} &= \frac{b^{3}}{b^{1}} && \small \color{#5fa2ce}{\text{Cancel the $a$'s.}} \newline \frac{27}{12} &= b^{2} && \small \color{#5fa2ce}{\text{Simplify the powers.}} \newline \frac{9}{4} &= b^{2} && \small \color{#5fa2ce}{\text{Reduce the fraction.}} \newline \pm \sqrt{\frac{9}{4}} &= b && \small \color{#5fa2ce}{\text{Take $\pm \sqrt{\text{ }}$ of both sides}} \newline \pm \frac{3}{2} &= b && \small \color{#5fa2ce}{\text{Simplify}} \end{align} ]

Normally getting two answers could cause a problem, but in this case we know something extra. We are trying to find the base of an exponential function, and the base of an exponential is never negative. So the correct value must be $b=\frac{3}{2}$.

This is only half of the solution; we also need to know what $a$ is. To find that, we'll substitute $b$ back into one of our equations. As before, either one will work but we'll choose the one with the lower values in it--it's just is a bit simpler.

[ \begin{align} 12 &= a \thinspace b^{1} && \small \color{#5fa2ce}{\text{Equation #1}} \newline 12 & = a \frac{3}{2} && \small \color{#5fa2ce}{\text{Substitute $b = \frac{3}{2}$}} \newline \frac{2}{3} \cdot 12 &= a && \small \color{#5fa2ce}{\text{Multiply by $\frac{2}{3}$}} \newline 8 &= a && \small \color{#5fa2ce}{\text{Simplify}} \newline \end{align} ]

Now that we know the values for $a$ and $b$, we can finally say that

[f(x)=8 \left(\frac{3}{2} \right)^{x}]

is the exponential function that passes through the points $(1, 12)$ and $(3, 27)$.

Convert Between Exponential Models

In the previous example we used the standard exponential model $f(x)=a \thinspace b^{x}$, where $b=1+r$, but we know from Chapter 3 that there are several different exponential forms. Why didn't we use one of those?

The answer is that we certainly could have. The format we use doesn't really matter since its possible to switch between any of them. In particular, the standard model $f(x)=a \thinspace b^{x}$ and the continuous growth model $f(t)=a \thinspace e^{k t}$ are equivalent (and are the most commonly used). Here's how you convert from one to the other.

[ \begin{align} a \thinspace b^{\ x} &\Longrightarrow a \thinspace e^{\ k \ t} && \small \color{#5fa2ce}{\text{by setting $k = \ln (b)$}} \newline \newline a \thinspace e^{\ k \ t} &\Longrightarrow a \thinspace b^{\ x} && \small \color{#5fa2ce}{\text{by setting $b=e^{\ k}$}} \newline \end{align} ]

Either form can be used for any application. We often make the decision based on convenience and whether its preferable to emphasize the growth factor $b$ or the continuous growth rate $k$ in a given scenario.

QUICK CHECK

  1. Use the identity $b=e^{k}$ to rewrite $f(t)=2 \thinspace e^{-0.356 t}$ in the standard exponential model form $f(x)=a \thinspace b^{x}$.

    Answer
    Since $e^{-0.356}=0.7$, the equivalent standard model is $f(x)=2(0.7)^{x}$.

  2. Use the identity $k = \ln (b)$ to rewrite $f(x)=138(1.493)^{x}$ as a continuous growth exponential function of the form $f(t)=a \thinspace e^{k t}$.

    Answer
    Since $\ln(1.493)=0.4$, the equivalent continuous growth model is $f(t)=138 \thinspace e^{0.4 t}$.

Create Exponential Models

Continuous Biological Decay

Image by Design n Print from Pixabay Image by Design n Print from Pixabay

Let's return to the example that at the start of this section. The Mercury that small fish eat gets collectected in large predatory fish such as shark, swordfish, and tuna that live longer. Mercury levels in large fish can be over a million times higher than that found in the surrounding waters.

The U. S. Environmental Protection Agency (EPA) believes that if a person has a blood mercury level under 5.8 micrograms per liter ($\mu$g/L) then they are relatively safe and should see no adverse effects.

Suppose the Mercury level in your blood is at 15 $\mu$g/L. If 5 days later it has only dropped to 14 $\mu$g/L, how long will it take to reach a safe level?

If we assume mercury leaves your body in a continuous fashion, then we can try to find a model of the form $f(t)=ae^{k t}$. From the information given we can find $k$ by solving $14=15e^{k \thinspace 5}$.

[ \begin{align} 14 =& 15e^{k \thinspace 5} \newline \frac{14}{15} &= e^{5 \thinspace k} && \small \color{#5fa2ce} {\text{Divide both sides by $15$ to isolate the exponential.}} \newline \ln\left(\frac{14}{15}\right) &= \ln\left(e^{5 k}\right) && \small \color{#5fa2ce} {\text{Apply the natural log $\ln$ to both sides.}} \newline \ln\left(\frac{14}{15}\right) &= 5 k && \small \color{#5fa2ce} {\text{Use the inverse relationship $\ln(e^{x})=x$.}} \newline \frac{\ln\left(\frac{14}{15}\right)}{5} &= k && \small \color{#5fa2ce} {\text{Divide both sides by $5$.}} \newline k &\approx -0.0138 && \small \color{#5fa2ce} {\text{Use a calculator to find a decimal approximation.}} \end{align}]

From this we see that the mercury concentration can be modeled by $f(t)=15e^{-0.0138 \thinspace t}$.

QUICK CHECK

  1. Now that we know the model is $f(t)=15e^{-0.0138 \thinspace t}$, how do we figure out the amount of time it will take to reach a safe level of 5.8$\mu$/L?
Answer
We need to set $f(t)=5.8$ and solve the equation for $t$.

We know that if your blood mercury level is initially at 15 $\mu$/L, then the mercury concentration can be modeled by the function $f(t)=15e^{-0.0138 \thinspace t}$ where $t$ is time in days.

To find out how long it will take to reach a safe level of 5.8 $\mu$g/L, we need to find $t$ so that $f(t)=5.8$.

[ \begin{align} 5.8 &= 15e^{-0.0138 \thinspace t} \newline \frac{5.8}{15} &= e^{-0.0138 \thinspace t} && \small \color{#5fa2ce} {\text{Divide both sides by $15$ to isolate the exponential.}} \newline \ln\left(\frac{5.8}{15}\right) &= \ln\left(e^{-0.0138 t}\right) && \small \color{#5fa2ce} {\text{Apply the natural log $\ln$ to both sides.}} \newline \ln\left(\frac{5.8}{15}\right) &= -0.0138 t && \small \color{#5fa2ce} {\text{Use the inverse relationship $\ln(e^{x})=x$.}} \newline \frac{\ln\left(\frac{5.8}{15}\right)}{-0.0138} &= t && \small \color{#5fa2ce} {\text{Divide both sides by $-0.0138$.}} \newline t &\approx 68.85 && \small \color{#5fa2ce} {\text{Decimal approximation.}} \end{align} ]

It appears that it will take roughly 69 days for the blood mercury concentration to return to a safe level.

QUICK CHECK

  1. How would this process have changed if you were asked to find the biological half-life of mercury in the blood stream?
Answer
To find the half-life we would need to solve for $t$ with $f(t)=\frac{1}{2} a$ where $a$ is the initial concentration. The solving steps would be nearly identical to what was done above.

Biological Half-Life

It is very common to use the half-life model $f(x)=a\left(\frac{1}{2}\right)^{x/c}$ to describe the biological decay of substances in the body. To change our continuous decay model for mercury into a half-life model, we must find $t$ so that $f(t)=\frac{1}{2} a$, where $a$ is the initial concentration.

[ \begin{align} \frac{1}{2} \cdot 15 &= 15 e^{-0.0138 t} && \small \color{#5fa2ce} {\text{Start with continuous decay model from above.}} \newline \frac{1}{2} &= e^{-0.0138 t} && \small \color{#5fa2ce} {\text{Divide both sides by $15$ to isolate the exponential.}} \newline \ln\left(\frac{1}{2}\right) &= \ln(e^{-0.0138 t}) && \small \color{#5fa2ce} {\text{Apply the natural log $\ln$ to both sides.}} \newline \ln\left(\frac{1}{2}\right) &= -0.0138 t && \small \color{#5fa2ce} {\text{Use the inverse relationship $\ln(e^{x})=x$.}} \newline \frac{\ln\left(\frac{1}{2}\right)}{-0.0138} &= t && \small \color{#5fa2ce} {\text{Divide both sides by $-0.0138$.}} \newline t &\approx 50.23 && \small \color{#5fa2ce} {\text{Use a calculator to find a decimal approximation.}} \end{align} ]

This shows that the half-life of mercury in the body is about 50 days. By taking $c=50$, we conclude that the function

[ f(x)=15\left(\frac{1}{2}\right)^{x/50} ]

is the half-life model for mercury concentration that is equivalent to our earlier continuous decay model. Both both produce the same values, they are just written in different formats.

Looking Ahead

In our final section we will use technology to find models that fit larger sets of data rather than doing the work by hand. Even so, the basic process will be the same as what we've done in the past two sections.

We will always start by comparing the properties of the data with the behaviors of functions we know so that we can choose an appropriate function model that can be used to predict unknown values.

If the model predicts unreasonable values that do not make any sense, then we should try to explain how we know the result is an error and why it might have occurred. An analysis of the errors can often lead to the construction of a more robust model.

Creative Commons LicenseThis work copyrighted by Nolan Mitchell under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Source files are available at https://github.com/duragauge/duragauge.github.io.

You can also download a PDF copy of the entire book here. The PDF was last updated on January 21, 2024, and may not reflect changes to the online content made after that date.