1. ## Wave equation help.

Question: Solve the wave equation given the following boundary conditions.
u(0,t)=0
u(L,t)=0
u(x,0)=0

du/dt|t=0= x(L-x)

Attempt:
ok i'm not gonna write out all the steps because i can't use latex and it will be really messy, but i have
un= [Ancos(nπαt/L) + Bnsin(nπαt/L)]sin(nπx/L)
u(x,t) = Σ un

u(x,0) = ΣAnsin(nπx/L) = 0

Question: Does this make An=0?

2. Originally Posted by linalg123
Question: Solve the wave equation given the following boundary conditions.
u(0,t)=0
u(L,t)=0
u(x,0)=0

du/dt|t=0= x(L-x)

Attempt:
ok i'm not gonna write out all the steps because i can't use latex and it will be really messy, but i have
un= [Ancos(nπαt/L) + Bnsin(nπαt/L)]sin(nπx/L)
u(x,t) = Σ un

u(x,0) = ΣAnsin(nπx/L) = 0

Question: Does this make An=0?

Yes it does and the form of your solution is correct so far.

3. ok so

du/dt= Σ Bn(nπα/L)sin(nπx/L)

du/dt|t=0 = x(L-x) = Σ Bn(nπα/L)sin(nπx/L)

Bn(nπα/L) = 2/L ∫ x(L-x)sin(nπx/L).dx

Bn= 2/(nπα) ∫ x(L-x)sin(nπx/L).dx

i'm getting stuck here.. do i expand the bracket or can i integrate this from here?

4. Originally Posted by linalg123
ok so

du/dt= Σ Bn(nπα/L)sin(nπx/L)

du/dt|t=0 = x(L-x) = Σ Bn(nπα/L)sin(nπx/L)

Bn(nπα/L) = 2/L ∫ x(L-x)sin(nπx/L).dx

Bn= 2/(nπα) ∫ x(L-x)sin(nπx/L).dx

i'm getting stuck here.. do i expand the bracket or can i integrate this from here?
Okay so you have

$\displaystyle u_{n}(x,t)=\sum B_n\sin\left( \frac{n\pi \alpha t}{l} \right)\sin\left(\frac{n \pi x}{l} \right)$

Now if you take a partial with respect to t you get

$\displaystyle \frac{\partial u_n}{\partial t}\bigg|_{(x,t)}=\sum B_n\cdot \frac{n \pi \alpha}{L} \cdot \cos\left( \frac{n\pi \alpha t}{L} \right)\sin\left(\frac{n \pi x}{L} \right)$

evaluating when t=0 and for each n this gives

$\displaystyle x(L-x)= B_n\cdot \frac{n \pi \alpha}{L} \cdot \sin\left(\frac{n \pi x}{L} \right)$

Now just use orthogonality to solve for the B's.

5. Originally Posted by TheEmptySet

$\displaystyle x(L-x)= B_n\cdot \frac{n \pi \alpha}{L} \cdot \sin\left(\frac{n \pi x}{L} \right)$

Now just use orthogonality to solve for the B's.
In the book it says from here you calculate the B's using a half range sine expansion.
I know orthogonality means perpendicular, but i'm not sure what you mean by 'use orthogonality' in this context.

6. Originally Posted by linalg123
In the book it says from here you calculate the B's using a half range sine expansion.
I know orthogonality means perpendicular, but i'm not sure what you mean by 'use orthogonality' in this context.
I am just saying the same thing as your book. We know that

$\displaystyle \int_{0}^{L}\sin\left(\frac{n \pi x}{L}\right) \sin\left(\frac{m \pi x}{L}\right)dx=\frac{L}{2}\delta_{m,n}$

So multiply both sides of the equation by

$\displaystyle \sin\left(\frac{n \pi x}{L}\right)$

and integrate from 0 to L to get

$\displaystyle \int_{0}^{l}x(L-x)\sin\left(\frac{n \pi x}{L}\right)dx= B_n\cdot \frac{n \pi \alpha}{L} \frac{L}{2}=B_n\cdot \frac{n \pi \alpha}{2}$

Now you can solve for all of the B's

7. Originally Posted by TheEmptySet

$\displaystyle \sin\left(\frac{n \pi x}{L}\right)$

and integrate from 0 to L to get

$\displaystyle \int_{0}^{l}x(L-x)\sin\left(\frac{n \pi x}{L}\right)dx= B_n\cdot \frac{n \pi \alpha}{L} \frac{L}{2}=B_n\cdot \frac{n \pi \alpha}{2}$

Now you can solve for all of the B's
for this integral i got $\displaystyle \frac{2L^3}{n^3 \pi^3} - \frac{2L^3(-1)^n}{n^3 \pi^3} = B_n\cdot \frac{n \pi \alpha}{2}$

$\displaystyle B_n= \frac{4L^3}{n^4 \pi^4 \alpha}\cdot ( 1 - (-1)^n)$
does this look right?

8. Originally Posted by linalg123
for this integral i got $\displaystyle \frac{2L^3}{n^3 \pi^3} - \frac{2L^3(-1)^n}{n^3 \pi^3} = B_n\cdot \frac{n \pi \alpha}{2}$

$\displaystyle B_n= \frac{4L^3}{n^4 \pi^4 \alpha}\cdot ( 1 - (-1)^n)$
does this look right?
Yes that is what I get.