but i dont know how to deal with the remainders
there squaring of them etc..
Apply L'Hopital a few times.
You will get limit x-> 0
(1/6)*((-3*E^x*(-2 + x)*(-1 + x)*Cos[x/E^x] -
3*E^(5*x)*(1 + x)*(2 + x)*Cos[E^x*x] -
E^(2*x)*(-3 + x)*Sin[x/E^x] + (-1 + x)^3*Sin[x/E^x] +
E^(6*x)*(1 + x)^3*Sin[E^x*x] - E^(4*x)*(3 + x)*Sin[E^x*x])/E^(3*x))
The nice thing about taking a limit at zero in this case is you don't need to worry about the remainders because as you approach zero the series is exact to any order you want.
So, take 3rd order:
No remainder because this is exact at limit x-> 0