I have an expression like: $ expr= \frac{1}{2}(A x^2y^2+ Bx^2Log[y]Cos[2\phi+\alpha] +C \frac{y^3}{x}Sin[\phi +\beta+\gamma]+DxCos[\phi]) $ I have two problems as follows: 1.I want to extract those terms which contain $ 2\phi$ and $ \phi$ . i.e , I require output as: $ \phi term=\frac{1}{2}(C \frac{y^3}{x}Sin[\phi +\beta+\gamma]+DxCos[\phi])$ $ 2\phi term=\frac{1}{2}(Bx^2Log[y]Cos[2\phi+\alpha]) $ $ restterms=\frac{1}{2}(A x^2y^2)$ 2.I would likeRead more