0
$\begingroup$

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 ?

$\endgroup$
1
$\begingroup$

Is this, what you want?

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

Edit: Change of answer

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

enter image description here

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

(*   {8, 84/5, 10, 11/5, -(1/5)}   *)
$\endgroup$
0
$\begingroup$

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^_}] &
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.