Question 138·Hard·Linear Inequalities in One or Two Variables
A ride-sharing app charges a flat fee of $2 for each ride plus $1.20 per mile for the first 15 miles of that ride. For every mile beyond 15 miles, the cost is $0.80 per mile.
Kai has $30 in ride credit and wants to take one ride, after which he must still have at least $5 remaining in his account.
What is the greatest whole number of miles Kai can travel on this ride?
For cost-and-budget problems with changing rates, first convert any “must have at least” language into a clear spending limit (here, a maximum of $25). Then define a variable for the total quantity (miles) and carefully write a cost expression for each price range, making sure the more expensive early part is fully included before applying any cheaper later rate. Use the relevant expression to set up a linear inequality (cost ≤ spending limit), solve for the variable, and then interpret the result in context—especially if the question asks for a greatest or least whole number, which means you may need to round down or up appropriately after solving.
Hints
Figure out how much Kai can spend
He has $30 in credit and must still have at least $5 left. How much of his credit can he use on this one ride?
Write the cost in terms of miles
Let be the total miles of the ride. What expression gives the cost if the ride is miles within the first 15 miles at $1.20 per mile plus a $2 flat fee?
Account for the cheaper rate after 15 miles
Once the ride is longer than 15 miles, you must pay for the first 15 miles at $1.20 per mile, and only the extra miles at $0.80 per mile. Write a new expression that starts with the cost of 15 miles, then adds the cost for the miles beyond 15.
Use an inequality and think about whole numbers
Set your cost expression (for the longer-than-15-miles case) less than or equal to the maximum he can spend, solve for , and then decide what the largest whole number value of can be.
Desmos Guide
Represent the piecewise cost function
In Desmos, graph the two cost expressions as separate lines:
- Type
y = 2 + 1.2xand visually focus on . - Type
y = 8 + 0.8xand visually focus on . These together represent the ride cost for different distances.
Add the spending limit line
Type y = 25 to represent the maximum amount Kai can spend on the ride. This is a horizontal line.
Find the distance where the cost reaches the limit
Look at where the line y = 8 + 0.8x (the cost for rides longer than 15 miles) intersects the line y = 25. Click the intersection point and note the -value; this is the maximum distance (in miles) allowed in that region.
Choose the greatest whole number of miles
Use the -value from the intersection as an upper bound. Take the largest integer less than or equal to this -value; that is the greatest whole number of miles Kai can travel while keeping the cost at or below $25.
Step-by-step Explanation
Translate the money condition into a spending limit
Kai has $30 in ride credit and must still have at least $5 left after the ride.
So the maximum he can spend on this ride is
Any cost for the ride must be at most $25.
Define a variable and write the cost for the first 15 miles
Let be the total number of miles Kai travels.
For the first 15 miles, the cost is a flat $2 plus $1.20 per mile. If the ride were miles long and , the cost would be
However, because the price changes after 15 miles, we need a separate expression for when is greater than 15.
Write the cost expression when the ride is longer than 15 miles
If the ride goes more than 15 miles, then:
- The first 15 miles cost $1.20 per mile.
- Every mile after 15 costs $0.80 per mile.
First 15 miles cost:
Including the $2 flat fee, the starting cost at 15 miles is
For miles beyond 15, the additional cost is $0.80 per mile. So for miles total, the cost is
Simplify this:
Now use the spending limit: this cost must be at most $25:
Solve for :
So, when , the total miles must be at most .
Interpret the inequality and choose the greatest whole number
From the longer-ride case, Kai can travel up to 21.25 miles, but the problem asks for the greatest whole number of miles.
So we need the largest integer less than or equal to 21.25, which is 21.
Finally, check that this is consistent with the pricing:
- For 21 miles, use the formula: , which is less than or equal to $25.
Thus, the greatest whole number of miles Kai can travel is 21.