# Solving partial differential equations

Hi, why does the sign function need to be used in the following?

---
The given equation is y_tt = 4 y_xx
0 < x < pi, t>0
where y_tt is the 2nd derivative with respect to t, y_xx is 2nd wrt x

Boundary conditions
y(0,t) = 0 and y(pi,t) = 0

And initial conditions
y_t (x,0) = 0 = g(x)
y(x,0) = sin^2 x = f(x)

---
General solution (d'Alembert's solution):
y(x,t) = 1/2[F(x+at) - F(x-at)] + int[G(s)ds] from x-at to x+at

My teacher wrote that F(x) is the odd periodic extension of f(x), and then wrote

F(x) = sign(sinx)sin^2 x
Why?

Hi, why does the sign function need to be used in the following?

---
The given equation is y_tt = 4 y_xx
0 < x < pi, t>0
where y_tt is the 2nd derivative with respect to t, y_xx is 2nd wrt x

Boundary conditions
y(0,t) = 0 and y(pi,t) = 0

And initial conditions
y_t (x,0) = 0 = g(x)
y(x,0) = sin^2 x = f(x)

---
General solution (d'Alembert's solution):
y(x,t) = 1/2[F(x+at) - F(x-at)] + int[G(s)ds] from x-at to x+at

My teacher wrote that F(x) is the odd periodic extension of f(x), and then wrote

F(x) = sign(sinx)sin^2 x
Why?

First try to remember what the requirements are in order for a function to be considered odd. Second, ask yourself what the sign function does. See if you can put these two pieces of info together, in conjunction with the fact that F(x) is odd, to figure out your question.

Well, I understand that it makes it odd. Except we had a similar example where y(x,0) = 1/(1+x^2) (which, like sin^2, is even) and the sign function wasn't used. So there must be something else to consider. What is the reason?

y_tt = y_xx
x for all real numbers, t less than or equal to 0
y_t (x,0) = 0

Last edited: