<s>[INST] Given $x+y$ and $x\cdot y$, what is $x^3+ y^3$ ? I have been looking at an assortment of high school number sense tests and I noticed a reoccurring problem that states what x+y is and what $x\cdot y$ is then asks for $x^3+ y^3$. I want to know how to work these problems. I have a couple of examples.
$x+y=5$ and $x\cdot y=1$, then $x^3+y^3=?$ [key says 110]
$x+y=-1$ and $x\cdot y=2$, then $x^3+y^3=?$ [key says 5]
$x-y=-1$ and $x\cdot y=2$, then $x^3 -y^3=?$ [key says -7]
$x+y=\frac{1}{3}$ and $x\cdot y=\frac{1}{9}$, then $x^3+y^3=?$ $\left[-\dfrac{2}{27}\right]$
 [/INST] If the problem cannot be reduced to the symmetric case then Groebner basis can be used to solve the problem. But the calculation by hand is very cumbersome so I use Maxima and got the following output. poly_reduced_grobnercalculates a Groebner base and poly_pseudo_dividedoes the division. The first element of the result list is the list of coefficients the second and the third are the numerator and the denomiantor of the remainder. This is the number we are looking for.
  (%i4)                            load(grobner)
  Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
  (%i5) poly_reduced_grobner([-5+y+x,x*y-1],[x,y])
  (%o5) [y+x-5,y^2-5*y+1]
  (%i6) poly_pseudo_divide(y^3+x^3,%,[x,y])
  (%o6) [[y^2-x*y-10*y+x^2+5*x+25,15],110,1,7]
  (%i7) poly_reduced_grobner([1+y+x,x*y-2],[x,y])
  (%o7) [y+x+1,y^2+y+2]
  (%i8) poly_pseudo_divide(y^3+x^3,%,[x,y])
  (%o8) [[y^2-x*y+2*y+x^2-x+1,-3],5,1,7]
  (%i9) poly_reduced_grobner([1+y+x,2+x*y],[x,y])
  (%o9) [y+x+1,y^2+y-2]
  (%i10) poly_pseudo_divide(y^3+x^3,%,[x,y])
  (%o10) [[y^2-x*y+2*y+x^2-x+1,-3],-7,1,7]
  (%i11) poly_reduced_grobner([(-1)/3+y+x,x*y-1/9],[x,y])
  (%o11) [3*y+3*x-1,9*y^2-3*y+1]
  (%i12) poly_pseudo_divide(y^3+x^3,%,[x,y])
  (%o12) [[9*y^2-9*x*y-6*y+9*x^2+3*x+1,3],-2,27,7]

</s>