Suppose that Coke and Pepsi are the only firms producing cola. Their products are not identical, but are very close substitutes. Let $P_c$ denote the price of Coke and $P_p$ the price of Pepsi. Demand for Coke depends on both of these prices. Likewise, demand for Pepsi depends on both prices too.
let the demand function for coke be $Q_c=10-P_c+\frac12P_p$ and $TC(Q_c)=\frac12Q_c^2$
and equally for pepsi $Q_p=10-P_p+\frac12P_c$ and $TC(Q_p)=\frac12Q_p^2$
Now, assuming that the firms choose prices (rather than quantities), calculate the Nash equilibrium price levels and the total consumption of cola in the market.
So what I did considering that I'm after a Bertrand equlibrium is finding the reaction functions of each firm, to do so I first find the profit function of each one of them and then I do the first order condition for profit maximization for each one of them so profits are for coke = $(10-P_c+\frac12P_p)(p-Q_c)$ and equally for pepsi $(10-P_p+\frac12P_c)(p-Q_p)$
and the FOC are $\frac12 P_p-2P_c+Q+10=0$ and then the reaction function for coke is $P_c=(-10-Q-\frac12P_p)/2 \implies P_c= -5-\frac12 Q - \frac14 P_p$
and equally for pepsi $Pp= -5-\frac12 Q- \frac14 P_c$.
So now to find the price I equal both equations $P_p =-20-2Q-4P_c$ so $-5-\frac12 Q -\frac14 P_c =-20 -2Q -4P_c$
and I solve for $P_c$ getting as a result $-4-0.4Q=X$
I don't know where I have made the mistake but this results doesn't look right, I suspect that there is something to do with the marginal cost derived from TC, but I'm sure that the derivative of the TC is Q, so not sure, any help would be most appreciated .
and sorry for the lack of formatting...
Profit is $q(p-AC)$ where $AC$ is average cost. $AC=\frac{TC}{q}$, so here it is $\frac{1}{2}q$.
Coke solves:
$\max_{p_c} \pi_c = p_c \cdot q_c - q_c \cdot AC = q_c(p_c-q_c/2)= q_c\cdot p_c - q_c^2/2$
Here we have a little algebra now to do in subbing $q_c$:
$\max_{p_c} 10p_c-p_c^2+\frac{1}{2}p_p\cdot p_c -\frac{1}{2}(10-p_c+\frac{1}{2}p_p)^2 $
Keep going - we're getting there!
$\max_{p_c} 10p_c-p_c^2+\frac{1}{2}p_p\cdot p_c -\frac{1}{2}(100-10p_c+5p_p-10p_c+p_c^2-\frac{1}{2}p_c\cdot p_p+5p_p-\frac{1}{2}p_c \cdot p_p + \frac{1}{4}p_p^2) $
Grouping and simplifying gives:
$\max_{p_c} 20p_c -\frac{3}{2}p_c^2 + \frac{3}{2}p_c\cdot p_p -5p_p - \frac{1}{8}p_p^2-50 $
Finally we can take the FOC. $20-3p_c^*+\frac{3}{2}p_p=0 \Leftrightarrow p_c^*=\frac{20+\frac{3}{2}p_p}{3}$.
By symmetry, we can argue the same exact thing but reversed for pepsi. Then, plugging one into the other and solving:
$p_c^*=\frac{20+\frac{3}{2}\frac{20+\frac{3}{2}p_c^*}{3}}{3} \Leftrightarrow p_c^* = p_p^* = \frac{40}{3}$
Then $q_c=q_p=10-\frac{40}{3}+\frac{1}{2}\frac{40}{3} = \frac{10}{3}$. Total consumption is then $\frac{20}{3}$.
Unless I've made an algebra error, that should be correct. Do you understand why we use average cost not marginal cost? The idea is that you need to subtract total cost from the profit function. But total cost is $q \cdot AC$ not $q \cdot MC$.