Question 1102716: In 2014, the cost of a first class postage stamp was $0.49. Weight is in ounces and cost is in dollars. The ordered pairs listed are (1,0.49),(2,0.70),(3,0.91), and (3.5, 1.12). Write a function to represent the cost of mailing a stamped letter that weighs between 0 and 3.5 ounces. What type of function is it?
Answer by greenestamps(13200) (Show Source):
You can put this solution on YOUR website!
Your statement of the problem doesn't make it clear; but in fact this function is a step function. The given data points tell us
1 ounce --> 49 cents
2 ounces --> 70 cents
3 ounces --> 91 cents
3.5 ounces --> $1.12
The first three data points make this look like a linear function -- specifically, where x is the weight in ounces of the letter. However, the cost of mailing a letter weighing (for example) 2.35 ounces is 91 cents, not 28+2.35(21)=77.35 cents.
The step function (a piecewise function) giving the cost of postage for mailing a letter weighing between 0 and 3.5 ounces is
C = .49, if 0<=x<1;
C = .70, if 1<=x<2;
C = .91, if 2<=x<3;
C = 1.21, if 3<=x<=3.5
You could write this function without using a piecewise function by using the floor function, where floor(x) is the largest integer less than or equal to x:
C = .49 + .21*floor(x)
|
|
|