I'll do a similar but different problem: (I am going to elaborate a bit on SK's excellent example.)
if linear demand function yields demand of 20000 units at a price of $5.00, and demand is 11000 units at a price of $14.00, what is the maximum revenue that can be generated?
First we need to establish price-demand equation. (d and p in thousands) SK meant to say d in thousands.
(14 -p)/(14-5) = (11 - d)/(11-20) He uses the information given about the demand function to develop a functional relationship between quantity demanded and sales price. That information is that the function is linear plus two points on the line are given.
p = 25 - d It is standard in modern economics to treat demand as the dependent variable and price as the independent variable so most economists would write this as d = 25 - p. This makes intuitive sense because d falls as p goes up. Of course both expressions lead to the same arithmetic results.
Then
R(evenue) = d * p = d(25-d)
This is a parabola (upside down) with vertex at d = 25/2 (maximum R)
R[sub:3k6xvs9u]max[/sub:3k6xvs9u] = 25/2 (25 - 25/2) = 625/4 = 156.25
Maximum revenue = $156,250
An alternative and more general method once demand is specified as a function of price is to use calculus.
R = d * p = (25 - p) * p = 25p - p[sup:3k6xvs9u]2[/sup:3k6xvs9u]. You have a a revenue function in terms of p, which is the standard way that economists now show it.
To maximize R, we find where the derivative equals zero.
dR/dp = 25 - 2p.
dR/dp = 0 when p = 12.5.
When p = 12.5, R = 25p - p[sup:3k6xvs9u]2[/sup:3k6xvs9u] = (25 * 12.5) - 12.5[sup:3k6xvs9u]2[/sup:3k6xvs9u] = 12.5(25 -12.5) = 12.5[sup:3k6xvs9u]2[/sup:3k6xvs9u] = 156.25.
Maximum revenue = $156,250. This is the same as SK's answer, but it uses the method most common in economics since the time of Jevons.