Piecewise Function Problem Clarification.

In summary, the hotel charges $95 per night for the first two nights and $55 per night for each additional night. The total cost T is a function of the number of nights x, where a = 95x for 0 < x < 2 and b = 55x + 80 for x > 2. When plugging in values for x, T(2) = $190, T(3) = $245, and T(5) = $415.
  • #1
ReddbullJesus
2
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
  • #2
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.
 
  • #3
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
 
  • #4
Thanks for the help. I got it right :)
 

Related to Piecewise Function Problem Clarification.

1. What is a piecewise function?

A piecewise function is a mathematical function that is defined by different equations for different intervals or "pieces" of the domain. It is often used to model real-world situations where there are different rules or conditions that apply.

2. What is the purpose of using a piecewise function?

The purpose of using a piecewise function is to accurately model a situation that involves multiple conditions or rules. It allows for more flexibility and precision in representing a real-world scenario.

3. How do you graph a piecewise function?

To graph a piecewise function, you will need to graph each individual piece separately on the appropriate interval. Then, you can combine the pieces to create the overall graph of the function.

4. How do you find the domain and range of a piecewise function?

The domain of a piecewise function is the combination of the domains of each individual piece. The range can be found by analyzing the graphs of each piece and determining the highest and lowest points on the overall graph.

5. Can you solve equations involving piecewise functions?

Yes, equations involving piecewise functions can be solved by isolating the variable and plugging in the appropriate equations for each piece based on the value of the variable. However, it is important to check if the solution is valid for the entire domain of the function.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
600
  • Calculus and Beyond Homework Help
Replies
30
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
917
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
758
  • Precalculus Mathematics Homework Help
Replies
3
Views
1K
Back
Top