A Candy company makes 2 types of candy A & B for which the average costs are 2 & 3euros per kg respectively. $Q_a$ & $Q_b$ (a & b subscript) are the kg that can be sold each week and are given by the joint demand functions
$$\begin{align}- Q_a &= 400(P_b - P_a) \\ - Q_b &= 400(9+P_a-2P_b)\end{align}$$
Find the selling price (either $P_a$ or $P_b$) which will maximise profit (i`m guessing for that particularly candy only)
The profit equation is
$$ - \text{Profit} = P_a x Q_a = (P_a - 2)(400[P_b-P_a])$$
My answer to find (no clue what i`m doing tbh)
(the following are all partial differentiation)
$$\begin{align}^{\star\star}\frac{\partial(\text{Profit})}{\partial P_a} & = 400P_b - 800P_a + 800 \\ \frac{\partial^2(\text{Profit})}{\partial P_a\;^2} & = -800\\ \frac{\partial (\text{Profit})}{\partial P_b} & = 400P_a \\ \frac{\partial^2 (\text{Profit})}{\partial P_b\;^2} & = 400 \\ \frac{\partial (\text{this equation}^{\star\star})}{\partial P_b\;^2} &= 400\end{align}$$
Finding critical points using the 2 first derivations and making them equal to zero.
$$\begin{equation}\tag{1}0 = 400P_b + 800 - 800P_a \end{equation}$$ $$\begin{equation}\tag{2}0 = 400P_a - 800\end{equation}$$ (solved simultaneously) $\begin{align}P_a & = 2 \ P_b & = 2 \ \text{Critical point at }(P_a,P_b) &= (2,2)\end{align}$$
Then I used the equation $D(P_a,P_b) = (\text{derivative no1})*(\text{derivative no 2}) - (\text{derivative no 3})^2$
$D(2,2) = (-800)(400)-(400^2) = 160,000$
This doesn't make any sense to me....