Substituting a Solution into an Equation

OK, this is probably dead simple, but I am unable to reach the solution to this.


∂u∂t+c∂u∂x=0\frac{\partial u}{\partial t} + c \frac{\partial u}{\partial x} = 0

and the solution to it is

u(x,t)=Re[U(t)eikx]u(x, t) = \mathrm{Re}[U(t)e^{ikx}],

why is the result this

dUdt+ikcU=0\frac{\mathrm{d}U}{\mathrm{d}t} + ikcU = 0

if that solution is substituted into the equation?

What is the Re[U(t)eikx]\mathrm{Re}[U(t)e^{ikx}], anyway, in this case? Is it U(t)cosxU(t)\cos x?

Similarly, if

un+1j=(1−μ)unj+μunj−1u_j^{n+1} = (1 – \mu)u_j^n + \mu u_{j-1}^n


unj=Re[U(n)eikjΔx]u_j^n = \mathrm{Re} [U^{(n)}e^{ikj\Delta x}],

why is the result of substition of this solution into that equation this

U(n+1)=(1−μ)U(n)+μU(n)e−ikΔxU^{(n+1)} = (1 – \mu) U^{(n)} + \mu U^{(n)}e^{-ik\Delta x}?

I’m just unable to substitute these and get the correct result. I know it’s dead simple.