Question: Simplification of complex powers and limitation of invztrans

I stumbled upon some maple:isms when trying to rewrite some rather simple but tedious (and long) expressions in some filter design I'm working on that it is easy enough (but error prone..)  to do by hand.

Let's illustrate with a trivial example. How can I force maple to do roughly the following simplification

            k              k                             k                           k              k
(a+b*i)  + (a-b*i)     => (r*exp(w*i))   +  (r*exp(-w*i))    => 2* r  * cos(w*k)

r=|a+b*i|, w=arg(a+b*i)

If it would be possible to force maple to display (and keep) complex number as r*exp(w*I) by default instead (a+b*I) it would then be possible to use "simplify(%,trig)" but that doesn't seem possible

Is there a setting to force maple to display complex in e-polar format instead of rectangular?

I tried to use the builtin ztrans/invztrans functions to work with some discrete laplace transforms but I failed to get a usable output for the inverse transform of the most basic signal in applied work, i.e. damped sinusoids (a^k *sin(w*k)), |a| < 1

As a trivial example the following shows the issue and also the origin for question1

invztrans(ztrans(a^k*cos(w*k),k,z),z,k)

will give the answer as (in principle)

1/2 (x+y*i)^k  + 1/2 (x-y*i)^k

which is of course correct but not in a very useful form. Is there some "trick" to get this to work better?

Of course , all of this is simple enough to do by hand but when the expressions becomes large with many 10's of terms this becomes very tedious and I can't help feeling maple wold be able to help me more if I just could unlock the secrets of these quite basic simplifictions.

Cheers
Johan

 

Please Wait...