Instead of introducing a formal expansion parameter via Series, the first–order truncation can be obtained directly at the structural level. The idea is simple: expand the expression into a sum of monomials, and then discard every term that contains nonlinear symbolic interactions:
FirstOrderApproximation[expr_] := ReplaceAll[Expand @ expr,
{
Times[s1_Symbol, s2_Symbol, rest___] :> 0,
Power[s_Symbol, n_ /; Greater[n, 1]] :> 0
}
];
Map[FirstOrderApproximation,
{3 a + c (d - a b d) + e c (a + b) f + 2 b - 1,
a + b a c d,
b a c d + b c,
a^4 + b a c d + b^8}]
(*{-1 + 3 a + 2 b, a, 0, 0}*)
Why this works?
Expand brings the expression to a canonical polynomial form, a flat sum of products.
After expansion, each term is an explicit
Timesexpression. SinceTimesisOrderless, any product involving two or more symbolic factors matchess1_Symbol * s2_Symbol * rest___and is removed, regardless of ordering or numeric coefficients.Powers such as
a^2are eliminated by the second rule.
The result is precisely the collection of constant and linear terms, i.e. the first–order approximation in the symbolic variables.
Alternatively, the same idea can be expressed by explicitly counting symbolic factors in each term, removing any product that contains two or more symbols:
Expand[expr] /. {
t_Times /; Count[t, _Symbol, ∞] >= 2 :> 0,
s_Symbol^n_ /; n > 1 :> 0
}