your number of meals sold is represented by (35 + 5x)
your profit per meal sold is equal to (30 - 2x)
your total profit is represented by y
your equation is:
y = (35 + 5x) * (30 - 2x)
each time x increments by 1, the number of meals sold increments by 5 and the profit decrements by 2.
this is in keeping with the problem statement.
what you will get is a quadratic function whose graph looks like this:
a table of values shows the following:
x y
0 1050
1 1120
2 1170
3 1200
4 1210
5 1200
6 1170
7 1120
8 1050
.....
the maximum value of this quadratic function is when x = 4 and y = 1210
you can find this by looking at the graph or by using the formula for the maximum / minimum point of a quadratic function.
set your quadratic function equal to 0 and you get:
(35 + 5x) * (30 - 2x) = 0
multiply these 2 factors together and you get:
-10x^2 + 80x + 1050 = 0
since the standard form of the quadratic equation is:
ax^2 + bx + c = 0, you get:
a = -10
b = 80
c = 1050
the max/min point can be found as follows:
x = -b/21 = -80 / -20 = 4
when x = 4, the function is equal to 1210 because:
-10(4^2) + 80(x) + 1050 = 1210
your maximum point on the graph is when x = 4 and y = 1210.
this can be seen from the graph.
a horizontal line was placed at y = 1210 to show you exactly where the maximum value of y on the graph would be.
this was a little difficult to figure out because x doesn't really represent anything.
it's just an increment.
once you realize that, you can then show that the number sold will be equal to 35 + 5x and the profit for each will be equal to 30 - 2x.
the total profit is equal to their product because number sold time profit for each is equal to total profit.
total profit is a quadratic function which is shaped like a parabola and has a maximum or minimum point.
based on the graph, you can see that when x is negative, total profit is still valid.
example:
when x = -5, number sold = 35 - 25 = 10 and profit for each = 30 + 10 = 40 which makes total profit equal to 10 * 40 = 400.