As promised a few days ago, I did write up my "case study"
on doing singular perturbation theory with SymPy:
The idea here is to offload some very tedious and
cumbersome algebra to SymPy. In the end, I managed
to automate it fully, to the point that I now have a SymPy
program that will generate new terms in a perturbation
expansion by itself, without human intervention.
The script is at the end of the blog post linked above.
And, for what it's worth: to extract "pieces of expressions"
(which was my original question), I don't use SymPy features
directly, but instead rely on an algebraic identity. Which worked
in this case, because I knew the form of the terms for this
problem.
Best,
Ph.