Piecewise Function Problem Clarification.

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 12K views
ReddbullJesus
Messages
2
Reaction score
0

Homework Statement


A hotel chain charges $95 each night for the first two nights and $55 for each additional nights stay. The total cost T is a function of the number of nights x that a guest stays.

(a) Find the expressions for a and b in the piecewise function

(b) Find T(2), T(3), and T(5)

Homework Equations



T(x)={a if 0 <_ x <_ 2
b if x > 2

The Attempt at a Solution



I figured the expression for a is a = 95x. Now, webassign.com says b = 55x + 80. I originally had 55x + 190, but now I understand why that is wrong. However I don't understand why its 80? How did it arrive there?

For the second part I know to just plug in 2 into equation a and 3 and 5 into equation b for x.

Thanks in advance for the help
 
Physics news on Phys.org
ReddbullJesus said:
I figured the expression for a is a = 95x. Now, webassign.com says b = 55x + 80. I originally had 55x + 190, but now I understand why that is wrong. However I don't understand why its 80? How did it arrive there?

The reason 55x + 190 is wrong is because you're forgetting that the $55 charge is applied after the first two nights.

For 3 nights, it's $190 plus $55 times 1 additional night.

For 4 nights, it's $190 plus $55 times 2 additional nights.

So for x nights, it's 190 plus 55 times (x -2) additional nights, or 55(x - 2) + 190. Hopefully you can get the correct expression for b.
 
ReddbullJesus said:

Homework Statement


A hotel chain charges $95 each night for the first two nights and $55 for each additional nights stay. The total cost T is a function of the number of nights x that a guest stays.

(a) Find the expressions for a and b in the piecewise function

(b) Find T(2), T(3), and T(5)


Homework Equations



T(x)={a if 0 <_ x <_ 2
b if x > 2

The Attempt at a Solution



I figured the expression for a is a = 95x. Now, webassign.com says b = 55x + 80. I originally had 55x + 190, but now I understand why that is wrong. However I don't understand why its 80? How did it arrive there?
.
"55x+ 190" would be correct if x were the number of nights past 2. But x is the total number of nights. He pays 95 dollars for each of the first two nights, for a total of $190, then pays $55 for each of the x- 2 nights after the first 2. The total for x nights would be 190+ 55(x- 2)= 190+ 55x- 110= 55x+ 80.

For the second part I know to just plug in 2 into equation a and 3 and 5 into equation b for x.
Yes, that is correct. For 2 nights, the cost is 2(95)= $110. For 3 nights you can use either:
1) 55(3)+ 80= 165+ 80= $245 or
2) 190 for the first 2 nights and then 55 for the third night = 190+ 55= $245.

and do the same for 5 nights.

Thanks in advance for the help
 
Thanks for the help. I got it right :)