The following expression is a short excerpt from a much longer expression I have:
exp = a E^(I (k x - t \[Omega])) \[Alpha]1 +
a E^(-k x - I t \[Omega]) R0 \[Alpha]2 +
a E^(-3 k x - 3 I t \[Omega]) R0 \[Alpha]3 +
a E^(I (5 k x - 5 t \[Omega])) \[Alpha]5;
I need a basic command that checks the above expression and issues an alert if any of the following conditions are not met:
1- Sign of k in the exponential must be positive if "a" is not multiplied by R0.
2- Sign of k in the exponential must be negative if "a" is multiplied by R0.
For example, the command should give me a warning that the last term in expEroor violates either conditions mentioned above:
expError = a E^(I (k x - t \[Omega])) \[Alpha]1 +
a E^(-k x - I t \[Omega]) R0 \[Alpha]2 +
a E^(-3 k x - 3 I t \[Omega]) R0 \[Alpha]3 +
a R0 E^(I (5 k x - 5 t \[Omega])) \[Alpha]5;
Thanks in advance for help.