We have:


Let's define

as

so

Then,


P.S.: This is only a way to get the result without the use of complex numbers. The most elemental relation between both expressions, as stated by Sameed on the exercise discussion subforum, is the possibility to substitute
x with
ix to get the other one.