Coefficient2[exp, form1, form2, ...]
is like
Coefficient, but it also allows to extracts coefficients of
form1, form2, ...
sequentially. To specify the power in
formi
, write it as {var,pow}
.
To keep the prefactor whose coefficient you extracted you need to set
the option Prefactor
to True
.
= y0 + ep y1 + a4 (1/ep x1 + x2 + x3 ep) + a4^2 (1/ep^2 z1 + 1/ep z2 + z3 + x4 ep) ex
\text{a4}^2 \left(\frac{\text{z1}}{\text{ep}^2}+\text{ep} \;\text{x4}+\frac{\text{z2}}{\text{ep}}+\text{z3}\right)+\text{a4} \left(\frac{\text{x1}}{\text{ep}}+\text{ep} \;\text{x3}+\text{x2}\right)+\text{ep} \;\text{y1}+\text{y0}
[ex, a4] Coefficient2
\frac{\text{x1}}{\text{ep}}+\text{ep} \;\text{x3}+\text{x2}
[ex, a4, 2] Coefficient2
\frac{\text{z1}}{\text{ep}^2}+\text{ep} \;\text{x4}+\frac{\text{z2}}{\text{ep}}+\text{z3}
[ex, {a4, 2}] Coefficient2
\frac{\text{z1}}{\text{ep}^2}+\text{ep} \;\text{x4}+\frac{\text{z2}}{\text{ep}}+\text{z3}
[ex, {a4, 2}, {ep, -1}] Coefficient2
\text{z2}
[ex, {a4, 2}, ep] Coefficient2
\text{x4}
[ex, a4, 2, ep] Coefficient2
\text{x4}
[ex, {a4, 1}, {ep, 0}] Coefficient2
\text{x2}
[ex, a4, ep] Coefficient2
\text{x3}
[ex, {a4, 1}, {ep, 0}, Prefactor -> True] Coefficient2
\text{a4} \;\text{x2}