Given C(x) = 680 + 4x + 0.01x^2 and demand is p(x) = 12 - x/500, find the value of x that will maximize profit.

I assume that I somehow need to find the minimum for C(x) and the max for p(x), but I'm not sure if I somehow have to combine the two or something, or if the x has to be the same for both functions...