# Help with some pricing thing?

Hey guys,

Quick q that my friend posed and am struggling with.

Imagine that something has a difference price for weekends and for weekdays. Imagine that differnce is x and that the price of weekdays is higher.

Say you know the average price for the month, the number of weekdays and weekend days.

How do you calculate the weekly price and the weekend price from available info?
Thanks alot!!

## Answers and Replies

This problem is easily solved via substitution method but as far as I read you need one more constant. If you give the exact numbers that you have it is easier to demonstrate. For examples sake I will make up some numbers. Lets say we know the following: 20 weekdays, 8 weekend days, average price is $15, and the difference in price is$7. You will need to setup 2 equations to solve with substitution. We will assign weekday price as X and weekend price as Y. Here are your 2 equations:
1)(20X+8Y)/28=15. That is 20 weekdays times the weekday price added to 8 weekend days times the weekend price, then divided by 28 total days gives you the avg of 15.
2)X-Y=7. That is weekday price minus weekend price is $7. Now we substitute. First we change one equation to solve for one variable, let's go with the second. I will add Y to both sides to rewrite the equation as X=7+Y. Now that I have one equation for X I will plug that into the first which will look like this: [20(7+Y)+8Y]/28=15 Now distribute the 20 and multiply both sides by 28 to get: 140+20Y+8Y=420, then combine like terms to get: 140+28Y=420, then subtract 140 from both sides to get: 28Y=280, then divide both sides by 28 to get: Y=10. Now you have your weekend price of$10. Plug that into your original 2nd equation to get:
X-10=7, then add 10 to both sides to get:
X=17.
Now you have X=17 and Y=10 which is your weekday and weekend prices.