MATLAB: Complex polynomials

complex anglesMATLABpower of polynomialssymbolic

I currently have a polynomial, where each term is associated with terms of the form exp(1i*t*w*2), exp(1i*t*w*3) etc. When i raise this polynomial to any power, the product of exp(1i*t*w*2) and exp(1i*t*w*3) does not give me a compact term exp(1i*t*w*5), but continues to show it as the product of the two terms. I have used 'expand' and 'simplify' to no avail. How do i get around this problem?

Best Answer

symbolic toolbox (MuPAD)
syms t w
expr=exp(1i*t*w*2)*exp(1i*t*w*3);
result = evalin(symengine,['simplify(' , char(expr),',exp)']);