Suppose you have a lemonade stand, and when you charge $1 per cup of lemonade you sell 50 cupes. But when you raise your price to $2 you only sell 25 cups. Write an equation for the nuber of cups you sell as a function of the price you charge. Denote "C" for number of cups and "p" for the price you charge. Assume the function is linear.

c = m p + b

50 = m (1) + b
25 = m(2) + b
------------- subtract
25 = - m
m = -25 the slope
then
25 = -25 (2) + b
75 = b the intercept with cup axis
so
c = -25 p + 75

so if I charged nothing, I would give away 75 cups
and if I charged three, I would sell none :)

To write an equation for the number of cups sold as a function of the price charged, we need to find the relationship between the two variables based on the given information.

We have two data points:
1. When the price is $1, the number of cups sold is 50.
2. When the price is $2, the number of cups sold is 25.

Since we are assuming a linear relationship, we can use the slope-intercept form of a linear equation, which is y = mx + b, where "y" represents the dependent variable, "x" represents the independent variable, "m" represents the slope, and "b" represents the y-intercept.

In this case, we can let "C" represent the number of cups sold (dependent variable) and "p" represent the price charged (independent variable).

Let's use the first data point to find the slope:
When C = 50 and p = 1.
Using the slope formula: slope (m) = (y2 - y1) / (x2 - x1), we get:
m = (25 - 50) / (2 - 1) = -25

Now, we can use the slope and one of the data points to find the y-intercept (b).
Using the point-slope form of a linear equation: (C - y1) = m(p - x1), using the first data point (C = 50, p = 1), we get:
(C - 50) = -25(p - 1)
C - 50 = -25p + 25
C = -25p + 75

So, the equation for the number of cups sold (C) as a function of the price charged (p) is:
C = -25p + 75