I have the following problem. There is such an expression as:
P[x_,y_] := z[y] E^(I beta x) + Conjugate[z[y] E^(I beta x)];
The variables x, y, beta
are real but the function z[y]
is complex. I need to expand P[x, y]^2
. So I try this:
ComplexExpand[P[x, y]^2, z[y]]
The output contains Re[z[y]], Im[z[y]], Cos[...] and Sin[...]. In my case, I need the output to be like this:
z[y]^2 E(2 I beta x) + 2 z[y] Conjugate[z[y]] + Conjugate[z[y]]^2 E^(-2 I beta x)
What should I change in my approach? I have already tried TrigToExpand, FullSimplify and Hold but I did not get the desirable result.
Re
andIm
by using the optionTargetFunctions->{Conjugate}
. But that still givesSin
andCos
for the exponential functions. $\endgroup$