Can I get some help solving this massive problem please? Thanks!

enter image source here

1 Answer

See below:

Explanation:

The gas company, regardless of how much gas you use in a single month, charges a monthly service charge of $8.80. No matter what, we have to pay that.

The gas company then has a 2-tier system of charging for gas - if you use 25 therms or less, you get charged $0.6686/therm. If you use more than the 25, you get charged a higher rate for every therm above the initial 25, $0.8587/therm.

25 therms

So in a month where we use 25 therms, we pay the monthly charge of $8.80, plus the therm charge, which is:

#25xx.6686=$16.715#

And so for the month we pay:

#$color(white)(0)8.80# - monthly charge
#ul($16.715# - per therm charge
#$25.515# - total charge for the month, which rounds to #$25.52#

45 therms

We know how much it costs for 25 therms - we've included the monthly charge and the therm charge (I'll use the unrounded figure here - no sense in giving the gas company an extra half cent!). And so what we need to know is the charge for the extra 20 therms. That's:

#20xx.8587=$17.174#

This gives us:

#$color(white)(0)8.80# - monthly charge
#$16.715# - per therm charge, first 25
#ul($17.174)# - per therm charge, 20 at the higher rate
#$42.689# - total charge for the month, rounded to #$42.69#

Function

This is a step function where #C# is the cost and #x# is the gas used per month. We can write it this way:

#x=|_(x>25, C=$25.515+$0.8587x)^(x<=25, C=$8.80+$0.6686x)#