A bizarre function

119 Views Asked by At

I am puzzled by this function:

f(x)= 139.85 + (15.8404 + 4.76022 I) E^(-I x) + (15.8404 - 4.76022 I) E^( I x)

It seems to have only an imaginary part. However, its first half:

g(x)= 139.85 + (15.8404 + 4.76022 I) E^(-I x)

has both an imaginary and a real part.

What is the explanation for this?

Is the plotting command used wrong?

Plot[Evaluate[ReIm[139.85 + (15.8404 + 4.76022 I)/E^(I x) + (15.8404 - 4.76022 I) E^(I x)]], {x, -6., 6.}]
3

There are 3 best solutions below

0
On BEST ANSWER

Your function

f[x_] := 139.85 + (15.8404 + 4.76022 I)/E^(I x) + (15.8404 - 4.76022 I) E^(I x)     

is real valued, because definition

fR[x_] := 139.85 + (15.8404 + 4.76022 I)/E^(I x) + Conjugate[(15.8404 + 4.76022 I)/E^(I x)]
Simplify[f[x] == fR[x], Element[x, Reals]]
(* True *)

is equivalent for real x.

0
On

Take notice that your function is of the form:

g = c + (a + b I) E^(-I x) + (a - b I) E^(I x) // FullSimplify

enter image description here

which only has real components.

ReIm makes assumptions about x and treats it as a complex number itself. You can use ComplexExpand to solve your issue (and put your mind at ease that it is doing the right thing :) )

ComplexExpand[
 ReIm[139.85 + (15.8404 + 4.76022 I)/
    E^(I x) + (15.8404 - 4.76022 I) E^(I x)]]

enter image description here

As you can see, it only gives a real part.

Best wishes!

A.


Edit: I really liked @a gues answer which helps to think more geometrically. I'm only adding the following for completion.

z = a + b I /. {a -> 1, b -> 1};
z2 = z E^(-I \[Pi]/12.);
ListPlot[{{ReIm[z], ReIm[z\[Conjugate]], 
   ReIm[z + z\[Conjugate]]}, {ReIm[z2], ReIm[z2\[Conjugate]], 
   ReIm[z2] + ReIm[z2\[Conjugate]]}}, 
 Epilog -> { Arrow[{{0, 0}, ReIm[z]}], 
   Arrow[{{0, 0}, ReIm[z\[Conjugate]]}], Green, 
   Arrow[{{0, 0}, ReIm[z + z\[Conjugate]]}], Orange,
   Arrow[{{0, 0}, ReIm[z2]}], Arrow[{{0, 0}, ReIm[z2\[Conjugate]]}], 
   Red, Arrow[{{0, 0}, ReIm[z2 + z2\[Conjugate]]}], Purple, Dashed, 
   Arrow[BezierCurve[{ReIm[z], ReIm[(z + z2)/1.5], ReIm[z2]}]], 
   Arrow[BezierCurve[{ReIm[z\[Conjugate]], 
      ReIm[(z\[Conjugate] + z2\[Conjugate])/1.5], 
      ReIm[z2\[Conjugate]]}]]}, PlotRange -> {{0, 3}, Full}]

enter image description here

1
On

you are basically rotating to vectors in opposite directions and wondering why their sum stays on the line that bijects them, because the rotations are equal and opposite their imaginary components will also always be equal and opposite.