Skip to main content
2 of 3
fix format
AsukaMinato
  • 10.7k
  • 1
  • 21
  • 49

Ignoring higher order terms in an expression

I am trying to ignore terms that are higher order (third or more) in an expression. For example, for the input function:

$$f_{in}= \alpha\beta + \alpha^2 + \beta^2 + \alpha\beta^2/2 + \alpha^2 \beta $$

I would like the output function to be

$$f_{out}= \alpha\beta + \alpha^2 + \beta^2$$

To this end, I defined the rule:

rule = \[Alpha]^i_*\[Beta]^j_ :> 0 /; (i + j) > 2;

but it doesn't seem to do the trick. Is there a simple fix?

Arnab
  • 123
  • 4