# Extract coefficients from trigonometric polynomial [closed]

Suppose I have:

f[r_, ϕ_] = C1 Cos[ϕ]r + C3 Sin[3 ϕ] r + C4 Sin[4 ϕ] r^4;


How do I extract the coefficient of a chosen trigonometric term, let's say Cos[ϕ]?

## closed as off-topic by MarcoB, user9660, m_goldberg, ilian, JensNov 22 '15 at 2:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Community, m_goldberg, ilian, Jens
If this question can be reworded to fit the rules in the help center, please edit the question.

• Coefficient[f[r, \[Phi]], Cos[\[Phi]]] – Hubble07 Nov 7 '15 at 9:23
• @Hubble07 answer? – Yves Klett Nov 21 '15 at 11:04
• If f is meant to be an expression obtained from a computation, then the form of the expression might determine the answer. For example, Coefficient[TrigExpand@f[r, ϕ], Cos[ϕ]]. If this is an issue, FourierCoefficient might be appropriate. – Michael E2 Nov 21 '15 at 17:37

 Coefficient[f[r, ϕ], Cos[ϕ]]