```
>>> powsimp(v**2*v**x*v**y*w).as_coeff_exponent(v)  # exponent of x + y + 2 on v:
(w, x + y + 2)
>>> powsimp(v**2*v**x*v**y*w).as_coeff_exponent(w)  # exponent of 1 on w:
(v**(x + y + 2), 1)
>>> powsimp(v**2*v**x*v**y*w).as_coeff_exponent(z)  # no exponent --> it's not there:
(v**(x + y + 2)*w, 0)
```