<s>[INST] Solving a system of equations: I am having problems solving a system of equations I haven't run into a system quite like this before and I am looking for some help, thanks!
$$a(1+\sqrt3)^2+b(1-\sqrt3)^2=3$$ $$a(1+\sqrt3)^3+b(1-\sqrt3)^3=8$$
How can I solve for $a$ and $b$?
 [/INST] Write it as a system $Ax=v$ with $v=(3,8)^T$, $x=(a,b)^T$ and
$$
A=\begin{pmatrix} (1+\sqrt{3})^2 & (1-\sqrt{3})^2 \cr
(1+\sqrt{3})^3 & (1-\sqrt{3})^3\end{pmatrix}   
$$
Since $\det(A)=-8\sqrt{3}\neq 0$, the inverse $A^{-1}$ exists, so the unique solution is 
$$
\begin{pmatrix} a \cr b \end{pmatrix}=x=A^{-1}v=\frac{1}{4\sqrt{3}}\begin{pmatrix} 9-5\sqrt{3} \cr 15+9\sqrt{3} \end{pmatrix}
$$.
</s>