Final answer:
To find the number of hotdogs John must sell to earn the most profit, we can use the profit function p = -x^2 + 76x + 87 and complete the square to find the maximum value. The value that maximizes the profit is x = 38, so John must sell 38 hotdogs.
Step-by-step explanation:
To find out how many hotdogs John must sell to earn the most profit, we need to determine the value of x that maximizes the profit function, which is represented by the equation p = -x^2 + 76x + 87.
To do this, we can use a technique called completing the square. First, let's rewrite the equation in the form p = -(x^2 - 76x - 87).
Now, we can complete the square by adding and subtracting the square of half the coefficient of x (in this case, 76/2 = 38). p = -(x^2 - 76x + 38^2 - 38^2 - 87).
Next, we can simplify this expression by combining like terms: p = -(x - 38)^2 + 1447.
Since the coefficient in front of the squared term is negative, the graph of this equation will be a downward-opening parabola. The maximum value of the profit will occur when the value inside the parentheses, x - 38, is equal to 0.
To find x, we set x - 38 = 0 and solve for x. x = 38.
Therefore, John must sell 38 hotdogs to earn the most profit.