Skip to main content
Mathematics LibreTexts

1.6: Modeling with Linear Functions

  • Page ID
    67101
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    When modeling scenarios with a linear function and solving problems involving quantities changing linearly, we typically follow the same problem solving strategies that we would use for any type of function:

    Problem Solving Strategy

    1. Identify changing quantities, and then carefully and clearly define descriptive variables to represent those quantities. When appropriate, sketch a picture or define a coordinate system.
    2. Carefully read the problem to identify important information. Look for information giving values for the variables, or values for parts of the functional model, like slope and initial value.
    3. Carefully read the problem to identify what we are trying to find, identify, solve, or interpret.
    4. Identify a solution pathway from the provided information to what we are trying to find. Often this will involve checking and tracking units, building a table or even finding a formula for the function being used to model the problem.
    5. When needed, find a formula for the function.
    6. Solve or evaluate using the formula you found for the desired quantities.
    7. Reflect on whether your answer is reasonable for the given situation and whether it makes sense mathematically.
    8. Clearly convey your result using appropriate units, and answer in full sentences when appropriate.

    Example \(\PageIndex{1}\)

    A company purchased $120,000 in new office equipment.  Then expect the value to depreciate (decrease) by $16,000 per year.  Find a linear model for the value, then find and interpret the horizontal intercept and determine a reasonable domain and range for this function.

    Solution

    In the problem, there are two changing quantities:  time and value.  The remaining value of the equipment depends on how long the company has had it.  We can define our variables, including units.

    Output: \(V\), value remaining, in dollars

    Input: \(t\), time, in years

    Reading the problem, we identify two important values.  The first, $120,000, is the initial value for \(V\).  The other value appears to be a rate of change – the units of dollars per year match the units of our output variable divided by our input variable.  The value is depreciating, so you should recognize that the value remaining is decreasing each year and the slope is negative. 

     

    Using the intercept and slope provided in the problem, we can write the equation: \(V(t) = 120,000 - 16,000t\). 

     

    To find the horizontal intercept, we set the output to zero, and solve for the input:

    \[\begin{align*}  0 &= 120,000 - 16,000t \\ t &= \frac{120,000}{16,000} = 7.5 \end{align*} \]

    The horizontal intercept is 7.5 years.  Since this represents the input value where the output will be zero, interpreting this, we could say:  The equipment will have no remaining value after 7.5 years.

    When modeling any real life scenario with functions, there is typically a limited domain over which that model will be valid – almost no trend continues indefinitely.  In this case, it certainly doesn’t make sense to talk about input values less than zero.  This model is also not valid after the horizontal intercept.

    The domain represents the set of input values and so the reasonable domain for this function is \(0 \leq t \leqs 7.5\). The range represents the set of output values and the value starts at $120,000 and ends with $0 after 7.5 years so the corresponding range is \(0 \leq V(t) \leqs 120,000\).  

    Most importantly remember that domain and range are tied together, and whatever you decide is most appropriate for the domain (the independent variable) will dictate the requirements for the range (the dependent variable).

    Example \(\PageIndex{2}\)

    Jamal is choosing between two moving companies. The first, U-Haul, charges an up-front fee of $20, then 59 cents a mile. The second, Budget, charges an up-front fee of $16, then 63 cents a mile(Rates retrieved Aug 2, 2010 from www.budgettruck.com and http://www.uhaul.com/). When will U-Haul be the better choice for Jamal?

    Solution

    The two important quantities in this problem are the cost, and the number of miles that are driven. Since we have two companies to consider, we will define two functions:

    Input: \(m\), miles driven

    Outputs:

    \(Y(m)\): cost, in dollars, for renting from U-Haul

    \(B(m)\): cost, in dollars, for renting from Budget

    Reading the problem carefully, it appears that we were given an initial cost and a rate of change for each company. Since our outputs are measured in dollars but the costs per mile given in the problem are in cents, we will need to convert these quantities to match our desired units: $0.59 a mile for U-Haul, and $0.63 a mile for Budget.

    Looking to what we’re trying to find, we want to know when U-Haul will be the better choice. Since all we have to make that decision from is the costs, we are looking for when U-Haul will cost less, or when \(Y(m) < B(m)\). The solution pathway will lead us to find the equations for the two functions, find the intersection, then look to see where the \(Y(m)\) function is smaller. Using the rates of change and initial charges, we can write the equations: 屏幕快照 2019-06-21 上午9.25.59.png

    \[Y(m) = 20 + 0.59m\nonumber \]
    \[B(m) = 16 + 0.63m\nonumber \]

    These graphs are sketched to the right, with Y(m) drawn dashed.

    To find the intersection, we set the equations equal and solve:

    \[\begin{array} {rcl} {Y(m)} &= & {B(m)} \\ {20 + 0.59m} &= & {16 + 0.63m} \\ {4} &= & {0.04m} \\ {m} &= & {100} \end{array}\nonumber \]

    This tells us that the cost from the two companies will be the same if 100 miles are driven. Either by looking at the graph, or noting that \(Y(m)\) is growing at a slower rate, we can conclude that U-Haul will be the cheaper price when more than 100 miles are driven.

    Example \(\PageIndex{3}\)

    A company’s revenue has been growing linearly.  In 2012 their revenue was $1.45 million.  By 2015 the revenue had grown to $1.81 million.  If this trend continues,

    a. Predict the revenue in 2020.

    b. When will revenue reach $3 million?

    Solution

    The two changing quantities are the revenue and time.  While we could use the actual year value as the input quantity, doing so tends to lead to very ugly equations, since the vertical intercept would correspond to the year 0, more than 2000 years ago! 

    To make things a little nicer, and to make our lives easier too, we will define our input as years since 2012:

    Input:  \(t\), years since 2012

    Output:  \(R(t)\), the company’s revenue, in millions of dollars

    The problem gives us two input-output pairs.  Converting them to match our defined variables, the year 2012 would correspond to \(t = 0\), giving the point \((0, 1.45)\).  Notice that through our clever choice of variable definition, we have “given” ourselves the vertical intercept of the function.  The year 2015 would correspond to \(t = 3\), giving the point \((3, 1.81)\). 

     

    To predict the population in 2020 (\(t = 8\)), we would need an equation for the population.  Likewise, to find when the revenue would reach $3 million, we would need to solve for the input that would provide an output of 3.  Either way, we need an equation.  To find it, we start by calculating the rate of change:

    \[m = \frac{1.81 - 1.45}{3 - 0} = \frac{0.36}{3} = 0.12 \text{ million dollars per year.}\nonumber\]

     

    Since we already know the vertical intercept of the line, we can immediately write the equation:

    \[R(t) = 1.45 + 0.12t\]

    To predict the revenue in 2020, we evaluate our function at \(t=8\),

    \[R(8) = 1.45 + 0.12(8) = 2.41\nonumber\]

    If the trend continues, our model predicts a revenue of $2.41 million in 2020.

    To find when the population will reach $3 million, we can set \(R(t)=3\) and solve for \(t\).

    \[\begin{align*} 3 &= 1.45 + 0.12t \\  1.55 &= 0.12t  \\  t &\approx 12.917 \\ \end{align*} \]

    Our model predicts the revenue will reach $3 million in a little under 13 years after 2012, or just before the year 2025.

    In business, a very common application of functions is to model cost, revenue, and profit.  

    Definition: Word

    When a company produces q items, the total cost is the cost of total cost of producing those items.  The total cost includes both fixed costs, which are startup costs, like equipment and buildings, and variable costs, which are costs that depend on the number of items produced, like materials and labor. 

    In the most simple case, Total Cost = (Fixed Costs) + (Variable Costs) ∙ q

    Revenue is the amount of money a company brings in from sales. 

    In the most simple case, Revenue = (Price per item) ∙ q

    Profit is the amount of money brings in, after expenses.

    Profit = Revenue – Costs

    We often talk about the break-even point.  This is the level of production where Revenue equals Cost, or equivalently where Profit is zero.  This is typically the minimum level of sales necessary for the company to make a profit.

    Example \(\PageIndex{4}\)

    A tech startup is looking at developing and launching a new mobile app.  Initial development of the app will cost $300,000, and they estimate marketing and support for each user will cost $0.50.  While the app will be free, they estimate they will be able to bring in $2 per user on average from in-app purchases.  How many users will the company need to break even?

    We start by modeling the cost, revenue, and profit.  Let q = number of users.

    The fixed (initial) costs are $300,000, and the variable (per-item) costs as $0.50 per user.  We can write the total cost equation:

    \[TC(q) = 300,000 + 0.50q\nonumber\]

    The revenue will be $2 per user, so the revenue equation will be:

    \[R(q) = 2q\nonumber\]

    We could find the break-even point by setting the total cost equal to the revenue, which is equivalent to finding the intersection of the lines.

    1.6graph1.png

    Alternatively, we could go ahead and find a profit equation first:

    \[P(q) = R(q) - TC(q) = 2q - \left( {300,000 + 0.50q} \right) = 1.5q - 300,000 \nonumber\]

    The break even point can be found by setting the profit equal to zero:

    \[\begin{align*} 0 &= 1.5q - 300,000   \\ q &= 200,000 \end{align*} \]

    The company will have to acquire 200,000 users to break even.

    Exercise \(\PageIndex{1}\)

    A donut shop estimates their fixed daily expenses are $600.  If each donut costs about $0.05 to make and sells for $0.60, how many donuts do they need to sell to break even?

    Answer

    Revenue: \(R = 0.60q\)

    Break even when \(R=C\), at a quantity of about 1091 donuts per day.

     In economics, there is a model for how prices are determined in a free market which states that supply and demand for a product is related to the price.  The demand relationship shows the quantity of a certain product that consumers are willing to buy at a certain price.  Typically the quantity demanded will decrease for an item if the price increases.  The supply relationship shows the quantity of a product that suppliers are willing to produce at a certain sales price.  Typically the supply demanded will increase if the price increases.  Economic theory says that supply and demand will interact, and the intersection will be the equilibrium price, or market price, where the quantity supplied and demanded will be equal.

    Supply and Demand

    If \(p\) is the price of a product, then

    \(Q_d\) is the quantity demanded;

    \(Q_s\) is the quantity supplied.

    The demand curve is a decreasing function, while the supply curve is an increasing function.

    The intersection of the curves is the equilibrium price and quantity, also called the market price and quantity.  This point is often notated as \(p^*, Q^*\).

    In later chapters you will explore supply and demand curves that are non-linear, but in this chapter we will focus on linear supply and demand functions. 

    In most economic books, you will see the supply and demand curve written with price as the input and quantity as the output, like \(Q_d = 140 - 2p\).  However, supply and demand graphs are drawn with price on the vertical axis and quantity on the horizontal.  In an effort to avoid confusion, most of the time in this text we will instead write supply and demand curves with price as the output, to match its placement on the vertical axis.

    Example \(\PageIndex{5}\)

    At a price of $2.50 per gallon, there is a demand in a certain town for 42.5 thousand gallons of gas and a supply of 20 thousand gallons.  At a price of $3.50, there is demand for 25.5 thousand gallons and a supply of 28 thousand gallons.  Assuming supply and demand are linear, find the equilibrium price and quantity.

    Solution

    We start by finding a linear equation for both supply and demand.  We will use price, \(p\) in dollars, as the output and quantity, \(q\) in thousands of gallons, as the input.

    For supply, we have the points \((20, 2.50)\) and \((28, 3.50)\).

    Finding the slope: \(m = \frac{3.50 - 2.50}{28 - 20} = \frac{1}{8}\)

     

    We know the equation will look like \(p = \frac{1}{8}q + b\), so substituting in \((20, 2.50)\),

    \[\begin{align*}  2.5 &= \frac{1}{8}(20) + b   \\  2.5 &= 2.5 + b   \\  b &= 0 \end{align*} \]

    The supply equation is: \(p = \frac{1}{8}q\)

    For demand, we have the points \((42.5, 2.50)\) and \((25.5, 3.50)\).  Using a similar approach, we can find the demand equation is: \(p =  -\frac{1}{17}q + 5\).

    To find the equilibrium, we set the supply equal to the demand:

    \[\begin{align*} \frac{1}{8}q &= -\frac{1}17q + 5 &\quad \text{Multiplying through by 8(17) = 136 to clear the fractions} &\\ 136\left( \frac{1}{8}q \right) &= 136\left(  -\frac{1}{17}q + 5 \right)&\\ 17q &=  - 8q + 680& \quad \text{Now we solve for } q &\\  25q &= 680&   \\  q &= 27.2&   \\ \end{align*} \]

     

    To find the equilibrium price, we can substitute that value back into either equation:

    \[p = \frac{1}{8}(27.2) = 3.4\nonumber\]

    The equilibrium quantity will be 27.2 thousand gallons of gas at a price of $3.40.

    1.6graph2.png

    Exercise \(\PageIndex{1}\)

    A company estimates that at a price of $140 there will demand for 4000 items, and for each $5 increase in price the demand will drop by 200 items.  The supply curve is \(p = \frac{1}{20}q\).  Find the equilibrium price and quantity.

    Answer

    Demand:  \(p =  - \frac{1}{40}q + 240\)

    Supply = Demand when \(q = 3200, p =\$160\)

     

    Important Topics of this Section

    The problem solving process

    1. Identify changing quantities, and then carefully and clearly define descriptive variables to represent those quantities. When appropriate, sketch a picture or define a coordinate system.
    2. Carefully read the problem to identify important information. Look for information giving values for the variables, or values for parts of the functional model, like slope and initial value.
    3. Carefully read the problem to identify what we are trying to find, identify, solve, or interpret.
    4. Identify a solution pathway from the provided information to what we are trying to find. Often this will involve checking and tracking units, building a table or even finding a formula for the function being used to model the problem.
    5. When needed, find a formula for the function.
    6. Solve or evaluate using the formula you found for the desired quantities.
    7. Clearly convey your result using appropriate units, and answer in full sentences when appropriate.

    This page titled 1.6: Modeling with Linear Functions is shared under a CC BY-SA license and was authored, remixed, and/or curated by David Lippman & Melonie Rasmussen (The OpenTextBookStore) .