Another, and I think simpler way, to find a basis for
U={p(x)=a0+a1*x+a2*x^2+a3*x^3+a4*x^4; a1+a2+a3+a4=0, a1+a2+2a3+2a4=0, a0+a1=a3+a4} is to set up the equations in matrix form:
[ 1 1 0 -1 -1] (a0+ a1- a3- a4= 0)
[ 0 1 1 1 1] (a1+ a2+ a3+ a4= 0)
[ 0 1 1 2 2] (a1+ a2+2a3+2a4= 0)
and row reduce to
[1 0 -1 0 0]
[0 1 1 0 0]
[0 0 0 1 1]
which shows that we must have a0= a2, a1= -a2 and a3= -a4.
Notice that the 5 coefficients actually depend on 2 values: a2 and a4. That's reasonable, we had 3 equations connecting them so the "degrees of freedom" are reduced from 5 to 5-3= 2.
If we take a2= 1, a4= 0, a0= 1, a1= -1, a3= 0 and one basis vector is 1- x+ x<sup>2</sup>.
If we take a2= 0, a4= 1, a0= 0, a1= 0, a3= -1 so another basis vector is -x3+ x4.
A basis for U is {1- x+ x2,-x3 x4}.
For V=L{x^3-x^2+x, x^4+1}, if I interpret this correctly, this is the suspace generated by x3- x2+ x and x4+ 1. Since those two "vectors" are independent (they have different order so one is not a multiple of the other), they constitute a basis for V.
A basis for V is {x3- x2+ x,x4+ 1}.
If by "U+ V" you mean the direct sum of the two subspaces, then a basis for U+ V is "generated by" the union of bases for U and V separately. "Generated by" meaning that the union may not be independent so you have to drop any "redundant" vectors.
The way I would do that is set up the matrix
[1 -1 1 0 0] (1- x+ x2)
[0 0 0 -1 1] (- x3+ x4)
[0 1 -1 1 0] (-x2+ x3)
[1 0 0 0 1] (1+ x4)
and row-reduce to
[1 0 0 0 0]
[0 1 -1 0 0]
[0 0 0 1 -1]
[0 0 0 0 0]
That last "[0 0 0 0 0]" row tells us that the four vectors were not independent and so a basis for the direct sum of U and V is { 1, x- x2, x3- x4}.
I don't know what you mean by U?V. I guess you used a character that did not "translate" properly. The union of two suspaces is not, in general, a subspace. The intersection of two subspaces is a subspace. In this case, since the four vectors from the 2 separate bases are not independent, the intersection of the two subspaces is a one dimensional subspace so a basis will consist of a single vector. I'll leave it to you to find a vector that is in both U and V.