I am trying to solve the boundary value problem
$u_{tt} = 4u_{xx},\; x > 0, t > 0$
$u(x,0) = \frac{x^2}{8},\; u_t(x,0) = x,\; x\geq 0$
$u(0,t) = t^2,\; t \geq 0$
I attempted to use D'Alembert's solution formula
$u(x,t) = \frac{1}{2}[f(x + at) + f(x- at)] + \frac{1}{2a}\int_{x-at}^{x+at} g(\tau)\; d\tau$
where $f(x) = \frac{x^2}{8}, g(x) = x, a = 2$ and $\tau$ is dummy variable.
I ended up with $u(x,t) = \frac{x^2 + 4t^2 + 8xt}{8}$
which gives $u(0,t) = \frac{t^2}{2}$ instead of $t^2$.
Is D'Alembert's formula not the right method to solve this problem?
Any help would be appreciated.
Thank you for reading.