A simple way to prove this is to find the second derivative of each side of the identity separately:
Let x=eiθ, note that x(0)=1
dx/dθ=ieiθ, note that x'(0)=i
d2x/dθ2=-eiθ=-x
Let y=cosθ+isinθ, note that y(0)=1
dy/dθ=-sinθ+icosθ, note that y'(0)=i
d2y/dθ2=-cosθ-isinθ=-y
This shows that the second derivatives are identical in terms of their primitives, that is, x=y, and that substitution of θ=0 in the primitive and first derivatives yield the same result. Therefore x≡y.
Another way is to use the Taylor expansion of each series:
eiθ≡1+iθ+(iθ)2/2!+...+∑(iθ)n/n!+...=
1-θ2/2!+θ4/4!-... (series for cosθ) + i(θ-θ3/3!+θ5/5!-...) (i × series for sinθ)=
cosθ+isinθ