Following the question in here, now I would like to make the terms with derivatives to vanish. To shortly explain, given a variable decomposed as follows:
$a(t,r) = a(r) + \delta a(t,r)$
in my long calculations several derivatives of the term $\delta a(t,r)$ appears like $\partial_t \delta a(t,r)$ or $\partial_r \delta a(t,r)$. But I need that multiplied $\delta$-terms with another to vanish, like
$\partial_r \delta a(t,r) \partial_r \delta b(t,r)=0$ or $(\partial_r \delta a(t,r))^2 =0$ or $\partial_r \delta a(t,r) \partial_t \delta a(t,r)$.
In my previous question, the method showed was able to answer only when there are not derivative terms and I would like to generalize it. If I follow the method showed, Mathematica takes the derivative of the variable $\delta a(t,r)$ as:
\partial_r \delta[a[t,r]] = \delta'[a[t,r]] \partial_r a[t,r].
following the chain rule. And, obviously, it does not results in zero when two terms of this type are multiplied.
ϵ
. Setϵ /: ϵ^n_ /; n >= 2 = 0;
. Voilà. $\endgroup$