# Deriving d'Alemberts solution - Boundary conditions

1. Feb 5, 2013

### divB

Hi,

I shall show (using Fourier transform) that the solution to

$$\frac{\partial^2 u(x,t)}{\partial t^2} = \frac{\partial^2 u(x,t)}{\partial x^2}\\ u(x,0) = f(x) \\ u_t(x,0) = 0$$

is

$$u(x,t) = (f(x+t) + f(x-t))/2$$

I got it almost: Taking the Fourier transform in the variable x (leaving t constant) and the derivative theorem gives:

$$\hat{u}_{tt}(s,t) + 4\pi^2 s^2 \hat{u}(s,t) = 0$$

And the solution to this differential equation is:

$$\hat{u}(s,t) = A e^{j2\pi s t} + B e^{-j2\pi s t}$$

However, now I am stuck in incorporating the boundary conditions and I do not see why A and B should become $f(x)=u(x,0)$.

My approach was: Since u(x,t) was transferred to Fourier domain via x rather than t, $u(s,0) = \hat{u}(x,0)$. Derivating the solution for t and filling t=0 gives A=B. But I neither see the factor of 1/2 there, nore why A and B should be f(x). Can anyone give me a pointer?

Thanks!

2. Feb 6, 2013

### divB

Got it; finally!
It is so trivial from where I was: A=B was correct, it is a constant regarding t but not s, so A(s)=B(s).

The other "boundary" condition is u(x,0)=f(x), so when transforming back my solution: u(x,t) = A(x+t)+B(x-t) with t=0: u(x,0)=A(x)+B(x) which means that A(x)=B(x)=f(x)/2