This is OK:
(%i2) demoivre(exp(%i* a[x])); (%o2) %i*sin(a[x])+cos(a[x])
This isn't:
(%i3) demoivre(exp(%i* a[%i])); (%o3) %e^(%i*a[%i])
This happens because the function islinear determines that %i * a[%i] isn't linear in %i.
Log in to post a comment.