To determine the amount spent on marketing (x) that will achieve the maximum profit (P) for the given profit function \( P = -5x^2 + 1000x + 5000 \), we can find the vertex of the parabola represented by this quadratic equation.
The vertex of a quadratic function in the standard form \( ax^2 + bx + c \) can be found using the formula:
\[ x = -\frac{b}{2a} \]
Here, \( a = -5 \) and \( b = 1000 \).
Substituting these values into the formula gives:
\[ x = -\frac{1000}{2 \times -5} = -\frac{1000}{-10} = 100 \]
Thus, the amount spent on marketing to achieve the maximum profit is $100,000 (since x is in thousands of dollars).