Question 1164688
i believe you meant 40 hours rather than 400 hours.
a php is a philippine peso.
your function is as follows:
let x = the number of hours.
let y = the number of philippine pesos.


y = 150 * x for 0 <= x <= 40
y = 150 * 40 + 170 * (x - 40) for 40 < x <= 50
y = 150 * 40 + 170 * 10 + 1.5 * 150 * (x - 50) for x > 50


simplify these equations to get:


y = 150 * x for 0 <= x <= 40
y = 6000 + 170 * (x - 40) for 40 < x <= 50
y = 7700 + 225 * (x - 50) for x > 50


to use these equations, you have to know the total hours worked.


for example:


if you worked 30 hours, then your pay is 150 * 30 = 4500 pesos.


if you worked 45 hours, then your pay is 6000 + 5 * 170 = 6850 pesos.


if you worked 72 hours, then you pay is 7700 + 225 * 22 = = 12650 pesos.


to confirm this is correct, then just break it down into its constituent parts and calculate each separately.


when you worked 30 hours, the pay is 150 * 30 = 4500 pesos.


when you worked 45 hours, you got payed 40 * 150 plus 5 * 170 = 6850 pesos.


when you worked 72 hours, you got payed 40 * 150 plus 10 * 170 + 22 * 225 = 12650 pesos.


a graph of the function would look like this:


<img src = "http://theo.x10hosting.com/2020/091203.jpg" >


                                                                                                                   
you can see that the slope of the graph changes after x = 40 and changes again after x = 50.


the formula for slope is (y2-y1) / (x2-x1)


that's the change in y divided by the corresponding change in x.


the slope from x = 0 to x = 50 is 6000 / 40 = 150.


the slope from x = 40 to x = 50 is (7700 - 6000) / 10 = 170.


the slope from x = 50 to x = 80 is (14450 - 7700) / 30 = 225.


these slopes are the same as the hourly wages within those intervals of x.