Lyle is replacing light bulbs in his apartment.

He is using energy-saving bulbs and regular bulbs, and wants to use 21 or fewer bulbs
altogether.
He wants no more than 18 energy-saving bulbs and at least 2 regular bulbs.
The energy-saving bulbs cost $5.95 each, and the regular bulbs cost $7.85 each.
What is the most Lyle can spend on replacement bulbs? How many of each will be use?

1 answer

s </= 18
r >/= 2
cost = 5.95 s + 7.85 r
s + r </= 21
maximize cost (for some reason) (so use all expensive ones but not to jump to conclusion)
graph it, I did s hor (x axis) and r vertical (y axis)
below line sloping down from (0,21) to ( 21,0) which is is r =21 - s
left of (18,0)
above r = 2
useful intersections are (0,21) and the intersection of s = 18 and r = 21-s
which is (18,3)
calculate
cost = 5.95 s + 7.85 r
at those two points and pick the higher one (obviously regular = 21)
I suspect a typo but gave you the method anyway.