calculus and analysis – Write some expressions of the integral

I am trying to apply the Hamilton principle and the final part is the integration. then I should pick some parts only in sperate equation. for example.

The full equation is Integrate[δT - δU + δW, {t, t1, t2}]

Then the result will be an integral that has many terms. For example :

X^2 b + y b + c x^2 + c x + xy c

Then I need to get two equations.
First equation is any thing has term b : X^2 + y

The second equation is anything has the term c: x^2+ x xy

note: the equation I am dealing with is much longer and more complex but this is the basic idea.