Based on the context of a problem, the problem could be modeled by a linear function and used for predictive purposes. When writing an equation to represent a contextual problem we will first need to decide on the form of the equation we would like to use: standard form, function form, or point slope form. Each form, as we know, identifies key pieces of information by looking at the equations. Deciding which form to use will be based on what information is given to you in the problem and what question you are trying to answer. Once you know the form you need to use, you can begin to write the equation. The information in the problem can vary. You can be given a slope (rate), a \(y\)-intercept (\(b\) value), a point or two points. Based on what information you are given you will then write the equation of the line similar to how you did for Target A in the Writing Linear Functions Unit. You may need to refer back to Writing Linear Functions-Target A-Guided Learning for a refresher on writing equations of a line. Let's work through a problem and see what we can find out.
Example 1: Your family decided to join the local waterpark. It costs \( \$ 25 \) per month to be a member and has a one−time \( \$ 100 \) membership fee. Write an equation that models the cost as a function of the number of months you are a member of the waterpark. How much will you be paying after three months at the pool?
As we look at the problem, we need to identify our \(x\)-variable (domain or independent variable) and our \(y\)-variable (range or dependent variable). Our independent variable will be months and our dependent variable will be cost in dollars.
There seems to be three pieces of key information (which are numbers) that stand out:
And finally the question you will be answering, how much will you pay after three months?
Because we are given the rate of change (slope) and the \(y\)-intercept, we will be using function form: \( y = mx + b \) or \( f(x) = mx + b \). Let \(x\) = months and let \(y\) = cost($).
1) Find slope: \(m=25\)
2) Find \(b\): \(b=100\)
3) Write the equation: \(f(x)=25x+100\)
Example 1: Your family decided to join the local waterpark. It costs \( \$ 25 \) per month to be a member and has a one−time \( \$ 100 \) membership fee. Write an equation that models the cost as a function of the number of months you are a member of the waterpark. How much will you be paying after three months at the pool?
As we look at the problem, we need to identify our \(x\)-variable (domain or independent variable) and our \(y\)-variable (range or dependent variable). Our independent variable will be months and our dependent variable will be cost in dollars.
There seems to be three pieces of key information (which are numbers) that stand out:
- \( \$ 25 \) per month - this is a rate since it is a value of dollars per month. This makes \( 25 \) the slope of the equation.
- \( \$ 100 \) membership fee - this is a one time starting fee which is an initial value. This makes \( 100 \) the \(y\)-intercept.
And finally the question you will be answering, how much will you pay after three months?
Because we are given the rate of change (slope) and the \(y\)-intercept, we will be using function form: \( y = mx + b \) or \( f(x) = mx + b \). Let \(x\) = months and let \(y\) = cost($).
1) Find slope: \(m=25\)
2) Find \(b\): \(b=100\)
3) Write the equation: \(f(x)=25x+100\)
Now to answer the question in the problem, how much will you pay after three months? Since the number of months is the independent variable ( \( x \) ), we will need to substitute \( 3 \) in for the \( x \) in our equation. Evaluate to find the answer.
\(x = 3\) months
\(y=25(3) + 100\)
\(y=75 + 100\)
\(y=\$175\) (cost for \(3\) months\)
\(x = 3\) months
\(y=25(3) + 100\)
\(y=75 + 100\)
\(y=\$175\) (cost for \(3\) months\)
In the first example we found that we had been given the rate (slope) and initial value (y-intercept). We found the equation to the line in function form (\( f(x)=mx + b \) or \( y = mx + b \)) and then used our equation to find how much it would cost us for three months of membership.
Example 2: You are designing a pen to advertise your club "Math is Great" at the Freshman Orientation night. You know two other clubs that ordered pens as well. They bought \( 75 \) pens for\( \$ 160 \) and \( 130 \) pens for \( \$ 270 \). Write an equation modeling cost as a function of the number of pens that are bought. Is there an initial design fee for printing the pens?
Let's start with defining our variables. The cost will be our y-variable (dependent or range) because it is dependent on the number of pens you will purchase which will be our x-variable (independent or domain).
Now we need to look for the pieces of information that will build our equation.
Finally, the question we are trying to answer: is there an initial fee for printing the pens? We need to find out what the \(y\)-intercept or \(b\) value is.
Since we have two points and are looking to find the \(y\)-intercept we will write our equation in function form or \( f(x) = mx + b \). Let \(x\) = number of pens and let \(y\) = cost ($).
Points: \((75, 160)\) and \((130, 270)\)
1) Find slope:
\(m=\large\frac{270-160}{130-75}=\frac{110}{55}=\normalsize2\)
2) Find b:
\(\begin{align}160&=2(75)+b\\160&=150+b\\-150& \ -150\\10&=b\end{align}\)
3) Write equation:
\(f(x)=2x+10\)
Example 2: You are designing a pen to advertise your club "Math is Great" at the Freshman Orientation night. You know two other clubs that ordered pens as well. They bought \( 75 \) pens for\( \$ 160 \) and \( 130 \) pens for \( \$ 270 \). Write an equation modeling cost as a function of the number of pens that are bought. Is there an initial design fee for printing the pens?
Let's start with defining our variables. The cost will be our y-variable (dependent or range) because it is dependent on the number of pens you will purchase which will be our x-variable (independent or domain).
Now we need to look for the pieces of information that will build our equation.
- \( 75 \) pens and \( \$ 160 \) are \( x \) and \( y \) values and thus create a point.
- \( 130 \) pens and \( \$ 270 \) are also \( x \) and \( y \) values and create another point.
Finally, the question we are trying to answer: is there an initial fee for printing the pens? We need to find out what the \(y\)-intercept or \(b\) value is.
Since we have two points and are looking to find the \(y\)-intercept we will write our equation in function form or \( f(x) = mx + b \). Let \(x\) = number of pens and let \(y\) = cost ($).
Points: \((75, 160)\) and \((130, 270)\)
1) Find slope:
\(m=\large\frac{270-160}{130-75}=\frac{110}{55}=\normalsize2\)
2) Find b:
\(\begin{align}160&=2(75)+b\\160&=150+b\\-150& \ -150\\10&=b\end{align}\)
3) Write equation:
\(f(x)=2x+10\)
Now to answer the question, is there an initial fee for ordering the pens? Yes there is, it would be \( \$ 10 \) because that is the \(y\)-intercept for the equation.
Example 3: You have collected \( \$ 180 \) from your soccer team to order pizza and breadsticks for dinner after your match. Pizzas cost \( \$ 10 \) per large pizza and breadsticks cost \( \$ 6 \) per order.Write an equation in terms of \( x \) and \( y \) to represent the situation. Give a combination of breadsticks and pizzas that you could order if have ordered \(15\) pizzas?
This problem is a bit different than the first two examples.
The problem is giving a total amount that we have to spend - \( \$ 180 \). It is also giving us two rates− \( \$ 10 \) per pizza and \( \$ 6 \) per order. We are looking for possible combinations of breadsticks and pizzas that could be ordered so this is defining our variable. We are going to let \(x\) = the number of pizzas ordered and \(y\) = the number of breadsticks.
The rate per pizza multiplied by the number of pizzas and the rate per order of breadsticks multiplied by the number of breadsticks ordered added together gives us how much money we have spent.
The equation that will be written will be in standard form based on the information provided.
Let \(x\) = number of pizzas and let \(y\) = number of orders of breadsticks.
\(10x+6y=180\)
\(10x\) is \(\$10\) per pizza multiplied by the number of pizzas.
\(6y\) is \(\$6\) per order of breadsticks multiplied by the number of orders of breaksticks.
These two added together equals our total amount of money we have, \(\$180\).
Example 3: You have collected \( \$ 180 \) from your soccer team to order pizza and breadsticks for dinner after your match. Pizzas cost \( \$ 10 \) per large pizza and breadsticks cost \( \$ 6 \) per order.Write an equation in terms of \( x \) and \( y \) to represent the situation. Give a combination of breadsticks and pizzas that you could order if have ordered \(15\) pizzas?
This problem is a bit different than the first two examples.
The problem is giving a total amount that we have to spend - \( \$ 180 \). It is also giving us two rates− \( \$ 10 \) per pizza and \( \$ 6 \) per order. We are looking for possible combinations of breadsticks and pizzas that could be ordered so this is defining our variable. We are going to let \(x\) = the number of pizzas ordered and \(y\) = the number of breadsticks.
The rate per pizza multiplied by the number of pizzas and the rate per order of breadsticks multiplied by the number of breadsticks ordered added together gives us how much money we have spent.
The equation that will be written will be in standard form based on the information provided.
Let \(x\) = number of pizzas and let \(y\) = number of orders of breadsticks.
\(10x+6y=180\)
\(10x\) is \(\$10\) per pizza multiplied by the number of pizzas.
\(6y\) is \(\$6\) per order of breadsticks multiplied by the number of orders of breaksticks.
These two added together equals our total amount of money we have, \(\$180\).
Now that we have the equation we need to find a possible combination that will satisfy the equation. We do want the amount to equal \( \$ 180 \). Let's try substituting in \( 10 \) for the number of pizzas and see if we can get an integer value of \( y \) or the number of orders of breadsticks (we can't order a partial order of breadsticks or pizzas).
\(\begin{align}10x+6y&=180\\10(10)+6y&=180\\100+6y&=180\\-100\ \ \ \ \ \ \ \ \ & \ -100\\\underline{6y}&=\underline{80}\\6 \ & \ \ \ \ \ \ 6\\y&=13.33\end{align}\)
\(\begin{align}10x+6y&=180\\10(10)+6y&=180\\100+6y&=180\\-100\ \ \ \ \ \ \ \ \ & \ -100\\\underline{6y}&=\underline{80}\\6 \ & \ \ \ \ \ \ 6\\y&=13.33\end{align}\)
Since the \(y\)-value isn't an integer, the combination including \( 10 \) pizzas will not work. So through substitution we need to try to find a possible combination. Let's try not ordering any pizzas and first see if it is possible to only order breadsticks and if so how many breadsticks we can order.
\(\begin{align}10x+6y&=180\\10(0)+6y&=180\\0+6y&=180\\\underline{6y}&=\underline{180}\\6 & \ \ \ \ \ \ \ 6\\y&=30\end{align}\)
\(\begin{align}10x+6y&=180\\10(0)+6y&=180\\0+6y&=180\\\underline{6y}&=\underline{180}\\6 & \ \ \ \ \ \ \ 6\\y&=30\end{align}\)
So you can order \( 0 \) pizzas and \( 30 \) orders of breadsticks. There are other combinations for instance if we order \( 6 \) pizzas we can get \( 20 \) order of breadsticks. See how that works below.
\(\begin{align}10x+6y&=180\\10(6)+6y&=180\\60+6y&=180\\-60\ \ \ \ \ \ \ \ \ & \ -60\\\underline{6y}&=\underline{120}\\6 \ & \ \ \ \ \ \ 6\\y&=20\end{align}\)
\(\begin{align}10x+6y&=180\\10(6)+6y&=180\\60+6y&=180\\-60\ \ \ \ \ \ \ \ \ & \ -60\\\underline{6y}&=\underline{120}\\6 \ & \ \ \ \ \ \ 6\\y&=20\end{align}\)
One last question to answer with this example. If we order \( 15 \) pizzas how many orders of breadsticks can we get? We will substitute in \( 15 \) for \( x \) (the number of pizzas) and see how many order of breadsticks we can order.
\(\begin{align}10x+6y&=180\\10(15)+6y&=180\\150+6y&=180\\-150\ \ \ \ \ \ \ \ \ & \ -150\\\underline{6y}&=\underline{30}\\6 \ & \ \ \ \ \ \ 6\\y&=5\end{align}\)
\(\begin{align}10x+6y&=180\\10(15)+6y&=180\\150+6y&=180\\-150\ \ \ \ \ \ \ \ \ & \ -150\\\underline{6y}&=\underline{30}\\6 \ & \ \ \ \ \ \ 6\\y&=5\end{align}\)
As you can see, we could order \( 5 \) orders of breadsticks if we order \( 15 \) pizzas.
Quick Check
1) You are staying at a waterpark for the weekend with your mom and dad. They charge \( \$ 145 \) per night to stay. You stay three nights and you are charged \( \$585 \). How much did your family get charged to go to the waterpark? How much was it per person to go to the waterpark?
2) You are at a movie theatre and are buying soda and popcorn for you and your friends. If you have \( \$ 30 \) to spend and soda costs \( \$ 2 \) and popcorn costs \( \$ 3 \) a bag, give a combination of soda and popcorn you could purchase when spending \( \$ 30 \) exactly.
1) You are staying at a waterpark for the weekend with your mom and dad. They charge \( \$ 145 \) per night to stay. You stay three nights and you are charged \( \$585 \). How much did your family get charged to go to the waterpark? How much was it per person to go to the waterpark?
2) You are at a movie theatre and are buying soda and popcorn for you and your friends. If you have \( \$ 30 \) to spend and soda costs \( \$ 2 \) and popcorn costs \( \$ 3 \) a bag, give a combination of soda and popcorn you could purchase when spending \( \$ 30 \) exactly.