I came across this question on a test.

A video game store sells video games for \$30 each. The store has a coupon for $9 off the total purchase for up to 10 games.

Determine the equation of the function that describes the relationship between the total cost and the number of video games a customer buys.

I am in grade 11 and with the things we learned, I don't think there is a way to solve this. In code, I can figure out an easy way of solving this by using if statements. I am not sure about how to solve this in math?

I was thinking:

Let c be total cost
Let g be one game
c = g(30) - 9

But that would not work for more than the discount.

How would one go about doing this?

Please help. Thank you.

  • $\begingroup$ Why would it not work? $\endgroup$
    – suomynonA
    Commented Oct 5, 2016 at 0:17

1 Answer 1


I think your answer is correct and that the question is confusing. As it's written, the calculation of the discount doesn't depend at all on how many games you buy, as long as you buy at least one. The "up to 10 games" has no effect. So yes, the equation is $$ c = 30g -9 . $$

That's a better way to write it than $g(30)$, and you should probably say "let $g$ be the number of games".

If the question said there was a coupon of $10 per game for up to 10 games (rather than for the total) then you would indeed have to write a formula with an implicit "if":

$$ c = \begin{cases} 21g & (1 \le g \le 10) \\ 210 + 30(g-10) & (10 < g) \end{cases} $$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .