The profit up to 9800 is $49000.
Beyond that now, the profit drops by $0.0003 for each additional bottle.
So, for first bottle (after 9800), the profit is $4.9997
For the second (after 9800), the profit is $4.9994
The profit of the nth bottle (after 9800) is thus given by
The sum of profit for the bottles beyond 9800 is then given by:
So, the total profit becomes:
Now, to find the maximum, we find the derivative and set to zero.
Well, since it's not an integer let's test both the lower and upper integers.
When n = 16666, P = $90664.1667
When n = 16667, P = $90664.1666
Uh... well... the difference is so small that it is found to a hundredth of a cent...
But you got your answer. I derived the profit formulae from the arithmetric progressions formulae and modified them to suit the situation.