# Zero order term in an exprerssion

I have a very long expression like a + b x/y + f + c y/x + d (x z)/y + ... where a , b, c, f ... are coefficients and x,y,z,... are variables. I need to pick up the terms without variables which are a , f here how can I do this?

Or even collection of the zero order terms will be helpful.

-
Try the Coefficient function with the 3rd argument as 0. – Jonie Aug 5 '13 at 13:44
@Nasser, Would you explain how this works? The coefficient a, b,... are themselves complicated functions of other variables then what should i put in MemberQ[{...} ? – richard Aug 5 '13 at 13:44
@Jonie, and what for second argument? – richard Aug 5 '13 at 13:49
@Nasser, suppose zero order terms are complicated functions of other parameters a=f(i,j,k), ... – richard Aug 5 '13 at 13:51

In this case you can pick all expression at the first level which are free of any of your variables

Cases[a + b x/y + f + c y/x + d (x z)/y, _?(FreeQ[#, x | y | z] &)]


Equivalently you can use Select

Select[List @@ (a + b x/y + f + c y/x + d (x z)/y), FreeQ[#, x | y | z] &]

-

In case there are terms like $\frac{(x-1) (x+1)}{x^2-1}$ you may try to simplify the expression and then follow halirutan's solution.

Another approach is to use Series.

Series[a + b x/y + f + c y/x + d (x z)/y, {x, 0, 0}, {y, 0, 0}, {z, 0,
0}] // Normal
(* a + f *)

-