# Exclude a term in a differential equation

How can I exclude this term (The red box) from derivation to make it consider it as a constant (Just a constant to be multiplied ), I am getting the differentiation for the whole equation but I want a specific term to be excluded from derivation and just be multiplied as a constant.

P.s: the derivatives are with respect to r for the whole equation

G1r = (D/r^2 + H*(((2*c)/r)*((-(1/r))*Subscript[K, 1]-(1/c)*Subscript[K, o]) - (1/c)*Subscript[K, 1]))*Sin[2*\[Theta]];
op2 = D[#1, r] & ;

• You can do temp = G1r /. ((2*c)/r) -> X to replace this term with a 'constant' X. Then you can put back the 2c/r later with Expand[op2[temp]] /. X -> 2 c/r Dec 27 '21 at 12:26
• rule1 = Times[2, c, Power[r, -1], rest__] :> Times[temp, rest]; then rule2 = temp :> 2c/r Dec 27 '21 at 16:23