Any function to determine profit is revenue - cost.
If the number of mattresses made is x, then the revenue made per mattress is 365x.
Under the same assumption, the cost per mattress is 254x + 9100, adding the setup costs to the cost per mattress.
Thus, the function is
![f(x) = 365x - (254x + 9100)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/zfh6d838a0skp8rrgvy2qaainytipvpx6n.png)
. We can simplify this function.
First, lets expand the negative (the same as multiplying each value by -1).
![f(x) = 365x - 254x - 9100](https://img.qammunity.org/2019/formulas/mathematics/middle-school/bmld7yt8miamb4sdivqvt17sgd3nu8uu5e.png)
Next, we'll combine like terms.
![f(x) = 111x - 9100](https://img.qammunity.org/2019/formulas/mathematics/middle-school/6ota6plyo7401247qfidmd0t8sh2qiv0fp.png)
Therefore, the function for profit is
![f(x) = 111x - 9100](https://img.qammunity.org/2019/formulas/mathematics/middle-school/6ota6plyo7401247qfidmd0t8sh2qiv0fp.png)
.
Continuing, we need to determine how many mattresses the company needs to break even. Breaking even means there is no profit, but also no loss. Otherwise, they make 0 total. So, we can set the function we just found to 0 and solve for x.
Set the function to 0.
![0 = 111x - 9100](https://img.qammunity.org/2019/formulas/mathematics/middle-school/l072beimc1v9ykxc4zl6ztblx1ubwzs14p.png)
Add 9100 to both sides.
![9100 = 111x](https://img.qammunity.org/2019/formulas/mathematics/middle-school/fm0cc7zokcxri4k30l8fw1cdl1asql1g5p.png)
Divide both sides by 111.
![81.98 = x](https://img.qammunity.org/2019/formulas/mathematics/middle-school/fzj0j9dsi72zw4fretscbddqqh6t5a4h5r.png)
Rounding this number up, it would take 82 mattresses to break even.