eix = cos x + i sin x (1) where
i denotes

-1. This is an equation which allows you to interpret the exponentiation of an imaginary number
ix as having a real part, cos
x, and an imaginary part,
i sin
x. This was an especially useful observation in the solution of differential equations. Because of this and other uses of
i, it became quite acceptable for use in mathematics. Euler, recommended the general use of these imaginary numbers
now,
e-ix = cos x - i sin x (2)
From (1) and (2)
eix e-ix = (cos x + i sin x )(cos x - i sin x )
or, 1 = cos2x - i2 sin2x
or, 1 - cos2x = - i2 sin2x
or, sin2x = - i2 sin2x
or, i2 = -1
or, i = 
-1