# Wave equation boundary problem

## Homework Statement

The question is

Ytt- c^2Yxx =0 on the doman 0<x< +infinity

where initia conditions are y(x,0) = e^-x^2 = f(x) , Yt(x,0) =x*e^-x^2 = g(n)

and boundary condition is y(0,t) = 0 and c = 2

## Homework Equations

D'Almbert solution 1/2(f(x+ct)+f(x-ct))+1/2c∫ g(n) dn over the limits (x+ct) to (x-ct)

## The Attempt at a Solution

So I just plugged in the f(x) and g(x) in the D'alembert solution to get

1/2(e^-(x+2t)^2+e^-(x-2t)^2)+1/4 ∫ g(n)

but since we need to make it an odd function to apply D'alembert I then did -f(x) = f(-x) and -g(x) = g(-x)

So I split the ∫ g(n) into two parts which are

∫g(n) over the limits 0 to x-2t + ∫g(n) over the limits x+2t to 0 then in order to give it oddness to the first part

I did -∫g(-n) over the limits 0 to x-2t so the limits changed to 0 to x+2t and finally I ended up with

1/4( ∫-1/2*e^-x^2 over the limits 0 to x+2t + ∫-1/2*e^-x^2 over the limits x+2t to 0)

integration of x*e^-x^2 = -1/2*e^-x^2.

As for the f(x) we know f(-x) = -f(x) so I did

1/2(1/2(e^-(x+2t)^2-e^-(x+2t)^2) to give it oddness, now that both functions have been given oddness my wave solution is

1/2(1/2(e^-(x+2t)^2-e^-(x+2t)^2)+ 1/4( ∫-1/2*e^-x^2 over the limits 0 to x+2t + ∫-1/2*e^-x^2 over the limits x+2t to 0)

When I apply the boundary condition y(0,t) = 0 I see that

the f(x) term 1/2(1/2(e^-(x+2t)^2-e^-(x+2t)^2) = 0. As for the g(n) part after applying the limits and boundary condition
I end up with

1/4(-1/2+1/2*e^-(2t)^2+ -1/2 *e^-(2t)^2 + 1/2) = 0

Can you please tell me if everything I did above was the correct way to do it. Many thanks.

So I just plugged in the f(x) and g(x) in the D'alembert solution to get

## \frac {1} {2} (e^{-(x+2t)^2}+e^{-(x-2t)^2})+ \frac {1} {4} ∫ g(n) ##

but since we need to make it an odd function to apply D'alembert I then did -f(x) = f(-x) and -g(x) = g(-x)

So I split the ∫ g(n) into two parts which are

## \int_{x-2t}^0 g(n) \ ## and ## \int_0^{x+2t} g(n) \ ##

I did ## -\int_{x-2t}^0 g(-n) \ ## for the first part so the limits changed to 0 to x+2t and finally for the integration part of the equation I ended up with

1/4( ## \int_{x+2t}^0 \ ## ## -\frac {1} {2} e^{-(x)^2} \ ## + ## \int_0^{x+2t} \ ## ## -\frac {1} {2} e^{-(x)^2} \ ##)

## \int x e^{-(x)^2} \ ## = ## -\frac {1} {2} e^{-(x)^2} \ ##

As for the f(x) we know f(-x) = -f(x) so I did

## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## to give it oddness, now that both functions have been given oddness my wave solution is

## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## + ## \frac {1} {4} /## ( ## \int_{x+2t}^0 \ ## ## -\frac {1} {2} e^{-(x)^2} \ ## + ## \int_0^{x+2t} \ ## ## -\frac {1} {2} e^{-(x)^2} \ ##)

When I apply the boundary condition y(0,t) = 0 I see that

The f(x) part of the equation ## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## = 0. As for the g(n) part after applying the limits and boundary condition I end up with

## \frac {1} {4} \ ## ( ## -\frac {1} {2} \ ## + ## \frac {1} {2} e^{-(2t)^2} \ ## - ## \frac {1} {2} e^{-(2t)^2} \ ## + ## \frac {1} {2} \ ## ) which is = 0

Can you please tell me if everything I did so far above to satisfy the boundary condition was the correct way to do it. Many thanks.

Ray Vickson
Homework Helper
Dearly Missed
So I just plugged in the f(x) and g(x) in the D'alembert solution to get

## \frac {1} {2} (e^{-(x+2t)^2}+e^{-(x-2t)^2})+ \frac {1} {4} ∫ g(n) ##

but since we need to make it an odd function to apply D'alembert I then did -f(x) = f(-x) and -g(x) = g(-x)

So I split the ∫ g(n) into two parts which are

## \int_{x-2t}^0 g(n) \ ## and ## \int_0^{x+2t} g(n) \ ##

I did ## -\int_{x-2t}^0 g(-n) \ ## for the first part so the limits changed to 0 to x+2t and finally for the integration part of the equation I ended up with

1/4( ## \int_{x+2t}^0 \ ## ## -\frac {1} {2} e^{-(x)^2} \ ## + ## \int_0^{x+2t} \ ## ## -\frac {1} {2} e^{-(x)^2} \ ##)

## \int x e^{-(x)^2} \ ## = ## -\frac {1} {2} e^{-(x)^2} \ ##

As for the f(x) we know f(-x) = -f(x) so I did

## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## to give it oddness, now that both functions have been given oddness my wave solution is

## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## + ## \frac {1} {4} /## ( ## \int_{x+2t}^0 \ ## ## -\frac {1} {2} e^{-(x)^2} \ ## + ## \int_0^{x+2t} \ ## ## -\frac {1} {2} e^{-(x)^2} \ ##)

When I apply the boundary condition y(0,t) = 0 I see that

The f(x) part of the equation ## \frac {1} {2} (e^{-(x+2t)^2}-e^{-(x+2t)^2}) \ ## = 0. As for the g(n) part after applying the limits and boundary condition I end up with

## \frac {1} {4} \ ## ( ## -\frac {1} {2} \ ## + ## \frac {1} {2} e^{-(2t)^2} \ ## - ## \frac {1} {2} e^{-(2t)^2} \ ## + ## \frac {1} {2} \ ## ) which is = 0

Can you please tell me if everything I did so far above to satisfy the boundary condition was the correct way to do it. Many thanks.
You can easily check this for yourself (and doing that is a good habit---especially in an environment where no outside help is available, such as on an exam or whatever). Just check:
(1) Does your solution satisfy the wave equation? (Just take derivatives, substitute into the equation, etc.).
(2) Does your solution satisfy the initial condition?
(3) Does it satisfy the boundary condition?

If the answer is yes for all three, then you have done it correctly.

You can easily check this for yourself (and doing that is a good habit---especially in an environment where no outside help is available, such as on an exam or whatever). Just check:
(1) Does your solution satisfy the wave equation? (Just take derivatives, substitute into the equation, etc.).
(2) Does your solution satisfy the initial condition?
(3) Does it satisfy the boundary condition?

If the answer is yes for all three, then you have done it correctly.
I can satisfy the boundary and initial condition but I just want to know if I am actually doing it the right way. Just want someone experienced to check that I just didn't get it correct by fluke. Can you please check if the way I satisfied the boundary condition is correct?

Ray Vickson
Homework Helper
Dearly Missed
I can satisfy the boundary and initial condition but I just want to know if I am actually doing it the right way. Just want someone experienced to check that I just didn't get it correct by fluke. Can you please check if the way I satisfied the boundary condition is correct?
It looks OK to me, but I did not check all the details from A to Z. The way you did it is the way I would have done it.

It looks OK to me, but I did not check all the details from A to Z. The way you did it is the way I would have done it.
Okay can you please fully check the part of how I made the f(x+ct)+f(x-ct) part of the equation equal to zero. Can you confirm if its correct

Ray Vickson
Homework Helper
Dearly Missed
Okay can you please fully check the part of how I made the f(x+ct)+f(x-ct) part of the equation equal to zero. Can you confirm if its correct
I think you did the right things, but you should present an explicit formula for the final result. This would be
$$y(x,t) = F(x+2t) + F(x-2t) + G(x+2t) - G(x-2t),\\ \text{where}\\ F(w) = \frac{1}{2} \text{sign}(w) e^{-w^2}, \;\; G(w) = -\frac{1}{8} e^{-w^2}$$
Here,
$$\text{sign}(w) = \begin{cases} \;\;1, &w > 0\\ -1,& w < 0 \end{cases}$$

I think you did the right things, but you should present an explicit formula for the final result. This would be
$$y(x,t) = F(x+2t) + F(x-2t) + G(x+2t) - G(x-2t),\\ \text{where}\\ F(w) = \frac{1}{2} \text{sign}(w) e^{-w^2}, \;\; G(w) = -\frac{1}{8} e^{-w^2}$$
Here,
$$\text{sign}(w) = \begin{cases} \;\;1, &w > 0\\ -1,& w < 0 \end{cases}$$
Isn't that what I did though? Because we can't write the (x+ct) and (x-ct) in the general form here it has to be written as exponential so ## \ e^{x+ct} \ ## like that. The (x-ct) part represents the x < 0 right? so I always multiply the (x-ct) part with negative sign. is that correct?

Ray Vickson
Homework Helper
Dearly Missed
Isn't that what I did though? Because we can't write the (x+ct) and (x-ct) in the general form here it has to be written as exponential so ## \ e^{x+ct} \ ## like that. The (x-ct) part represents the x < 0 right? so I always multiply the (x-ct) part with negative sign. is that correct?
I cannot really tell, since you do not, finally, put everything together in a nicely-readable form. You show bits of the calculation, but not the final answer, at least not that I could see. And NO, the x-ct part does not represent x < 0, since it may be > 0. It represents a right-ward moving wave front (while the x+ct part represents a left-ward moving wave). Basically, you have a mix of waves moving to the right and to the left, with reflection at x = 0 (giving you the condition y(0,t) = 0).

I cannot understand your comment that we can't write the x+ct and x-ct in general form, but has to be written as ##e^{x+ct}##. You can always write it as I did, and in turning it in for marking, you probably should. However, I wrote it in summary form, but still completely correctly (because I did define the functions F and G---they are not general functions, but specific ones that fit the original problem).

Anyway, what I wrote is 100% correct, and since I do not have both of my (x-ct) parts multiplied by a negative sign, then the answer to your last question has to be NO (at least as you have written it).

I cannot really tell, since you do not, finally, put everything together in a nicely-readable form. You show bits of the calculation, but not the final answer, at least not that I could see. And NO, the x-ct part does not represent x < 0, since it may be > 0. It represents a right-ward moving wave front (while the x+ct part represents a left-ward moving wave). Basically, you have a mix of waves moving to the right and to the left, with reflection at x = 0 (giving you the condition y(0,t) = 0).

I cannot understand your comment that we can't write the x+ct and x-ct in general form, but has to be written as ##e^{x+ct}##. You can always write it as I did, and in turning it in for marking, you probably should. However, I wrote it in summary form, but still completely correctly (because I did define the functions F and G---they are not general functions, but specific ones that fit the original problem).

Anyway, what I wrote is 100% correct, and since I do not have both of my (x-ct) parts multiplied by a negative sign, then the answer to your last question has to be NO (at least as you have written it).
What do you mean by bits of calculation? I have given the entire question and entire step by step workout to saitsfy the boundary condition. Now can you please tell what else do you need?

My f(x) function is now ## \ e^{-(x)^2} \ ## so I can't write it as f(x+ct)+f(x-ct), I have to write it as ## \ e^{-(x+ct)^2} \ ## + ## \ e^{-(x-ct)^2} \ ##. Do you understand what I am trying to say?

And also which part does -1, x<0 represent then?

Ray Vickson
Homework Helper
Dearly Missed
What do you mean by bits of calculation? I have given the entire question and entire step by step workout to saitsfy the boundary condition. Now can you please tell what else do you need?

It is not what I need, but what you (might) need to hand in for marking. As I have already said, a final presentation of the entire solution, all neatly bundled up and summarizing all the work that has gone into it would be what I would need if I were marking the question.

My f(x) function is now ## \ e^{-(x)^2} \ ## so I can't write it as f(x+ct)+f(x-ct), I have to write it as ## \ e^{-(x+ct)^2} \ ## + ## \ e^{-(x-ct)^2} \ ##. Do you understand what I am trying to say?

No. If ##f(w) = e^{-w^2}##, what prevents me from writing ##f(x+ct)## and ##f(x-ct)##? So, to turn your question around: do you understand what I am trying to say? I think it is very important that you work on this and struggle until you get it, because that is exactly the type of thing that appears over and over and over again in the subject.

And also which part does -1, x<0 represent then?
It is not part of the problem, so does not represent anything. That is specifically why I used ##w## instead of ##x## when defining the functions F and G. The arguments of F and G are ##w = x - ct## or ##w = x + ct##. Certainly we can have ##x - ct < 0##, so we need F and G to be defined for negative arguments, but those arguments are not x!

Note added in edit: The statement above may be too hasty. Things with ##x < 0## may represent "imaginary" mirror-images of real things for ##x > 0##. In fact, some problems are most easily solved by imagining mirror-images at ##x < 0## and looking at their influences on real things at ##x > 0##---basically, the Method of Images; see, eg.,
http://en.wikipedia.org/wiki/Method_of_images or
http://web.hep.uiuc.edu/home/serrede/P435/Lecture_Notes/P435_Lect_06.pdf or

For your problem, the ##x < 0## region is a source of "fictitious" waves that produce the same effect as real waves being reflected off ##x = 0## in the real physical region with ##x \geq 0##. In other words, you could replace your bounded problem by an unbounded problem on ##-\infty < x < \infty##, with left- and right-moving waves coming in exactly the right proportions to produce the initial and boundary conditions on ##x \geq 0##

Last edited:
It is not part of the problem, so does not represent anything. That is specifically why I used ##w## instead of ##x## when defining the functions F and G. The arguments of F and G are ##w = x - ct## or ##w = x + ct##. Certainly we can have ##x - ct < 0##, so we need F and G to be defined for negative arguments, but those arguments are not x!
You're just saying f(w) = ## \ e^{-(w)^2} \ ## where w = x+ct or x-ct. Is that it? The part where you expressed F and G in explicit forms, what's the point of doing it...for this question am I supposed to have one equation? Because it seems like to satisfy the initial conditions the F and G parts of the equation needs to be different in each case.

Ray Vickson
Homework Helper
Dearly Missed
You're just saying f(w) = ## \ e^{-(w)^2} \ ## where w = x+ct or x-ct. Is that it? The part where you expressed F and G in explicit forms, what's the point of doing it...for this question am I supposed to have one equation? Because it seems like to satisfy the initial conditions the F and G parts of the equation needs to be different in each case.
I don't know if you looked at the edited version of my previous post---it has some additional information that deals in a better way with your question about x < 0.

Anyway, I do not understand what you are trying to say, and I do not understand the source of your confusion or uncertainty. I have said all I know how to say about this problem, so am leaving this thread at this point. Keep working at it until you get it.

Chestermiller
Mentor
See this reference: http://wwwhome.math.utwente.nl/~antoniosa/teach/pde11/half_line_dirichlet.pdf

g(x) is already an odd function of x, so you don't have to do anything special with it. But f(x) is an even function of x, so you have to handle it differently when writing down the solution in the region between x = 0 and x = ct. There are going to be two regions of behavior for the solution: 0<x<ct and x > ct. The reference I gave provides the recipe.

Chet

See this reference: http://wwwhome.math.utwente.nl/~antoniosa/teach/pde11/half_line_dirichlet.pdf

g(x) is already an odd function of x, so you don't have to do anything special with it. But f(x) is an even function of x, so you have to handle it differently when writing down the solution in the region between x = 0 and x = ct. There are going to be two regions of behavior for the solution: 0<x<ct and x > ct. The reference I gave provides the recipe.

Chet
Okay what I did matches the steps they did in the document to satisfy boundary condition but here I have f(x) = ## \ e{-(x)^2} \ ## so can I define it like

w(x) = \begin{cases}
\ e^{-(x)^2} & \text{if } x \geq 0 \\
\ -e^{-(-x)^2} & \text{if } x < 0 \end{cases}

Chestermiller
Mentor
Okay what I did matches the steps they did in the document to satisfy boundary condition but here I have f(x) = ## \ e{-(x)^2} \ ## so can I define it like

w(x) = \begin{cases}
\ e^{-(x)^2} & \text{if } x \geq 0 \\
\ -e^{-(-x)^2} & \text{if } x < 0 \end{cases}
Yes, if w(x) is the odd representation of f(x). Also note that ##e^{-(-x)^2}=e^{-x^2}##

Chet

Yes, if w(x) is the odd representation of f(x). Also note that ##e^{-(-x)^2}=e^{-x^2}##

Chet
So if I just define values as

w(x) = \begin{cases} \ e^{-x^2} & \text{if} x \geq 0 \\ -e^{-x^2} & \text{if} x < 0 \end{cases}

and p(x) = \begin{cases} \ xe^{-x^2} & \text{if} x \geq 0 \\ -xe^{-x^2} & \text{if} x < 0 \end{cases}

then for this question can I write that the final answer which is the solution of wave is

## \frac {1} {2} \ ## (w(x-ct)+w(x+ct)) + ## \frac {1} {4} \ ## ## \int_{x-ct}^{x+ct} p(x) \ ##

Do I need to do any other workings?

Chestermiller
Mentor
So if I just define values as

w(x) = \begin{cases} \ e^{-x^2} & \text{if} x \geq 0 \\ -e^{-x^2} & \text{if} x < 0 \end{cases}

and p(x) = \begin{cases} \ xe^{-x^2} & \text{if} x \geq 0 \\ -xe^{-x^2} & \text{if} x < 0 \end{cases}

then for this question can I write that the final answer which is the solution of wave is

## \frac {1} {2} \ ## (w(x-ct)+w(x+ct)) + ## \frac {1} {4} \ ## ## \int_{x-ct}^{x+ct} p(x) \ ##

Do I need to do any other workings?
The function p(x) is odd over the entire range from minus infinity to plus infinity. The way you have defined it, p(x) is an even function. Lose the minus sign in the second equation for p(x).

I would like to see your solution spelled out in terms of the exponential, and for the two ranges of interest, 0<x<ct and x > ct just to be certain you understand.

Chet

The function p(x) is odd over the entire range from minus infinity to plus infinity. The way you have defined it, p(x) is an even function. Lose the minus sign in the second equation for p(x).

I would like to see your solution spelled out in terms of the exponential, and for the two ranges of interest, 0<x<ct and x > ct just to be certain you understand.

Chet
for x > ct

it will be ## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {4} \ ## ## \int_{x-2t}^{x+2t} \ ## ## \ xe^{-x^2} \ ##

for 0<x<ct it will be

## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {4} \ ## ## \int_{2t-x}^{x+2t} \ ## ## \ xe^{-x^2} \ ##

are they correct?

Chestermiller
Mentor
for x > ct

it will be ## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {4} \ ## ## \int_{x-2t}^{x+2t} \ ## ## \ xe^{-x^2} \ ##

for 0<x<ct it will be

## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {4} \ ## ## \int_{2t-x}^{x+2t} \ ## ## \ xe^{-x^2} \ ##

are they correct?
I think so, but let's see those second terms integrated out.

Chet

I think so, but let's see those second terms integrated out.

Chet
then it becomes ## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## ## \int_{x-2t}^{x+2t} \ ## ## \ -e^{-x^2} \ ##
and ## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## ## \int_{2t-x}^{x+2t} \ ## ## \ -e^{-x^2} \ ##

so after applying limits I get

## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## (## \ -e^{-(x+2t)^2} \ ## +## \ e^{-(x-2t)^2} \ ##)

## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## (## \ -e^{-(x+2t)^2} \ ## +## \ e^{-(2t-x)^2} \ ##)

are they correct? But as my final answer for wave solution do I write these two equations after integration or do I just write like this

So if I just define values as

w(x) = \begin{cases} \ e^{-x^2} & \text{if} x \geq 0 \\ -e^{-x^2} & \text{if} x < 0 \end{cases}

and p(x) = \begin{cases} \ xe^{-x^2} & \text{if} x \geq 0 \\ xe^{-x^2} & \text{if} x < 0 \end{cases}

then for this question can I write that the final answer which is the solution of wave is

## \frac {1} {2} \ ## (w(x-ct)+w(x+ct)) + ## \frac {1} {4} \ ## ## \int_{x-ct}^{x+ct} p(x) \ ##

Chestermiller
Mentor
then it becomes ## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## ## \int_{x-2t}^{x+2t} \ ## ## \ -e^{-x^2} \ ##
and ## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## ## \int_{2t-x}^{x+2t} \ ## ## \ -e^{-x^2} \ ##

so after applying limits I get

## \frac {1} {2} \ ## ## \ (e^{-(x-2t)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## (## \ -e^{-(x+2t)^2} \ ## +## \ e^{-(x-2t)^2} \ ##)

## \frac {1} {2} \ ## ## \ (-e^{-(2t-x)^2}+e^{-(x+2t)^2}) \ ##+ ## \frac {1} {8} \ ## (## \ -e^{-(x+2t)^2} \ ## +## \ e^{-(2t-x)^2} \ ##)

are they correct? But as my final answer for wave solution do I write these two equations after integration or do I just write like this
Well, I would express it in terms of the e's. Otherwise, what's the use of doing the problem.

Chet

Well, I would express it in terms of the e's. Otherwise, what's the use of doing the problem.

Chet
Alright. So to satisfy initial conditions of this question do I have to apply them to both of these equations or just to 0 <x<ct

Chestermiller
Mentor
Alright. So to satisfy initial conditions of this question do I have to apply them to both of these equations or just to 0 <x<ct
Huh?

Huh?
I mean how do I check that these wave solutions match the initial conditions. Don't we always have to check that the initial conditions are satisfied in the wave solution?