# Wave Equation problem

• Aug 22nd 2007, 09:39 PM
Wave Equation problem
Solve the wave equation subject to the boundary conditions of u(0,t) - 0 for t>=0, and u(L,t)=0, for t>=0.

u(x,0) = f(x) for 0<=x<=L
du/dt (x,0) = g(x)

f(x) = sin (2pix/L) , g(x) = 0

Note: Sorry but I don't even understand what the problem is asking, I have a really bad professor for this course (Applied Math), and to be honest, I had him before and I had to learn everything on my own. But then was Calculus I, and now this is difficult, I don't know even where to start, please help!

Thank you.
• Aug 23rd 2007, 05:08 AM
topsquark
Quote:

Solve the wave equation subject to the boundary conditions of u(0,t) - 0 for t>=0, and u(L,t)=0, for t>=0.

u(x,0) = f(x) for 0<=x<=L
du/dt (x,0) = g(x)

f(x) = sin (2pix/L) , g(x) = 0

Note: Sorry but I don't even understand what the problem is asking, I have a really bad professor for this course (Applied Math), and to be honest, I had him before and I had to learn everything on my own. But then was Calculus I, and now this is difficult, I don't know even where to start, please help!

Thank you.

The problem is to solve:
$u_{tt} - c^2u_{xx} = 0$
given
$u(0, t) = 0$ for $t \geq 0$
and
$u(L, t) = 0$ for $t \geq 0$
and
$u(x, 0) = sin \left ( \frac{2 \pi x}{L} \right )$ for $0 \leq x \leq L$
and
$u_t(x, 0) = 0$

The general solution of the wave equation is
$u(x, t) = \frac{f(x - ct) + f(x + ct)}{2} + \frac{1}{2c} \int_{x - ct}^{x + ct} g(s) ds$
where
$u(x, 0) = f(x)$
and
$u_t(x, 0) = g(x)$

So the solution will be of the form:
$u(x, t) = \frac{1}{2} sin \left ( \frac{2 \pi (x - ct)}{L} \right ) + \frac{1}{2} sin \left ( \frac{2 \pi (x + ct)}{L} \right )$

You may check that this solution indeed satisfies the boundary conditions.

-Dan
• Aug 23rd 2007, 05:43 AM
ThePerfectHacker
Another way which works nicely here is to use seperation of variables. Since $\cos \frac{2\pi x}{L}$ is orthogonal to sines and cosine the infinite series is actually finite. Try it.

I need to leave now. When I come back.
• Aug 23rd 2007, 07:32 AM
I'm still quite lost. So far we still haven't learn this general solution of $
u(x, t) = \frac{f(x - ct) + f(x + ct)}{2} + \frac{1}{2c} \int_{x - ct}^{x + ct} g(s) ds
$

Is this given or you actually compute it?

My professor did one example, and man, he didn't even get to finish it because he tried to do it in the last few seconds of the class. He has f(x) = 0, g(x) = sin(pi*x/L). Then he took the du/dt, and then he stopped there...

So is that a way to solve it without using the general solution? Like the separation of variables as the last post suggested?

Thank you.
• Aug 23rd 2007, 08:54 AM
topsquark
Quote:

I'm still quite lost. So far we still haven't learn this general solution of $
u(x, t) = \frac{f(x - ct) + f(x + ct)}{2} + \frac{1}{2c} \int_{x - ct}^{x + ct} g(s) ds
$

Is this given or you actually compute it?

My professor did one example, and man, he didn't even get to finish it because he tried to do it in the last few seconds of the class. He has f(x) = 0, g(x) = sin(pi*x/L). Then he took the du/dt, and then he stopped there...

So is that a way to solve it without using the general solution? Like the separation of variables as the last post suggested?

Thank you.

-Dan
• Aug 23rd 2007, 09:46 AM
Thanks! Now I understand how to get the general solution and how to use it.

I presume that the second part of the general solution, the integral of g(s) will go to zero as g(x) = 0? (1st fundamental theorem of cal?)
• Aug 23rd 2007, 11:46 AM
topsquark
Quote:

Thanks! Now I understand how to get the general solution and how to use it.

I presume that the second part of the general solution, the integral of g(s) will go to zero as g(x) = 0? (1st fundamental theorem of cal?)

Yup!

-Dan
• Aug 23rd 2007, 12:15 PM
ThePerfectHacker
Quote:

Solve the wave equation subject to the boundary conditions of u(0,t) - 0 for t>=0, and u(L,t)=0, for t>=0.

u(x,0) = f(x) for 0<=x<=L
du/dt (x,0) = g(x)

f(x) = sin (2pix/L) , g(x) = 0

Given the equation,
$\frac{\partial ^ 2 u}{\partial t^2} - c^2 \frac{\partial ^2 u}{\partial x^2} = 0$.

With homogenous boundary value problem,
$u(0,t)=u(L,t)=0$

And initial value problems,
$u(x,0)=f(x) \mbox{ and }u_t(x,0)=g(x)$

The solution is,
$u(x,t) = \sum_{n=1}^{\infty} \left( A_n \cos \frac{\pi n c t}{L} + B_n \sin \frac{\pi n c t}{L}\right) \sin \frac{\pi n x}{L}$

Where,
$A_n = \frac{2}{L} \int_0^L f(x) \sin \frac{\pi n x}{L} dx$
$B_n = \frac{2}{\pi n c}\int_0^L g(x) \sin \frac{\pi n x}{L} dx$

In this problem $g(x) = 0 \mbox{ on }[0,L]$ thus, $B_n = 0$ for all $n\geq 1$.

And, $f(x) = \sin \frac{2\pi x}{L}$.
Thus, $A_n = \frac{2}{L}\int_0^L \sin \frac{2\pi x}{L} \cdot \sin \frac{\pi n x}{L} dx$

Use the following result:
Theorem: The set $\left\{ \sin \frac{\pi n x}{L} \right\}$ is orthogonal on $[-L,L]$.
And furthermore,
$\int_{-L}^L \sin \frac{\pi n x}{L} \sin \frac{\pi m x}{L} dx = L \delta_{nm}$.
(Where $\delta_{nm}$ is the Kronecker Delta.)

Which means,
$\int_0^L \sin \frac{2\pi x}{L} \sin \frac{\pi n x}{L} = \frac{L}{2} \cdot \delta_{2n} = \left\{ \begin{array}{c}\frac{L}{2} \mbox{ if }n=2 \\ 0 \mbox{ if }n\not = 2 \end{array} \right.$

This tells us that $A_1=0,A_2=1,A_3=0,A_4=0,...$.

Hence the solution is,
$u(x,t) = \cos \frac{2\pi ct}{L} \sin \frac{2\pi x}{L}$

NOTE: Topsquark used something called d'Alembert's General Solution.