<s>[INST] Solve system using $1+j+j^{2}=0$ Exercise :
Solve the following system:
$$
(S):\begin{cases}
A+B+C=2^{n}  &  \\
A+j\;B+j^{2}\;C=(−1)^{n}\;j^{2n} & \\
A+j^{2}\;B+j\;C=(−1)^{n}\;j^{n} & \\
\end{cases}
$$ Using the coefficients $1,j,j^{2}$ and $1+j+j^{2}=0$
Solution :
\begin{aligned}
A&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}j^{2n}+(-1)^{n}j^{n}\right) \\
&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}2\cos\left( \dfrac{2n\pi}{3}\right)\right)\\
B&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}j^{2n+2}+(-1)^{n}j^{n+1}\right) \\
&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}2\cos\left( \dfrac{(2n+1)\pi}{3}\right)\right)\\
C&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}j^{2n+1}+(-1)^{n}j^{n+2}\right) \\
&=\dfrac{1}{3}\left( 2^{n}+(-1)^{n}2\cos\left( \dfrac{(2n-1)\pi}{3}\right)\right)\\
\end{aligned}
My question i can't  get the same solution as the book :
so here is my attempt using  Gaussian elimination (row reduction )
$$\fbox{$\forall j \in [|2,n|]\quad L_j \longleftarrow  L_j-\dfrac{a_{1,j}}{a_{1,1}}L_{1} $}$$
$$
S \iff 
\begin{cases} 
A+B+C=2^n \\
(j-1)B+(j^{2}-1)C=(-1)^{n}j^{2n}-2^n\\
(j^{2}-1)B+(j-1)C=(-1)^{n}j^{n}-2^n
 \end{cases}
\iff 
\begin{cases} 
A+B+C=2^n \\
(j-1)B+(j^{2}-1)C=(-1)^{n}j^{2n}-2^n\\
-2C=(-1)^{n}j^{n}-2^n-\dfrac{1}{(j-1)}\left((-1)^{n}j^{2n}-2^n \right)
 \end{cases}
 $$


*

*Could someone elaborate the calculation 

 [/INST] Hint: In order to get $A$ add all equations note that the coefficients of B and C will be equal to zero. So you directly get $A$. Then Multiply the second equation with $j$ and subtract the second and third equation, don't forget to plug in $A$.  
</s>