# Wave equation and odd extension with constant IC

1. Feb 23, 2014

### xdrgnh

Solve U_xx=U_tt with c=1.
Dirchlet boundary conditions
U(x,0)=1 for 5<x<7
U(x,0)=0 for everywhere else
U_t(x,0)=0

I know that by taken an odd extension I can get rid of the boundary condition and then solve the initial value problem using the d'alembert solution and only care for x>0 Graphically I know it will be square wave that break off in opposite directions and has amplitude of 1/2. At the origin the square wave will die while on the other side it will go on forever. What is tripping me up are the constant initial conditions. When I plug them in I get for x>t U(x,t)=1 and for t>x I get 0. This doesn't sound right to me. Any help will be appreciated.

2. Feb 23, 2014

### LCKurtz

Are you sure about it dying at the origin? Won't it reflect back?

I'm not sure what you are saying here. The initial displacement isn't a constant. Have you neglected to tell us about a boundary condition such as $u(0,t)=0$?

3. Feb 23, 2014

### xdrgnh

The initial displacement for at time =0 is 1 between x=5 and x=7. well I'm doing an odd extension so their is wave of equal amplitude but opposite direction on the x=-5 and x=-7 side and when they meet at x=0 they cancel each other keeping the boundary condition U(0,t) zero.

4. Feb 23, 2014

### LCKurtz

That's true as they pass at the origin. But you are imagining an infinite string and that wave from the left keeps going to the right after it passes through the origin.

5. Feb 24, 2014

### xdrgnh

Okay But What About The Initial Condition. They Are Constants Not Function Of X. How Do I Represent Them At A Function Of Time,? Sorry For Caps My Phone Is Weird.

6. Feb 24, 2014

### LCKurtz

$u(x,0) = 1,~5<x<7$ and $0$ elsewhere is not a constant function. For example, it is $1$ when $x=6$ and $0$ when $x=4$. Its value depends on $x$.

7. Feb 24, 2014

### xdrgnh

So A Step Function?

8. Feb 24, 2014

### LCKurtz

No, it isn't a step function. It is a simple function which is a linear combination of step functions. What difference does it make what you call it? Call it $f(x)$ if you want to. I don't understand what your real question is here.

9. Feb 24, 2014

### xdrgnh

So for my solution I can just represent f(x) as a piecewise function and then using the d'alembert get .5f(x+t) in one direction and .5f(x-t) in the other direction?

10. Feb 24, 2014

### LCKurtz

Yes. Or if you have been using the standard unit step function $u(x)$ in your class, you could express your $f(x)$ in terms of it.