# Adding zero to an expression and avoiding simplification

Hi, I have an expression of the form

pol_y = chi_yyyy*Ey*Ey*Ey + (chi_yyxx + chi_yxyx + chi_yxxy)*Ey*Ex*Ex - (chi_yyxx + chi_yxyx + chi_yxxy)*Ey*Ex*Ex + (chi_yyxx + chi_yxyx + chi_yxxy)*Ey*Ex*Ex

Now the last two terms add 0 to the expression. The goal is to substitute complicated expressions for Ey, Ex (complex quantities) and compare the results of two different reformulations (with and without the 0 terms). So for my work, I need the last two terms to be there but sagemath is simplifying this expression automatically. How do I avoid this?

edit retag close merge delete

Yes as they should. But when expressions are of the form $E_x = \frac{1}{2} \, {\left({{E}_x^-} e^{\left(i \, k x\right)} + {E_x^+} e^{\left(-i \, k x\right)}\right)} e^{\left(i \, \omega t\right)} + \frac{1}{2} \, {\left(\overline{{E_x^+}} e^{\left(i \, k x\right)} + \overline{{{E}_x^-}} e^{\left(-i \, k x\right)}\right)} e^{\left(-i \, \omega t\right)}$ and $E_y = \frac{1}{2} \, {\left({{E}_y^-} e^{\left(i \, k x\right)} + {E_y^+} e^{\left(-i \, k x\right)}\right)} e^{\left(i \, \omega t\right)} + \frac{1}{2} \, {\left(\overline{{E_y^+}} e^{\left(i \, k x\right)} + \overline{{{E}_y^-}} e^{\left(-i \, k x\right)}\right)} e^{\left(-i \, \omega t\right)}$. This can yield to two different expressions for pol_y that might seem different at first but are equivalent.