What is the need of complex functions in wave analysis? It is commonly known that waves can be express in terms of sine or cosine function.
But when I study further, I seen that for analyising the waves, it is common to use complex functions in the form
$$y=y_{_0}e^{i(kx-\omega{t})}$$
where $y_{_0}$ is the amplitude, $k$ is the wave number, $\omega$ is the angular velocity and $x$ & $t$ are position an time respectively. Ofcourse, I know that the function $e^{ix}$ can be written in the form $\cos{x}+i\sin{x}$ and so it is a periodic function with period $2\pi$ but my question is for what purpose we define it in terms of complex numbers? It seem to be more convenient to use real functions for real variables such as amplitude, electric and magnetic field of an electro magnetic wave, and also in quantum mechanics. What actually this interpretation means or what is the advantage of such functions?
 A: The use of complex numbers is just a mathematical convenience.  It makes calculation of derivatives especially easy, it has nice properties when you do Fourier transforms, etc.  You're correct that you can do it all using real numbers, so that's not wrong.  It's just - in most people's view - more cumbersome.
EDIT
In light of the back and forth in the comments, let me provide more detail.  
First, starting with classical mechanics: Let $f$ be a (potentially) complex solution to the wave equation.  The physically relevant (i.e. measurable) quantity here is the amplitude as a function of space and time.  Any complex function can be rewritten in terms of two real-valued functions $g$ and $h$ such that
$$ f = g + ih $$
The amplitude of $f$ is $\| f \| = (g^2 + h^2)^{(1/2)}$.  We basically have two free functions here where we only need one to meet this constraint, so we're free to choose $h=0$, which means that $f$ is actually real-valued.  You could choose some other values for $g$ and $h$ that have the same amplitude, but you don't need the complex part. (Note that I'm not dealing with plane wave solutions here, although you could build up your solution from them.  I'm dealing with general solutions to the wave equation.)
For quantum mechanics, we have the Schroedinger equation:
$$ i\hbar \partial_t \Psi = -\frac{\hbar^2}{2m} \nabla^2 \Psi$$
(where I set $V=0$ because it's not going to figure in the rest of the point).  This is typically written with complex numbers, as shown above, but this is again a short-hand only.  We could instead write the solution in terms of two real-valued functions:
$$ \Psi = f + ig $$
and then, doing a little simplification, get two, coupled, real-valued PDEs:
$$ \hbar \partial_t f = -\frac{\hbar^2}{2m} \nabla^2 g $$
$$ \hbar \partial_t g = +\frac{\hbar^2}{2m} \nabla^2 f $$
So, again, we can avoid complex numbers in the formulation.  The price here is that we now have coupled PDEs for real functions instead of a single PDE over complex values. It turns out for practical reasons, that working with the single, complex-valued formulation is easier.
A: A function $f(x,t)$ is said to obey a wave equation if it holds that 
$$
\Box f(x,t) = 0.
$$
The most general solution of the above equation can be usually expressed in Fourier transform as 
$$
f(x,t) = \int \textrm{d}k\,\textrm{d}\omega\,c(k,\omega)\,\textrm{e}^{-i(kx-\omega t)}
$$
plus some boundary conditions. Except in special cases, the solution is usually a complex function.
