# How to separate a complex exponential into real and imaginary factors?

I've spent an embarrassingly long time on a seemingly simple homework problem and am starting to believe that either the solution is wrong or that I am a lot stupider than I thought.

The problem is to show that the expression

$$e^{-i(k_2-k_1)x}e^{-i(\epsilon_2-\epsilon_1)t}+e^{i(k_2-k_1)x}e^{i(\epsilon_2-\epsilon_1)t}$$

contains a term which describes completely the time dependence

$$g(x)\cos((\epsilon_2-\epsilon_1)t + \phi)$$

where $$g(x)$$ is real and $$\phi$$ does not depend on $$x$$

It seems to me that generally, the solution relies on the existence of a real function function $$g(x)$$ and an x-independent $$\phi$$ such that

$$e^{-if(x)}+e^{if(x)}=g(x)(e^{-i\phi}+e^{i\phi})$$

(Note: $$f(x)$$ is real)

I cannot think of any $$\phi$$ satisfying this equation that would be independent of $$x$$

Assuming $$f(x) = (k_2-k_1)x$$, what $$g(x)$$ and $$\phi$$ would satisfy the equation $$e^{-if(x)}+e^{if(x)}=g(x)(e^{-i\phi}+e^{i\phi})$$ and the constraints that $$g(x)$$ is real and $$\phi$$ is independent of $$x$$ and non-zero?

## migrated from physics.stackexchange.comSep 22 '18 at 6:01

This question came from our site for active researchers, academics and students of physics.

• You're aware that $e^{ix} + e^{-ix} = 2\cos(x)$? – Alfred Centauri Sep 21 '18 at 18:49
• I am, yes. Its important to the larger problem at hand that the x dependence be factored out in the way described. – Malcolm Regan Sep 21 '18 at 18:51
• I suppose I'm misreading something then because, by inspection, it looks like $g(x) = \cos(\Delta k\cdot x),\quad \phi = 0$ is a solution – Alfred Centauri Sep 21 '18 at 18:56
• It is a solution to the question I asked but not to the larger problem. That's my fault, I will update to include more context. – Malcolm Regan Sep 21 '18 at 18:59
• The problem, as stated, is very much ill-defined (or trivial, depending on how you want to think about it). Consider the simpler problem "prove that the expression $A$ contains a term of the form $B$". The solution is $A=B+(A-B)$, which obviously contains a term of the form $B$, but in an absolutely trivial way. In any case, I voted to migrate this to Math.SE, as this is a pure-math problem, with no physics involved (even if it comes from solving a physics problem). – AccidentalFourierTransform Sep 21 '18 at 19:31

Assuming $$f(x) = (k_2-k_1)x$$, what $$g(x)$$ and $$\phi$$ would satisfy the equation $$e^{-if(x)}+e^{if(x)}=g(x)(e^{-i\phi}+e^{i\phi})$$ and the constraints that $$g(x)$$ is real and $$\phi$$ is independent of $$x$$ and non-zero?

Any time you see $$e^{-if(x)}+e^{if(x)}$$, you can replace it with $$2\cos\left(f(x)\right)$$. So to answer this question as it stood before the unmotivated addition of the "non-zero" condition, you could take $$g(x) = \cos\left(f(x)\right)$$ and $$\phi=0$$. But if you really want it to be nonzero, note that since $$e^{-i\phi}+e^{i\phi} = 2\cos\phi$$, you can quite generally pick any value for $$\phi$$ as long as $$\cos\phi \neq 0$$, and then set $$$$g(x) = \frac{\cos\left(f(x)\right)} {\cos\phi}.$$$$ This is why AccidentalFourierTransform is saying that the problem is ill defined: there's no single answer to it.

Now, looking at your original expression, and remembering that $$e^A e^B = e^{A+B}$$, we have \begin{align} e^{-i(k_2-k_1)x}e^{-i(\epsilon_2-\epsilon_1)t} + e^{i(k_2-k_1)x} e^{i(\epsilon_2-\epsilon_1)t} &=e^{-i(k_2-k_1)x-i(\epsilon_2-\epsilon_1)t} + e^{i(k_2-k_1)x+i(\epsilon_2-\epsilon_1)t} \\ &=2\cos \left[(k_2-k_1)x+(\epsilon_2-\epsilon_1)t\right] \\ &=2\cos \left[(k_2-k_1)x\right] \cos\left[(\epsilon_2-\epsilon_1)t\right] -2\sin \left[(k_2-k_1)x\right] \sin\left[(\epsilon_2-\epsilon_1)t\right] \end{align} If you're literally asking to show how that expression "contains a term" like $$g(x)\cos\left[(\epsilon_2-\epsilon_1)t + \phi\right]$$... well just set $$\phi=0$$ and $$g(x) = 2\cos \left[(k_2-k_1)x\right]$$. (Remember that a "term" is one part of a sum, whereas a "factor" is one part of a product, so you can see that "term" in the result above.)

EDIT: Given the OP's comments, I think I can rephrase the original question as:

Find $$g(x)$$ and $$\phi$$ such that $$$$g(x) \cos[(\epsilon_2-\epsilon_1)t + \phi] + h(x) = e^{-i(k_2-k_1)x}e^{-i(\epsilon_2-\epsilon_1)t} + e^{i(k_2-k_1)x} e^{i(\epsilon_2-\epsilon_1)t},$$$$ where $$h(x)$$ is an arbitrary function independent of time.

It's not hard to get around the addition of $$h(x)$$ by simply differentiating both sides of this equation with respect to time. Using the result I showed above, this gives us $$$$-g(x) \sin[(\epsilon_2-\epsilon_1)t + \phi] (\epsilon_2-\epsilon_1) = -2\sin \left[(k_2-k_1)x+(\epsilon_2-\epsilon_1)t\right](\epsilon_2-\epsilon_1),$$$$ which simplifies to $$$$g(x) \sin[(\epsilon_2-\epsilon_1)t + \phi] = 2\sin \left[(k_2-k_1)x+(\epsilon_2-\epsilon_1)t\right].$$$$ Now, this must be true for all values of $$t$$, so let's just pick two values and see where it leads. First, take $$t=0$$ and we get $$$$g(x) \sin[\phi] = 2 \sin \left[(k_2-k_1)x\right].$$$$ Then, take $$t = \pi/[2(\epsilon_2-\epsilon_1)]$$ and simplify to find $$$$g(x) \cos[\phi] = 2 \cos \left[(k_2-k_1)x\right].$$$$ We can divide the first of these by the second to eliminate $$g(x)$$ and solve for $$\phi$$: $$$$\tan\phi = \tan \left[(k_2-k_1)x\right].$$$$ So, as you can see, $$\phi$$ cannot be independent of $$x$$ unless $$k_2=k_1$$.

• My fault again. All the time dependence needs to be contained in the term in question. I will update the question. Sorry and thank you. – Malcolm Regan Sep 21 '18 at 19:53
• If this question goes dead I'll accept this as the answer because it technically is an answer to the question as I wrote it – Malcolm Regan Sep 21 '18 at 19:56
• Maybe I'm bad at writing questions. But this discussion left me convinced that $\phi$ necessarily depends on x for any non-trivial solution. I'll just ask the teacher on monday. Thanks to all involved. I'll work on my question writing skills. – Malcolm Regan Sep 21 '18 at 20:03
• With your new clarification, I've edited my answer to show that indeed $\phi$ must depend on $x$ unless $k_1 = k_2$. – Mike Sep 21 '18 at 20:41
• Beautiful. Thank you. – Malcolm Regan Sep 22 '18 at 2:24