<s>[INST] Working out the value of $a^4+b^4$ If $ab = 2$ and $a+b = 5$ then calculate the value of $a^4+b^4$
My approach:
$$a^4+b^4 = (a+b)^4-4a^3b-6a^2b^2-4ab^3$$
$$=(5)^4-6(ab)^2-4ab.a^2-4ab.b^2$$
$$=(5)^4-6(24)-4ab(a^2-b^2)$$
$$=(5)^4-6(24)-8(a+b)(a-b)$$
$$=(5)^4-6(24)-8(5)(a-b)$$
I am a little stuck now and any help will be appreciated.
 [/INST] Use $a+b=5$ to write  $b$ in terms of $a$: $$b=5-a$$ Then substitute this for b in the other equation and solve for $a$:
$$a(\overbrace{5-a}^{b}) =2\iff 5a-a^2=2\iff a^2-5a+2=0\iff a=\frac52\pm\frac12\sqrt{17}$$
(using the quadratic formula). Since the original equations were symmetric in $a$ and $b$ (you could have solved for $b$ instead and arrived at exactly the same values), these two numbers (the $\pm$) are the values of $a$ and $b$:
$$a=\frac52\pm\frac12\sqrt{17} \textrm{ and } b=\frac52\mp\frac12\sqrt{17}$$
Since this is homework, I will leave it up to you to compute that
$$a^4+b^4 = \boxed{433}$$
given these values of $ a$ and $b$.
</s>