# Calculation with terms of different orders

I have an expression :

w=x*(1-x)*D[(x-0.8)*x^2/(1-x),x]
x=y+z


And I want to say that y of order 0, and z of order 1, and then ask Mathematica to give me w with the terms of order 0 separately, and of order 1 separately, and of order 2 separately. How can I do it ?

Is this, what you want?

w = x*(1 - x)*D[(x - 8/10)*x^2/(1 - x), x] // Simplify


Regard y und z as functions of t, z series expanded to the first order, y to zero order.

subst = x -> (Series[y[t], {t, 0, 0}] // Normal) +
Series[z[t], {t, 0, 1}] // Normal

(*   x -> y[0] + z[0] + t Derivative[1][z][0]   *)

w1 = w /. subst // Expand // Apart // Collect[#, t] &

(tab = Table[SeriesCoefficient[w1, {t, 0, n}], {n, 0, 4}]) // TableForm


tab /. {y -> Function[t, 2 - t^2], z -> Function[t, Sin[t]]}

(*   {8, 84/5, 10, 11/5, -(1/5)}   *)


I don't know for sure what you want, but try

Clear["Global*"]

w = x*(1 - x)*D[(x - 0.8)*x^2/(1 - x), x]
x = y + z

w // ExpandAll // Collect[#, {y^_, z^_}] &
`