I found this solution, tah I exemplify symbol my_wild; ex my_wild_ex; my_wild_ex=subs(diff(step(my_wild),my_wild), my_wild==wild()); ex U=.....*step(....); ex equation_1=diff(U,theta); equation_1.subs(my_wild_ex == 0); So D[0](step) disappear from equation_1 Thanks, Javier