I have the following equation,
equation= x''[t]+a*x'[t]+b*x[t]+c*y[t]+d*u[t]+e*v[t]+Sum[f[i]*x[t]+g[i]*u[t]+h[i],{i,1,n}]+k
When I collect the coefficient of each x[t] derivatives, x[t],y[t], u[t] and v[t] the correct answer should be
{ 1,a,b+sum[f[i],{i,1,n}],c,d+sum[g[i],{i,1,n}],e,k+sum[h[i],{i,1,n}]}
However when I use Coefficient[] function for each variable, I can get answer mostly correct except that I am not getting b+sum, d+sum, and k+sum. This is because Collect function is unable to separate sum from x[t],u[t] and constant. Is it possible to separate sum from variable[t]? How to collect coefficient that has summation formula?