How to maximize the profit for the given equation It is a maximize profit question. Basically: 


*

*There is a play which costs $180$

*Each attendee costs $0.4$

*Ticket price affects the overall attendance. When the ticket price is $5$, then there are $120$ attendees. If the ticket price is lowered by $0.1$, then there are $15$ more attendees.


How can I model this problem? 
How can I maximize the profit? I believe it has something to do with derivatives, but I don't know how to approach it.
 A: Fixed cost of the play is $180$, variable cost is $0.4$ by attendee.
Total cost is the fixed cost plus the variable cost multiplied by the number of attendees:
$$c=180+0.4n$$
You can express the number of attendees as a function of ticket price:
$$n=120+15\times\frac{5-p}{0.1}$$
Total revenue is the ticket price multiplied by number of attendees:
$$r=pn$$
Profit is the total revenue minus the total cost:
$$
\begin{align}
 \pi&=r-c\\
 \pi&=pn-(180+0.4n)\\
 \pi&=pn-180-0.4n\\
 \pi&=(p-0.4)n-180\\
 \pi&=(p-0.4)\left(120+15\times\frac{5-p}{0.1}\right)-180\\
 \pi&=-150p^2+930p-528
\end{align}
$$
You get a quadratic function of profit depending on the ticket price, whose maximum you can easily get by calculating the coordinates of the vertex of the quadratic parabola described by the function:
$$
V\left(-\frac{b}{2a},\frac{b^2-4ac}{4a}\right)
$$
In this case, the profit reaches its maximum of:
$$\pi=\frac{b^2-4ac}{4a}=\frac{930^2-4(-150)(-528)}{4(-150)}=913.5$$
at the ticket price of:
$$p=-\frac{b}{2a}=-\frac{930}{2(-150)}=3.1$$
