I have a very long expression in terms of the three functions u1, u2, u3. I am writing below only a small number of terms. I would like to define a rule that keeps terms of order three or less of any multiplication of u1, u2,u3 and their derivatives.
ss= u2[x, y, z, t]^3 + A*u2[x, y, z, t]^4 + Derivative[0, 0, 0, 2][u1][x, y, z, t] +
(3*λ*Derivative[0, 0, 1, 0][u1][x, y, z, t]^2*Derivative[0, 0, 2, 0] [u1][x, y, z, t])/2 +
(5*CC*Derivative[0, 0, 1, 0][u1][x, y, z, t]^4*Derivative[0, 0, 2, 0][u1][x,y, z, t])/4 + μ*Derivative[0, 0, 2, 0][u2][x, y, z, t]
The output should be:
u2[x, y, z, t]^3 + Derivative[0, 0, 0, 2][u1][x, y, z, t] + (3*λ*Derivative[0, 0, 1, 0][u1][x, y, z, t]^2*Derivative[0, 0, 2, 0][u1][x, y, z, t])/2 +
μ*Derivative[0, 0, 2, 0][u2][x, y, z, t]
Thanks