I have expressions with terms that are products of factors. Some of the factors are expressions that depend on a single specific variable. I would like to replace those factors with constants and create a separate list with the replaced constants. An example:
(L Myb)/EIy + (L Myb Rzc^2 (12 + la^2 - 6 la Coth[la/2]))/(12 GJ la^2)
This example only has two terms. The second term has the factor
(12 + la^2 - 6 la Coth[la/2])/la^2
that is a function of la
. I would like to replace all factors that only depend on la
with constants, so turning the expression into
(L Myb)/EIy + c1 (L Myb Rzc^2)/(12 GJ)
and into a list
c1 -> (12 + la^2 - 6 la Coth[la/2])/la^2
How can I do this? In particular, I am struggling to match "any complicated" function of la
.