Question: How to equate coefficients?

How equating the coefficient in the same power of x  

diff(u(x), x) = 1+int(u(t), t = 0 .. x), u(0) = 0

intE1 := subs({u(t) = sum(a[i]*t^i, i = 0 .. 3), u(x) = sum(a[i]*x^i, i = 0 .. 3)}, intE);
intE2 := eval(intE1);
intE3 := collect(intE2, x);
ans := zip(`=`, [coeffs(lhs(intE3)-rhs(intE3), [x, x^2, x^3, x^4], 't')], [seq(0, i = 1 .. nops([t]))]);

Shows me wrong I also want to find values of a[1] and a[2] and a[3] and a[4] without using my hand and from the initial condition a[0]=0?

Please Wait...