How to solve this complex second order differential Incompressible fluid occupies space $0 \lt y \lt \infty$  above a plane rigid boundary $y = 0$, and oscillates to and fro in the $x$-direction with velocity $U\cos\omega t$. 
Show that the velocity field u=[u(y,t),0,0] satisfies $\frac{\partial u}{\partial t} = v\frac{\partial^2 u}{\partial y^2}$ (there being no applied pressure gradient), and by seeking a solution of the form
$u = \Re[f(y)e^{i\omega t}]$, 
show that $u(y,t) = Ue^{-ky}cos(ky-\omega t)$ where $k=(\omega/2v)^{\frac{1}{2}}$.
I have done the first part and have 
$i\omega f(y) = v\frac{\partial ^2f}{\partial y^2}$ with $f(0)=U, f(\infty)=0$ 
by assuming a solution $u(y.t)=f(y)e^{i\omega t}$. 
I think that the next thing i should do is solve the differential equation to get an equation for f(y) and then split the equation in to real and imaginary parts. However, I don't know how to do it.
I believe it will something of the form
$f(y) = c_1 e^{\Im y\sqrt{\frac{\omega}{v}}} + c_2 e^{\Im y\sqrt{\frac{\omega}{v}}}$
where $c_1$ and $c_2$ are some constants and $\Im$ are some complex variables that can be split into real and imaginary parts.
 A: $$
i\omega f = v\dfrac{d^2f}{dy^2}
$$
solutions of this form are
$$
f(y) = A\mathrm{e}^{i\lambda y}+B\mathrm{e}^{-i\lambda y}
$$
lets find $k$ so plugging into the first one.
$$
i\omega = -v\lambda^2\implies \lambda = \sqrt{\dfrac{i\omega}{i^2 v}}=\sqrt{\dfrac{1}{i}}\sqrt{\dfrac{\omega}{v}}=\pm\dfrac{\sqrt{2}}{1+i}\sqrt{\dfrac{\omega}{v}}=\pm\dfrac{(1-i)}{\sqrt{2}}\sqrt{\dfrac{\omega}{v}} =\pm(1-i)\sqrt{\dfrac{\omega}{2v}}
$$
so this leads to
$$
\lambda = \pm(1-i)k
$$
where
$$
f(y)= A\mathrm{e}^{\pm(i+1)ky} + B\mathrm{e}^{\mp(i+1)ky}
$$
this means we can eliminate $\pm$ since they are complimentary.
$$
f(y) = A\mathrm{e}^{(i+1)ky} + B\mathrm{e}^{-(i+1)ky}
$$
with you initial condition with $f(\infty) = 0$ we know that $A = 0$ so we have
$$
f(y) = B\mathrm{e}^{-(i+1)ky}
$$
the other boundary $y=0$
$$
f(0) = B = U
$$
so we have
$$
f(y) = U\mathrm{e}^{-ky}\mathrm{e}^{-iky}
$$
thus the solution you seek
$$
u = \mathcal{R}\left[f(y)\mathrm{e}^{i\omega t}\right] = \mathcal{R}\left[ U\mathrm{e}^{-ky}\mathrm{e}^{-iky}\mathrm{e}^{i\omega t}
\right] = \mathcal{R}\left[ U\mathrm{e}^{-ky}\mathrm{e}^{-i(ky-\omega t)}
\right]
$$
utilising 
$$
\mathcal{R}\left[A\mathrm{e}^{-ix}\right] = \mathcal{R}\left[A\cos(x) -iA\sin x\right] = A\cos x
$$
we find
$$
u(y,t) =  \mathcal{R}\left[ U\mathrm{e}^{-ky}\mathrm{e}^{-i(ky-\omega t)}
\right] = U\mathrm{e}^{-ky}\cos(ky-\omega t)
$$
