# Assuming that only the 2nd order terms are zero

I am dealing with first-order perturbative theory, that is, any variable may be decomposed as

$$a = a + \delta a$$

and the same would occur with several different variables, let's say, $$b$$ and $$c$$. However any term that is accompanied by a $$\delta$$ (i.e. $$\delta a$$, $$\delta b$$ and $$\delta c$$) are called "perturbative terms", that is, any $$\delta$$-term multiplied by any other term with $$\delta$$ are zero (using a different lingo: just keeping perturbation to the first order):

$$\delta a ^2 =0$$;

and

$$\delta b \delta c = 0$$.

In my case these terms are used in several different calculations throughout my program, so I would like to discriminate these conditions as a global assumption (actually any other idea on how to do this would be gladly accepted) in the beginning of the program. So I have tried something like:

$Assumptions =$\delta a^2 == 0$&&$\delta b \delta c == 0$ and henceforth for every different combination of variables. Obviously, it does not work out. I have tried several different ways to do it and, in the end of my big calculations, I just to simplify equations using Simplify or FullSimplify, get results in which second order perturbative terms do not appear. Edit: In my case, the perturbative terms are dependent of two different variables: $$\delta a = \delta a (t,r)$$. So it is really common to appear derivative terms multiplying between the $$\delta$$-terms, in which must be set to zero. Examples of this would be: $$\partial_r \delta a \partial_r \delta b = 0$$, or $$\partial_t \delta a \partial_r \delta a = 0$$, or $$(\partial_t \delta c)^2 = 0$$. How should I add rules to take care of these derivative terms? • You can introduce scaling of the variables, for instance$a=a_0+\alpha x$,$b=b_0+\beta x$, and$c=c_0+\gamma x$. Next you do your calculations and at the end perform series expansion with respect to$x$and keep only terms up to the 1st order in$x$, that is Series[f[x],{x,0,1}]//Normal. – yarchik Sep 13 '19 at 15:06 ## 1 Answer You could introduce the perturbative part as δ[a] and define an extra rule how multiplication works with those (δ can be entered quickly via EscdeltaEsc or via \[Delta]): δ /: Times[___, _δ, _δ, ___] = 0;  Now every time at least two δ[_] symbols are multiplied they will be simplified to zero automatically. For example in (* Input *) (a + δ[a]) (b + δ[b]) % // Expand (* Output *) (a + δ[a]) (b + δ[b]) a b + b δ[a] + a δ[b]  after expanding the expression, the δ[a]δ[b] part was replaced by zero automatically. We have to be a bit careful because this rule doesn't catch powers of δ[_] so we should add another rule for that: δ /: Power[_δ, n_Integer?(# >= 2 &)] = 0;  Now we can for example do (* Input *) Table[δ[a]^k, {k, 0, 3}] (* Output *) {1, δ[a], 0, 0}  I'm not sure what should happen for negative powers with absolute value of at least two, but you can modify/add another rule similarly to the two above. • Probably safer to use UpValues rather than to redefine something as fundamental as Times: \[Delta] /: Times[_\[Delta], _\[Delta]] = 0;. – march Sep 13 '19 at 16:25 • @march Great idea! i'll update my answer to use UpValues instead. – Thies Heidecke Sep 13 '19 at 16:29 • I suppose that δ /: Times[___, _δ,___, _δ, ___] = 0; is good to make sure that it always works. However, since Times is Orderless, I'm pretty sure the pattern matcher will just check to see if there are two \[delta][_]'s that are multiplied, regardless of whether there are other quantities there or not. I think that \[Delta] /: Times[_\[Delta], _\[Delta]] = 0 on it's own should work. – march Sep 13 '19 at 20:01 • Ok, great answer. It seems like it is working flawlessly. However, if I may ask, lots of derivative terms also appear like$\partial_r \delta a \partial_r \delta b$and even with different variables,$\partial_t \delta a \partial_r \delta c$. They also should turn out to be zero (since anything with two$\delta\$ must become zero). Any easy way to work around this? – Edison Santos Sep 14 '19 at 13:35
• @march Yes, originally i had the extra ___ in the pattern, when i had the same realisation about the Orderless property, after which i removed it. Both patterns should work i guess. – Thies Heidecke Sep 15 '19 at 9:58