## Example

Zach and Yann compete in the market for coffee beans. The price follows $$P = 1000 - 2 Q = 1400 - 2 \left( Q_Z + Q_Y \right)$$ where `Q_Z` denotes Zach's quantity, and `Q_Y` denotes Yann's quantity.

### Zach's profit

Zach's revenue function is \begin{align*} R_Z &= PQ_Z \\ &= \left( 1400 - 2 \left( Q_Z + Q_Y \right) \right) Q_Z \\ &= 1400 Q_Z - 2Q_Z^2 - 2 Q_Y Q_Z \end{align*}

Zach's cost function is $$C_Z = 200 Q_Z$$

So Zach's profit function is \begin{align*} \pi_Z &= R_Z - C_Z \\ &= 1400 Q_Z - 2Q_Z^2 - 2 Q_Y Q_Z - 200 Q_Z \\ &= 1200 Q_Z - 2Q_Z^2 - 2 Q_Y Q_Z \end{align*}

### Yann's profit

Yann's revenue function is \begin{align*} R_Y &= PQ_Y \\ &= \left( 1400 - 2 \left( Q_Z + Q_Y \right) \right) Q_Y \\ &= 1400 Q_Y - 2Q_Z Q_Y - 2 Q_Y^2 \end{align*}

Yann's cost function is $$C_Y = 200 Q_Y$$

So Yann's profit is \begin{align*} \pi_Y &= R_Y - C_Y \\ &= 1400 Q_Y - 2Q_Z Q_Y - 2 Q_Y^2 - 200Q_Y \\ &= 1200 Q_Y - 2Q_Z Q_Y - 2 Q_Y^2 \end{align*}

### Question

The price for coffee follows `P = 29 - 15 Q`.

Zach's marginal cost is equal to 11, and Yann's marginal cost is 26.

In function of `Q_Z` and `Q_Y`, what is Zach's revenue? What is his cost? What is his profit?

In function of `Q_Z` and `Q_Y`, what is Yann's revenue? What is his cost? What is his profit?

Zach's revenue: $$ \begin{align*} R \left( Q_Z \right) &= P Q_Z \\ &= \left( 29 - 15 ( Q_Z + Q_Y ) \right) Q_Z \\ &= \left( 29 - 15 Q_Z - 15 Q_Y \right) Q_Z \\ &= 29 Q_Z - 15 Q_Z^2 - 15 Q_Y Q_Z \end{align*} $$

Zach's cost: $$ 11 Q_Z $$

Zach's profit: $$ \pi \left( Q_Z \right) = 29 Q_Z - 15 Q_Z Q_Y - 15 Q_Z^2 - 11 Q_Z $$

Yann's revenue: $$ \begin{align*} R \left( Q_Y \right) &= P Q_Y \\ &= \left( 29 - 15 ( Q_Z + Q_Y ) \right) Q_Y \\ &= \left( 29 - 15 Q_Y - 15 Q_Z \right) Q_Y \\ &= 29 Q_Y - 15 Q_Y^2 - 15 Q_Z Q_Y \end{align*} $$

Yann's cost: $$ 26 Q_Y $$

Yann's profit: $$ \pi \left( Q_Y \right) = 29 Q_Y - 15 Q_Y Q_Z - 15 Q_Y^2 - 26 Q_Y $$