# Wave Equation

1. May 27, 2012

### TranscendArcu

1. The problem statement, all variables and given/known data
Consider an elastic string of length L whose ends are held fixed. The string is set in motion with no initial velocity from an initial position u(x, 0) = f (x). Assume that the parameter alpha = 1. Find the displacement u(x,t) for the given initial position f(x)

3. The attempt at a solution
$$u(x,t) = X(x)T(t) \Rightarrow \frac{X''}{X} = \frac{T''}{T} = -\lambda\\ X = C_1 cos(\sqrt{\lambda}x) + C_2 sin(\sqrt{\lambda}x)\\X(0) = C_1 = 0\\X(L) = C_2 sin(\sqrt{\lambda}L) = 0 \Rightarrow \sqrt{\lambda}L = n\pi \forall n\geq 1 \Rightarrow \lambda = (\frac{n \pi}{L})^2\\ T''+ \lambda T = 0 \Rightarrow T = C_1 cos(\frac{n \pi t}{L}) + C_2 sin(\frac{n \pi t}{L})\\ \Rightarrow u_n(x,t) = A_n cos(\frac{n \pi t}{L})sin(\frac{n \pi x}{L}) + B_n sin(\frac{n \pi t}{L}) sin(\frac{n \pi x}{L})\\ \Rightarrow u(x,t) = \sum _1 ^\infty A_n cos(\frac{n \pi t}{L})sin(\frac{n \pi x}{L}) + B_n sin(\frac{n \pi t}{L}) sin(\frac{n \pi x}{L})\\ u(x,0) = 1 = \sum _1 ^\infty A_n cos(\frac{n \pi (0)}{L})sin(\frac{n \pi x}{L}) + B_n sin(\frac{n \pi (0)}{L}) sin(\frac{n \pi x}{L}) = \sum _1 ^\infty A_n sin(\frac{n \pi x}{L})\\ \frac{\partial u(x,0)}{\partial t} = \sum _1 ^\infty B_n \frac{n \pi}{L} sin(\frac{n \pi x}{L}) = 0\\$$
So this forces all of the B_n to zero. We now solve the A_n
$$A_n = 2 \int _0 ^L f(x)sin(\frac{n \pi x}{L}) dx = 2 \int_{\frac{L}{2} - 1} ^{\frac{L}{2} + 1} sin(\frac{n \pi x}{L}) dx = \frac{4Lsin(\frac{n \pi}{2})sin(\frac{n \pi}{L} )}{\pi n}$$Thus, my solution should be:
$$u(x,t) = \sum_1 ^\infty \frac{4Lsin(\frac{n \pi}{2})sin(\frac{n \pi}{L} )}{\pi n} sin(\frac{n \pi x}{L})cos(\frac{n \pi t}{L})$$
However, this answer is off by a factor of L from what the book has. Can anyone help me find my mistake?

2. May 27, 2012

### algebrat

Everything looks good until evaluating that integral. You'll have to point us to which trig identity(s) you used to make it easier to check, but I'm suspicious of that factor of L in the same line that starts $A_n=\dots$

Last edited: May 27, 2012
3. May 28, 2012

### LCKurtz

Doesn't the half-range expansion for $A_n$ look like this$$A_n = \frac 2 L \int _0 ^L f(x)sin(\frac{n \pi x}{L}) dx$$