Solving the wave equation with piecewise initial conditions

  • Thread starter Thread starter songoku
  • Start date Start date
songoku
Messages
2,467
Reaction score
382
Homework Statement
Given that u(x,t) is displacement of string vibration, find the solution of the following wave equation based on the initial and boundary conditions:
##u_{tt}=u_{xx}, 0<x<2##
##u(0)=u(2)=0##
##u(x,0)=
\begin{cases}
0.1x & \text{if } 0<x<1 \\
0.1(2-x) & \text{if } 1\leq x<2
\end{cases}##
##u_{t}(x,0)=0##
Relevant Equations
D’Alembert’s Formula
I have solved the question using formula:
$$u(x,t)=\Sigma_{n=1}^{\infty} \sin \left(\frac{n \pi x}{2}\right) \left[a_n \frac{2}{n \pi} \sin \left(\frac{n \pi t}{2}\right)+b_n \cos \left(\frac{n \pi t}{2}\right)\right]$$

and I get:
$$u(x,t)=\Sigma_{n=1}^{\infty} \frac{0.8}{n^2 \pi^2}\sin \left(\frac{n \pi}{2}\right) \cos \left(\frac{n \pi t}{2}\right) \sin \left(\frac{n \pi x}{2}\right)$$

as the solution.

I want to try using d’Alembert’s Formula: ##u(x,t)=A(x-t)+B(x+t)## where
$$A(y)=\frac{1}{2} \left(F(y)-\int_{0}^{y} G(x) dx \right)$$
$$B(y)=\frac{1}{2} \left(F(y)+\int_{0}^{y} G(x) dx \right)$$
and ##F## and ##G## are and odd periodic extensions of ##f(x)## and ##g(x)## (##f(x)=u(x,0)## and ##g(x)=u_{t}(x,0)##)

For this question, ##g(x)=0## so ##G(x)## is also 0. For ##F(y)##:
$$F(y)=
\begin{cases}
-0.1(2+y) &, -2<y<-1 \\
0.1y & , -1<y<1 \\
0.1(2-y) & , 1\leq y<2
\end{cases}$$

$$A(x-t)=\frac{1}{2} F(x-t)=
\begin{cases}
-0.1(2+x-t) &, -2<x<-1 \\
0.1(x-t) & , -1<x<1 \\
0.1(2-x+t) & , 1\leq x<2
\end{cases}
$$

$$B(x+t)=\frac{1}{2} F(x+t)=
\begin{cases}
-0.1(2+x+t) &, -2<x<-1 \\
0.1(x+t) & , -1<x<1 \\
0.1(2-x-t) & , 1\leq x<2
\end{cases}
$$

So:
$$u(x,t)=A(x-t)+B(x+t)$$
$$=
\begin{cases}
-0.2(2+x) &, -2<x<-1 \\
0.2x & , -1<x<1 \\
0.2(2-x) & , 1\leq x<2
\end{cases}
$$

Is this even correct? Is it possible to get the same solution in sigma form using D’Alembert’s Formula?

Thanks
 
Physics news on Phys.org
That doesn't look like a proper periodic extension of ##f## at all. Also, ##F## has conditions on its argument, which is ##x - t## or ##x+t##, not ##x##.

It is easier to just describe ##F## on one full period of ##F## and then just refer to it as periodic with that period.
 
Orodruin said:
That doesn't look like a proper periodic extension of ##f## at all. Also, ##F## has conditions on its argument, which is ##x - t## or ##x+t##, not ##x##.

It is easier to just describe ##F## on one full period of ##F## and then just refer to it as periodic with that period.
I am sorry I don't understand the hint.

This is what I thought: F should be periodic in interval (-2, 2). The initial graph of ##f(x)## has the shape of triangle and the reflection about origin will produce inverted triangle for interval (-2, 0). This is the graph with the corresponding equation for each interval:

1743655655464.png


Is that not the odd periodic extension of ##f(x)##?

Thanks
 
songoku said:
I am sorry I don't understand the hint.

This is what I thought: F should be periodic in interval (-2, 2). The initial graph of ##f(x)## has the shape of triangle and the reflection about origin will produce inverted triangle for interval (-2, 0). This is the graph with the corresponding equation for each interval:

View attachment 359404

Is that not the odd periodic extension of ##f(x)##?

Thanks
A periodic function repeats once every period forever. Your function is only defined on (-2,2).
 
Orodruin said:
A periodic function repeats once every period forever. Your function is only defined on (-2,2).
Do you mean I need to use Fourier sine series to represent the periodic function to cover every period forever?
 
songoku said:
Do you mean I need to use Fourier sine series to represent the periodic function to cover every period forever?
No. You need to somehow specify that your function has a period of 4.
 
Orodruin said:
No. You need to somehow specify that your function has a period of 4.
$$F(x)=
\begin{cases}
-0.1(2+x) &, -2+4t<x\leq -1+4t \\
0.1x & , -1+4t<x\leq 1+4t \\
0.1(2-x) & , 1+4t< x\leq 2+4t
\end{cases}$$

where ##t \in \mathbb Z##

Is this what you mean?

Thanks
 
songoku said:
$$F(x)=
\begin{cases}
-0.1(2+x) &, -2+4t<x\leq -1+4t \\
0.1x & , -1+4t<x\leq 1+4t \\
0.1(2-x) & , 1+4t< x\leq 2+4t
\end{cases}$$

where ##t \in \mathbb Z##

Is this what you mean?

Thanks

That doesn't work; adding 4 to x adds -0.4 to F(x) in the first and third cases and 0.4 in the second case. The function is therefore not periodic.

The idea is to say that if 4n \leq x &lt; 4n+1 (don't use t for this purpose; the question has already defined that to mean something else) then F(x) = F_0(x - 4n) where <br /> F_0 : [0,4) \to \mathbb{R} : x \mapsto \begin{cases}<br /> 0.1x &amp; 0 \leq x &lt; 1 \\<br /> 0.1(2 - x) &amp; 0 \leq x &lt; 3 \\<br /> 0.1(x-4) &amp; 3 \leq x &lt; 4 \end{cases} or perhaps that if 4n - 1 \leq x &lt; 4n+3 then F(x) = F_1(x - 4n) where <br /> F_1 : [-1,3) \to \mathbb{R}: x \mapsto \begin{cases}<br /> 0.1x &amp; -1 \leq x &lt; 1 \\<br /> 0.1(2-x) &amp; 1 \leq x &lt; 3 \end{cases}
 
  • Like
Likes songoku and Orodruin
pasmith said:
That doesn't work; adding 4 to x adds -0.4 to F(x) in the first and third cases and 0.4 in the second case. The function is therefore not periodic.
For a function to be periodic, each case of the piecewise function should increase by same amount if we add the period to the function?
pasmith said:
or perhaps that if 4n - 1 \leq x &lt; 4n+3 then F(x) = F_1(x - 4n) where <br /> F_1 : [-1,3) \to \mathbb{R}: x \mapsto \begin{cases}<br /> 0.1x &amp; -1 \leq x &lt; 1 \\<br /> 0.1(2-x) &amp; 1 \leq x &lt; 3 \end{cases}
This is ##F_1 (x)## so:
$$F_1(x - 4n)=
\begin{cases}
0.1(x-4n) & -1 \leq x-4n < 1 \\
0.1(2-(x-4n)) & 1 \leq x-4n < 3 \end{cases}
$$

Do I interpret that correctly? Thanks
 
  • #10
songoku said:
For a function to be periodic, each case of the piecewise function should increase by same amount if we add the period to the function?

This is ##F_1 (x)## so:
$$F_1(x - 4n)=
\begin{cases}
0.1(x-4n) & -1 \leq x-4n < 1 \\
0.1(2-(x-4n)) & 1 \leq x-4n < 3 \end{cases}
$$

Do I interpret that correctly? Thanks
No, f(x) is periodic with period p if for k Integer, f(x)=f(x+kp).
 
  • #11
The Fourier solution in the original post is correct and it is a periodic function with a period of ## 4 ##.
The d’Alembert solution is correct too, but only for ## t=0 ## and the multiplication by ## 1/2 ## should be included.
Intervals in the expression for ## A(x-t) ## should be changed into ## \begin{cases}...-2\lt x-t\le -1\\...-1\lt x-t\lt 1\\...1\le x-t\lt 2\end{cases} ## and the multiplication by ## 1/2 ## should be included and intervals in the expression for ## B(x+t) ## should be changed into ## \begin{cases}...-2\lt x+t\le -1\\...-1\lt x+t\lt 1\\...1\le x+t\lt 2\end{cases} ## and the multiplication by ## 1/2 ## should be included.

There is a connection between two solutions. See https://www.math.purdue.edu/~eremenko/dvi/dalembert2.pdf.

songoku said:
$$F(y)=
\begin{cases}
-0.1(2+y) &, -2<y<-1 \\
0.1y & , -1<y<1 \\
0.1(2-y) & , 1\leq y<2
\end{cases}$$
You can add that ## F(x+4n)=F(x) ## where ## n ## is an integer to make ## F(x) ## a periodic function with a period of ## 4 ##. The same holds for ## A(x) ##, ## B(x) ## and the final d’Alembert solution in the original post.
 
  • #12
I am really sorry for late reply


Gavran said:
The Fourier solution in the original post is correct and it is a periodic function with a period of ## 4 ##.
The d’Alembert solution is correct too, but only for ## t=0 ## and the multiplication by ## 1/2 ## should be included.
Intervals in the expression for ## A(x-t) ## should be changed into ## \begin{cases}...-2\lt x-t\le -1\\...-1\lt x-t\lt 1\\...1\le x-t\lt 2\end{cases} ## and the multiplication by ## 1/2 ## should be included and intervals in the expression for ## B(x+t) ## should be changed into ## \begin{cases}...-2\lt x+t\le -1\\...-1\lt x+t\lt 1\\...1\le x+t\lt 2\end{cases} ## and the multiplication by ## 1/2 ## should be included.

There is a connection between two solutions. See https://www.math.purdue.edu/~eremenko/dvi/dalembert2.pdf.


You can add that ## F(x+4n)=F(x) ## where ## n ## is an integer to make ## F(x) ## a periodic function with a period of ## 4 ##. The same holds for ## A(x) ##, ## B(x) ## and the final d’Alembert solution in the original post.
I think I get this.

Thank you very much for all the help and explanation Orodruin, pasmith, WWGD, Gavran
 
  • Like
Likes Gavran and WWGD
Back
Top