Need Help solving a math problem

<p>I need to come up with an equation for this math problem. I have been trying for the past week and still I come up with nothing. If you know how to solve this problem please post it. </p>

<p>A train has a 200 passenger capacity. It cannot be charteered unless there are at leasdt 150 passengers. The cost of the trip is $540 per passenger, except that the train company agrees to reduce everyone's ticket price by $2 for each ticket that is sold in excess of 150. Let x be the number of tickets sold in excess of 150 and let f(x) be the total ticket income that the company will receive. Specify the domain, range, and maximum value of f(x).</p>

<p>Any help with this problem will be greatly appreciated.</p>

<ol>
<li><p>Note that the total #tickets sold is 150+x .
Now f(x) = total ticket income
= 'normal' income from $540/ticket - reduction because of special price
= 540(x+150) - (x+150)(2)(x)
= (x+150) (540 - 2x)
which simplifies to
- 2x^2 + 240x + 81000</p></li>
<li><p>Domain is all x values for which this function is defined, or
0 <= x <= 50 (since train capacity is 200, or 150+50).
The range is trickier; you need to evaluate f(0), f(50), as well as all min/max values of f(x) when 0 <= x <= 50, then choose the smallest & largest of all these values to define your range. We will come back to this.</p></li>
<li><p>Let y = f(x), to simplify the following equations.
To find max f(x), differentiate.
dy/dx = -4x + 240 , set this = 0
from which x=60 for a min <em>or</em> a max, we don't yet know which.
However, this is outside the domain 0 <= x <= 50, so there is no
local min or local max for f(x).</p>

<p>Now come back to the question of the range.
f(x) = - 2x^2 + 240x + 81000
At x=0, f(0) = 0 + 0 + 81000 = 81000
At x=50, f(50) = -2(50)(50) + (240)(50) + 81000
= -5000 + 12000 + 81000
= 88000.
Range is 81000 <-> 88000.
Max value of f(x) is 88000.</p></li>
</ol>