# Graphing solutions to PDEs at various times

## Homework Statement

Graph snapshots of the solution in the x-u plane for various times t if

\begin{align*}
f(x) =
\begin{cases}
& 3, \text{if } -4 \leq x \leq 0 \\
& 2, \text{if } 4 \leq x \leq 8 \\
& 0, \text{otherwise}
\end{cases}
\end{align*}

## Homework Equations

Assuming that c=1 and g(x) = 0, D'Alembert's solution for this question is $$f(x) = \frac{1}{2} \left(f(x+ct) - f(x-ct)\right)$$

## The Attempt at a Solution

I'm struggling with this problem in its entirety. I don't understand how to graph the solution and why it's a rectangular box that is basically reversal of what seems to make sense when plugging in various values for x based off of the equation's characteristics. Conceptually, I realize that it is an infinite string and there's shifting of two waves that will overlap for some points. What I don't understand is how to go about drawing these graphs by hand. I confirmed with a classmate that the 'endpoints' for t are t = 2, t = 4, t = 4, and t = 6, based on the fact that t = distance/velocity.

Please explain this to me like I'm 5. I tried Googling the concept to death and came short, and my professor and the textbook aren't particularly helpful. Any guidance would be very much appreciated.

LCKurtz
Homework Helper
Gold Member

## Homework Statement

Graph snapshots of the solution in the x-u plane for various times t if

\begin{align*}
f(x) =
\begin{cases}
& 3, \text{if } -4 \leq x \leq 0 \\
& 2, \text{if } 4 \leq x \leq 8 \\
& 0, \text{otherwise}
\end{cases}
\end{align*}

## Homework Equations

Assuming that c=1 and g(x) = 0, D'Alembert's solution for this question is $$f(x) = \frac{1}{2} \left(f(x+ct) - f(x-ct)\right)$$

That would be ##u(x,t)= \frac{1}{2} \left(f(x+ct) + f(x-ct)\right)##. Don't call the solution ##f(x)## and note the two terms are added, not subtracted.

## The Attempt at a Solution

I'm struggling with this problem in its entirety. I don't understand how to graph the solution and why it's a rectangular box that is basically reversal of what seems to make sense when plugging in various values for x based off of the equation's characteristics. Conceptually, I realize that it is an infinite string and there's shifting of two waves that will overlap for some points. What I don't understand is how to go about drawing these graphs by hand. I confirmed with a classmate that the 'endpoints' for t are t = 2, t = 4, t = 4, and t = 6, based on the fact that t = distance/velocity.

Please explain this to me like I'm 5. I tried Googling the concept to death and came short, and my professor and the textbook aren't particularly helpful. Any guidance would be very much appreciated.

So ##c=1## and your equation is $$u(x,t)= \frac{1}{2} \left(f(x+t) + f(x-t)\right)= \frac{1}{2} f(x+t) + \frac 1 2 f(x-t)$$.
When ##t=0## you have ##u(x,0) = \frac{1}{2} f(x) + \frac 1 2 f(x)=f(x)##. I presume you can draw that, right? Now say you want a picture when ##t=1## so you want to draw ##u(x,1) = \frac{1}{2} f(x+1) + \frac 1 2 f(x-1)##. So start with a graph of ##\frac 1 2 f(x)## drawn very lightly. Then draw on the same picture, maybe with two colored pencils, one copy of your light graph translated left one unit and one translated right one unit. Now you can erase the light graph, and with a dark pencil add the ordinates visually of your two translated functions. This dark graph is ##u(x,1)##. The two waves have moved one unit. Now do it with ##t=2## and other values of ##t##. The graph of ##u(x,t)## gets more interesting when the waves overlap and add. You will want to do enough values of ##t## to see what happens once the waves get past overlapping.

sxal96
That would be ##u(x,t)= \frac{1}{2} \left(f(x+ct) + f(x-ct)\right)##. Don't call the solution ##f(x)## and note the two terms are added, not subtracted.

So ##c=1## and your equation is $$u(x,t)= \frac{1}{2} \left(f(x+t) + f(x-t)\right)= \frac{1}{2} f(x+t) + \frac 1 2 f(x-t)$$.
When ##t=0## you have ##u(x,0) = \frac{1}{2} f(x) + \frac 1 2 f(x)=f(x)##. I presume you can draw that, right? Now say you want a picture when ##t=1## so you want to draw ##u(x,1) = \frac{1}{2} f(x+1) + \frac 1 2 f(x-1)##. So start with a graph of ##\frac 1 2 f(x)## drawn very lightly. Then draw on the same picture, maybe with two colored pencils, one copy of your light graph translated left one unit and one translated right one unit. Now you can erase the light graph, and with a dark pencil add the ordinates visually of your two translated functions. This dark graph is ##u(x,1)##. The two waves have moved one unit. Now do it with ##t=2## and other values of ##t##. The graph of ##u(x,t)## gets more interesting when the waves overlap and add. You will want to do enough values of ##t## to see what happens once the waves get past overlapping.
Thanks for your response. So, if I wanted to have a graph represent ##0 \leq x \leq 2##, would I essentially combine the translated graphs for ## t = 0, t = 1,## and ## t = 2##? Or would there be an emerging trend/'pattern' between values for ##t## that I would graph?

LCKurtz