I have a variety of terms that have coefficients of what I'll call $c_x$ and terms that are without this coefficient. I have a variable $U$, and would like to substitute powers of $U^2 \to d$ but only if the terms do not contain $c_x$.
I can easily do this if I want to replace only terms with $c_x$ but not without.
In a minimal example I would like to go from:
U + U^2 + c_x U + c_x U^2
% /. unknownRule
Out[1]>> U + d + c_x U + c_x U^2
Any advice would be greatly appreciated.