## ineedhelp10 one year ago Erin buys gas at a self service station for $2.75 a gallon. The gas station has a promotion going on that anyone who buys more than 10 gallons of gas, only has to pay$2.50 per gallon. Erin's tank will hold 12 gallons of gas. a) Write a rule for the total cost, C(g), as a function of g gallons of gas. b)Graph the piecewise function c)What is the domain and range of the function in part a

1. ineedhelp10

2. jim_thompson5910

what do you have so far?

3. ineedhelp10

@jim_thompson5910 not much sir, i'm confused actually

4. jim_thompson5910

Erin buys gas at a self service station for $2.75 a gallon if Erin buys g gallons of gas, then how much does she spend? 5. ineedhelp10 how many gallons does Erin buy though? 6. jim_thompson5910 ok let's say she buys 5 gallons how much does she spend? 7. ineedhelp10 it'll be$13.75 then

8. jim_thompson5910

how did you compute that

9. ineedhelp10

by multiplying the number of gallons Erin was going to buy with the price that each gallon costs

10. jim_thompson5910

so in general, we can say 2.75*g or just 2.75g

11. jim_thompson5910

g is it the unknown number of gallons bought

12. ineedhelp10

okay yeah i understand that

13. jim_thompson5910

If the promotion wasn't there, then C(g) = 2.75g and that would be it. There wouldn't be a need for a piecewise function

14. jim_thompson5910

however, the promotion changes things C(g) = 2.75g is only true if $$\Large 0 \le g \le 10$$ anything larger than 10 will have a different price structure

15. ineedhelp10

so it wouldn't be just greater than? it's greater than or equal to right

16. ineedhelp10

so that'll be the rule for letter a?

17. jim_thompson5910

not the full rule

18. ineedhelp10

oh okay so then what else do we need?

19. jim_thompson5910

The gas station has a promotion going on that anyone who buys more than 10 gallons of gas, only has to pay $2.50 per gallon. what is the cost function if you buy more than 10 gallons of gas? 20. ineedhelp10 i seriously dont know D: 21. jim_thompson5910 same as before total cost = (price per gallon)*(number of gallons) keep the number of gallons as g the price will change 22. ineedhelp10 C(g)=2.50g 23. jim_thompson5910 what are the restrictions on g? 24. jim_thompson5910 do you pay$2.50 per gallon if you bought say, 8 gallons?

25. ineedhelp10

no, it's when you buy more than 10 gallons so wouldn't it be $0\le g \le 10$

26. jim_thompson5910

more like g > 10 if g > 10, then the cost function is C(g) = 2.50g

27. jim_thompson5910

now let's form the piecewise function

28. jim_thompson5910

Everything in blue $\Large \color{blue}{ \Large C(g) = 2.75g \text{ if } 0 \le g \le 10 \\ \Large \text{OR}\\ \Large C(g) = 2.50g \text{ if } g > 10 \\ }$ condenses to this piecewise function notation you see in red $\Large \color{red}{C(g)=\begin{cases}2.75g \text{ if } 0 \le g \le 10 \\ 2.50g \text{ if } g > 10 \end{cases}}$ The stuff in red is what most math books will use as piecewise function notation. The stuff in blue is more intuitive (at least to me), so it's good to know both forms.

29. jim_thompson5910

take a few moments to write down notes and process all this. I want to make sure you understand all this before we move on

30. ineedhelp10

ah okay i see what you did there, so basically what's in blue is the rule for the total cost correct?

31. ineedhelp10

and then what's in red is basically the rule for the total cost but more "like what textbooks would use" right

32. jim_thompson5910

yeah the cost function is either one or the other (pick one) and it's based on what g is if g is between 0 and 10, you pick the first one if g is greater than 10, you pick the second one

33. jim_thompson5910

correct, it's the formal mathematical way

34. ineedhelp10

ah okay this is making so much more sense now, okay im done taking notes now

35. jim_thompson5910

once you get to the red stuff, you are done with part a)

36. jim_thompson5910

37. ineedhelp10

yeah

38. jim_thompson5910

to graph a piecewise function, we simply graph each piece on the same xy axis so focus on just the first piece C(g) = 2.75g do you know how to graph that?

39. ineedhelp10

tbh no i dont how will you start it?

40. jim_thompson5910

think of it as y = 2.75x

41. jim_thompson5910

what kind of equation is that?

42. jim_thompson5910

hint: y = mx+b

43. ineedhelp10

it's slope intercept form right?

44. jim_thompson5910

yeah we have slope m = 2.75 and y intercept b = 0 do you see how I'm getting that?

45. ineedhelp10

yeah i see how plus i just graphed it on my calculator and it gave me the coordinates to graph.

46. jim_thompson5910

what two points are on this graph

47. ineedhelp10

two points are (1,2.75) and (2,5.5)

48. jim_thompson5910

good

49. ineedhelp10

and then the second one will be y=2.50x ?

50. jim_thompson5910

so normally, when you graph y = 2.75x, you draw a straight line through those two points

51. jim_thompson5910

however, there's a restriction on x in this case, $$\Large 0 \le x \le 10$$ is the restriction

52. ineedhelp10

so does that mean stop graphing when the x coordinate is at 10?

53. jim_thompson5910

so what that means is that you only graph the portion between x = 0 and x = 10 you erase everything else

54. jim_thompson5910

|dw:1442368336119:dw|

55. jim_thompson5910

|dw:1442368346952:dw|

56. jim_thompson5910

|dw:1442368378189:dw|

57. jim_thompson5910

make sense?

58. ineedhelp10

yeah it makes sense

59. ineedhelp10

and how will that be different for c(g)=2.50g

60. jim_thompson5910

now we plot closed circles at the endpoints because we are including the endpoints |dw:1442368517079:dw|

61. jim_thompson5910

then we move onto graphing y = 2.50x this is only graphed when x > 10

62. ineedhelp10

so how will that one look? that one looks more confusing

63. jim_thompson5910

so graph y = 2.50x like normal then erase the portion to the left of x = 10

64. ineedhelp10

wait you think you can draw an example of it please?

65. jim_thompson5910

what two points are on y = 2.50x

66. ineedhelp10

(1,2.5) and (2.5)

67. jim_thompson5910

(2,5) you mean?

68. ineedhelp10

yeah lol sorry that's what i meant

69. jim_thompson5910

plot the two points, draw a line through them that will get you the graph of y = 2.50x

70. jim_thompson5910

then erase the portion to the left of x = 10

71. ineedhelp10

that's whats confusing me when you say left of x=10 like where on the graph is that ?

72. jim_thompson5910

|dw:1442368737285:dw|

73. jim_thompson5910

|dw:1442368751023:dw|

74. jim_thompson5910

|dw:1442368771771:dw|

75. jim_thompson5910

|dw:1442368802811:dw|

76. ineedhelp10

ah okay so then the first point wouldn't be (10,25) right?

77. jim_thompson5910

you'll have this left over |dw:1442368832183:dw|

78. jim_thompson5910

yes

79. jim_thompson5910

there is an open circle at (10,25) because it is NOT included this is because there is no line under the > in g > 10 |dw:1442368915013:dw|

80. ineedhelp10

ah okay i get the graphing now

81. jim_thompson5910

let's put the two pieces together to form one single graph |dw:1442368938829:dw|

82. jim_thompson5910

here's what desmos shows https://www.desmos.com/calculator/oyvslmmg3f so it confirms things. The only thing missing is the open & closed circles at the endpoints

83. ineedhelp10

ah okay sounds good so far

84. ineedhelp10

what about the domain and range of the function in part a?

85. jim_thompson5910

tell me what you think the domain would be

86. ineedhelp10

will the domain be anything greater than or equal to 10? :///

87. ineedhelp10

no wait would it be 12 since that's how many gallons erin can hold in his car?

88. jim_thompson5910

you're forgetting the stuff lower than 10

89. ineedhelp10

can you explain the domain please

90. jim_thompson5910

you're right, she can only hold 12 gallons of gas so the domain would be the set of numbers between 0 and 12 the domain is the set of allowed numbers of gallons of gas that can be bought (in this specific case, just for Erin)

91. ineedhelp10

so it'll be $x \le 12$

92. jim_thompson5910

actually $\Large 0 \le g \le 12$

93. ineedhelp10

94. ineedhelp10

@jim_thompson5910 are you there still?

95. jim_thompson5910

sorry I went away from my computer for a moment

96. jim_thompson5910

do you see how I got that domain?

97. ineedhelp10

yeah i saw how now

98. ineedhelp10

im just confused on the range now

99. jim_thompson5910

what is the smallest value in the domain?

100. ineedhelp10

0

101. jim_thompson5910

plug that into C(g) to get ??

102. ineedhelp10

0 again

103. jim_thompson5910

so 0 is the smallest number in the range

104. jim_thompson5910

what is the largest number in the domain?

105. ineedhelp10

its 12

106. jim_thompson5910

if g = 12, then C(g) = ??

107. ineedhelp10

\$30 ?

108. jim_thompson5910

so the range spans from 0 to 30 (including both endpoints)

109. ineedhelp10

how will that look like when writing it down?

110. jim_thompson5910

well you can either say $\Large 0 \le y \le 30$ or $\Large 0 \le C(g) \le 30$

111. ineedhelp10

ah okay i get it now thanks soooooooooo much!! i really appreciate you taking time to help me out on this problem i appreciate it!

112. jim_thompson5910

I'm glad to be of help