How about

```
match[b] = factor_terms(match[b])
u = match[b].as_independent(f(x), as_Add=False)[1]
```