I am struggling to figure out how after substituting $ P_2 $ how the resulting equation comes about. I guess I need a walk through of the actual algebra.
Starting equation: $ \gamma_1 P_1 + \gamma_2 P_2 = -\gamma_0$
I know $ P_2 = - (c_0 + c_1 P_1)/ c_2$
The textbook I am reading (Chiang, Fundamental Methods of Mathematical Economics) says the result for $P_1$ (from starting equation) after substituting in $P_2$ should be the following:
$ P_1^* = \frac{c_2 \gamma_0 - c_0 \gamma_2}{c_1 \gamma_2 - c_2 \gamma_1} $
I've been trying to solve this but I keep getting something different.
We can plug in the expression for $P_2$ into the first equation. \begin{align*} & \gamma_1P_1-\frac{\gamma_2}{c_2}\cdot \left(c_0+c_1\cdot P_1 \right)=-\gamma_0 & \\ &\textrm{Multipying out the brackets} & \\ & \gamma_1P_1-\frac{\gamma_2}{c_2}\cdot c_0-\frac{\gamma_2}{c_2}\cdot c_1\cdot P_1 =-\gamma_0 & \\ & \textrm{Term without } P_1 \textrm{ to the RHS} & \\ & \gamma_1P_1 -\frac{\gamma_2}{c_2}\cdot c_1\cdot P_1 =-\gamma_0+\frac{\gamma_2}{c_2}\cdot c_0 & \\ & \textrm{Factoring out } P_1 & \\ & P_1\cdot \left(\gamma_1-\frac{\gamma_2}{c_2}\cdot c_1\right) =-\gamma_0+\frac{\gamma_2}{c_2}\cdot c_0 & \\ & \textrm{Dividing the equation by the term in the brackets } & \\ & P_1 =\frac{-\gamma_0+\frac{\gamma_2}{c_2}\cdot c_0}{\gamma_1-\frac{\gamma_2}{c_2}\cdot c_1} & \\ & \textrm{Expanding the fraction by } c_2 & \\ & P_1^* =\frac{-\gamma_0\cdot c_2+\gamma_2\cdot c_0}{\gamma_1\cdot c_2-\gamma_2\cdot c_1} & \\ & \textrm{Finally multiply the numerator and the denominator by (-1) }\end{align*}