The price of a bag of candy is a linear function of the amount of candy in the bag. A bag containing 25 pieces costs $0.99 and a bag containing 100 pieces costs $3.99. Write the function that models this situation. Express your answer in y = mx + b form, using decimals. Round decimal values to the nearest hundredth.

Respuesta :

When two values are given for a linear function, it is easier to obtain the equation using the two-point form, namely
(y-y1)=m(x-x1)  where
m=slope=(y2-y1)/(x2-x1)
and
(x1,y1) and (x2,y2) are the given two points.

Here
(x1,y1)=(25,0.99), and
(x2,y2)=(100,3.99)
Find slope, m=(y2-y1)/(x2-x1)=(3.99-0.99)/(100-25)=3/75=0.04
Find equation:
(y-y1)=m(x-x1) 
(y-0.99)=0.04(x-25)
Expand and simplify:
y=0.04x-1+0.99 , simplify
y=0.04x-0.01..............................Function that models the situation