<s>[INST] Manipulation of conditions of roots of a quadratic equation. How do I write $a^5+b^5$ in terms of $a+b$ and $ab$. Also is there any general way of writing $a^n+b^n$ in terms of $a+b$ and $ab$?
 [/INST] $$(a-b)^2=(a+b)^2-4ab$$ so that
$$a,b=\frac{a+b\pm\sqrt{(a+b)^2-4ab}}2.$$
Then
$$a^5+b^5=\left(\frac{a+b+\sqrt{(a+b)^2-4ab}}2\right)^5+\left(\frac{a+b-\sqrt{(a+b)^2-4ab}}2\right)^5$$ that you can evaluate by the binomial theorem (every other term will cancel out).

Let $m:=(a+b)/2,p=ab$, and after simplification,
$$\frac12(a^5+b^5)=m^5+10m^3\left(\sqrt{m^2-p}\right)^2+5m\left(\sqrt{m^2-p}\right)^4=16m^5-5mp^2-20m^3p.$$

For the general case,
$$\frac12(a^n+b^n)=\sum_{k=0}^{n/2}\binom n{n-2k}m^{n-2k}\left(\sqrt{m^2-p}\right)^{2k}=\sum_{k=0}^{n/2}\binom n{n-2k}m^{n-2k}\left(m^2-p\right)^{k}.$$
This is a polynomial in $m,p$.
</s>