Lowset[expr,coef,exporder,expmax] returns the list of coefficients in expr expressed by coef indexed from 0 to exporder-1. Lowset is a convenience function when working with series, a typical expr.
Lowset[expr_,coef_,exporder_Integer,expmax_Integer]:=
Module[{tx,i,sx = {},found = -1},
tx = Expand[Normal[expr]];
For[i = 0 , i <= expmax , i++ ,
If[FreeQ[tx,coef[i]] , , found++];
If[found >= exporder,
Break[],
AppendTo[sx,coef[i]]]];
sx]
Manually solve the differential equation
Example.
about the ordinary point t=0 using an infinite series with terms through the tenth-degree.
eq = y''[t] + t^2 y[t] == 0
y[t_] = PowerSeries[t,a,10]
coeffs = Solve[eq,Highset[y[t],a,2,10]]
sol = (y[t] /. coeffs)[[1]]
Collect[Normal[sol],Lowset[sol,a,2,10]]