# How can I find the wave equation u(x,t) of a string

Find the wave equation U(x,t) of a vibrating string with linear density d, tension p, initial velocity zero, weight L and initial displacement

U0(x) = a1*sin(2*pi*x/L)+a2*sin(4*pi*x/L).

The U(x,t) solution must me a sum of sine and cosine functions, like

ΣBn*cos(n*pi*a*t/L)*sin(n*pi*x/L).

Then Bn is found with Bn=∫U0(x)*sin(n*pi*x/L)dx. I'm a little lost with all these substitiution that leads me to big integrals with no solution.

haruspex
Homework Helper
Gold Member
2020 Award
Just apply the given boundary conditions to your general expression.

I did, but the answer is a sum of sine and cosine times Bn term wich is still in terms of a1 and a2. I'm very confused. I did the calculus throught Maple.

haruspex
Homework Helper
Gold Member
2020 Award
I did, but the answer is a sum of sine and cosine times Bn term wich is still in terms of a1 and a2. I'm very confused. I did the calculus throught Maple.
Please post your working. If I cannot see it then I cannot know what you have wrong or exactly where you are stuck.
Apart from one differentiation, you should not need any calculus.

Ok, that was how I did. The ##U(x,t)## solution must me a sum of sine and cosine functions, then $$U\left(u,t\right) = \sum_{n=0}^\infty B_n \cos\left( \frac {n \pi a t} {L} \right) \sin\left( \frac {n \pi a t} {L} \right)$$ and ##B_n## can be found using $$B_n = \frac 2 L \int_0^L f(x)\sin\left( \frac {n \pi a t}{L} \right)\, dx$$.
To get ##B_n## I applied ##f(x)## on the second equation above: $$B_n = \frac 2 L \{ a_1 \int_0^L \sin\left( \frac {2 x \pi }{L} \right) \sin\left( \frac {n x \pi }{L} \right) \, dx + a_2 \int_0^L \sin\left( \frac {4 x \pi }{L} \right) \sin\left( \frac {n x \pi }{L} \right) \, dx \}$$. These two integrals I used Maple to get the result, and it returned me: $$B_n = \frac {a_1} {\pi} \left[ \frac {\sin \left( n \pi - 2 \pi \right)} {\left( n - 2 \right)} - \frac {\sin \left( n \pi - 2 \pi \right)} {\left( n + 2 \right)} \right] + \frac {a_1} {\pi} \left[ \frac {\sin \left( n \pi - 4 \pi \right)} {\left( n - 4 \right)} - \frac {\sin \left( n \pi + 4 \pi \right)} {\left( n + 4 \right)} \right]$$. That was I found. Should I apply the ##B_n## on the ##U(x,t)## equation now?

Last edited:
haruspex
Homework Helper
Gold Member
2020 Award
and Bn can be found using
Sure, but that's a sledgehammer to crack a nut.
You have at t=0 ##a_1\sin(2\pi x/L)+a_2\sin(4\pi x/L)=\Sigma B_n\sin(n\pi x/L)##.
Can you not write down the values of the Bn by inspection?

I've tried it. But that's what is getting me confuse. ##B_n = a_1, a_2## then? Thank you the help. It's the first exercise that I'm really stuck about vibrating waves.

The wave equation is $$U(x,t) = a_1 \cos \left( \frac {2 \pi x a t} {L} \right) \sin \left( \frac {2 \pi x} {L} \right) + a_2 \cos \left( \frac {4 \pi x a t} {L} \right) \sin \left( \frac {4 \pi x} {L} \right)$$ with ##n = 2,4##. Do you have some tip to find ##a_1## and ##a_2##?

haruspex