# Wave equation problem

Tags:
1. Dec 16, 2014

### JI567

1. The problem statement, all variables and given/known data
So it says solve this wave equation :
[y][/tt] - 4 [y][/xx] = 0
on the domain -infinity<x<infinity

with initial conditions y(x,0) = e^(-x^2), yt(x,0) = x*(e^(-x^2))

2. Relevant equations

I used the D Alembert's solution which is 1/2(f(x+ct)+f(x-ct)) + 1/2c ∫ g(z) dz
3. The attempt at a solution
I just replaced the f in the D'alembert equation by e^(-x^2) and c by 2. To get g(z) I integrated the yt function by substitution method and used x+2t and x-2t as the integral boundaries.

My solution was

y(x,t) = 1/2(e^(-x^2){x+2t}+e^(-x^2){x-2t})+1/2c(-1/2*e^{-(x+2t)^2}+1/2*e^{-(x-2t)^2})

2. Dec 17, 2014

### stevendaryl

Staff Emeritus
Well, you can check your work by plugging $y(x,t)$ into the differential equation $y_{tt} - 4 y_{xx} = 0$ to see if it's a solution.

3. Dec 18, 2014

### JI567

Hi, I have no idea how to do it. Because if I take ytt of the y(x,t) and yxx of the y(x,t) It gets really really complicated. I have to differentiate using the product rule method 2 times for f(x) and one time for g(x). I think that's way too complicated. Can you please tell me where I did wrong in solving the problem? Many thanks

4. Dec 18, 2014

### BvU

Well, another check is to see if your solution satisfies the initial conditions. I don't even understand how it satisfies y(x,0) = e^(-x^2) ?!

5. Dec 18, 2014

### JI567

You mean by putting t as 0 in the y(x,t) equation and see if I am just left with e^(-x^2) ? I just replaced the f of D'alembert equation with f(x) which equals to e^(-x^2). Is that part correct atleast?

6. Dec 18, 2014

### JI567

What if I write it as

7. Dec 18, 2014

### BvU

With c = 2 that would simplify a great deal; perhaps then you can check that it satisfies the initial condition for yt :)
And maybe also that it satisfies the wave equation :) :)

If not, we have to go back and investigate the integration you carried out :(

8. Dec 18, 2014

### JI567

I can do the yt by differentiating the y(x,t) equation once with respect to time then putting t as 0. But for satisfying the wave equation I need to do ytt and yxx that will require complicated product rule differentiation! or is there any simple way?

9. Dec 18, 2014

### BvU

One step at a time. What is the simple y(x,t) and does it satisfy the yt initial condition ?

RE wave equation: Alembert story is that any function of x-ct and any function of x+ct satisfy the equation. But it's still good to check. Not that hard, you can do it.

10. Dec 18, 2014

### JI567

By differentiating y(x,t) = 1/2(e^-(x+2t)^2+e^-(x-2t)^2)+1/2c(-1/2*e^{-(x+2t)^2}+1/2*e^{-(x-2t)^2}) with respect to t once I got

yt = 1/2(-4e^-(x+2t)^2+4e^-(x-2t)^2)+1/4(2e^{-(x+2t)^2}+2*e^{-(x-2t)^2}) and after subbing initial condition t as 0, I end up with e^-(x^2) not x*e^-(x^2)

Can you identify where did I do wrong...

11. Dec 18, 2014

### BvU

Ah,

And there's me naively thinking that with c = 2 that is equal to e^-(x-2t)^2.

Do you mean ½ c or 1/(2c) ?

e^-(x-2t)^2 is no good anyway: yt(x, 0) would be a factor 4 too high. So maybe you do mean 1/(2c) ....

RE post #10: what is the derivative of $e^{x^2}$ ? I think we are getting closer to what's going wrong ! Product rule is one thing, chain rule is another !

12. Dec 18, 2014

### JI567

Yepp! I did wrong differentiation before, now I just corrected and it matches initial condition for yt!! So I am correct now as it also matches initial condition for y!

Is it really necessary to check with wave equation? Satisfying initial conditions should be enough right?!

13. Dec 18, 2014

### BvU

You studying economics or physics ?
Think of the satisfaction when it comes out just fine :)

14. Dec 18, 2014

### JI567

Lol I am studying engineering....I am already satisfied man, differentiating two more times will be hustle....

Anyways
Now, the next question I have is repeat this same equation with same initial condition but now on a semi infinite domain and i have a boundary condition of y(0,t) = 0.

Where do I need to make the change? As far as I know D'Alembert's solution can't be used for semi infinite domain unless the function is odd....I don't know what to do now...

15. Dec 18, 2014

### BvU

I could have guessed. Engineering is halfway between science and economics :)

No hustle: ${d\over dx} e^{x^2} = 2x e^{x^2}$ so ${d^2\over dx^2} e^{x^2} = 4x^2 e^{x^2} + 2 e^{x^2}$

And I would do the check for economical reasons too: good chance there still is some error hidden somewhere and then you've done all this work for no glory (\$, marks, whatever)...

RE next question:
Hehe, now you need your physics intuition: wave equation, boundary condition y(0,t)=0 ... I would say that sounds like reflection of a running wave from a fixed end.
Only: "same initial condition" is contradicting y(0,t) = 0. That really wordly what the exercise says ?

16. Dec 18, 2014

### JI567

You just differentiated ex^2 twice but I have to differentiate the entire wave equation with respect to x twice....gonna be more work....

Yes that's exactly what it says, same initial condition but semi infinite domain so yeah its fixed at one end but what solution do I apply? I mean I know that now we can set a value for x<0 but don't understand how is it going to help with D'alembert solution...

17. Dec 18, 2014

### BvU

Reflection fixed end: wave moving one way + same wave but with negative sign moving the other way: this link (but then one picture down)

I still don't know what to do with y(x,0) = exp(-x2) AND y(0,t) = 0. A Gaussian is positive definite...

18. Dec 19, 2014

### JI567

What's the problem here? To be honest I have no idea why these boundary and initial conditions even matter! Our lecturer was sooo vague in explaining. Can you please explain why are these initail and boundary conditions actually necessary for any wave equation problems?

19. Dec 19, 2014

### BvU

Just like with other differential equations, boundary conditions are needed to pin down a particular solution. The wave equation by itself is satisfied by a general solution u(x,t) = F(x-ct) + G(x+ct) where F and G can be any function. The F propagates to the right, G to the left.

With the original initial conditions y(x,0) and yt(x,0) you found a Gaussian that for 5/8 moves to the right and for 3/8 to the left (the simplification I was aiming for).

A condition y(0,t) = 0 can only be met if F(x-ct) = -G(x+ct) y(0,t) = 0 excludes an initial condition y(0,0) = 1 as in the original problem. In fact, the initial condition y(x,0) = e^(-x^2) is not equal to 0 anywhere !

20. Dec 19, 2014

### JI567

Why does it have to be equal to 0? I thought boundary conditions were applied directly to wave equation not the initial conditions....