I have $f(x,t) = 0$ when $t \le 0$ and $f(x,t) = \sin(-x + t)$ when $t > 0$.
I have been told this can be written more concisely in terms of the heavisdie function $u(t - a)$ as
$f(x,t) = \sin(-x + t)u(-x +t)$
I don't see how this is equivalent to the original statement for $f$? Whenever I have used the heaviside function before it has been with 1 dimensions, $t$, not $t$ and $x$ as we have here, so it is strange seeing it being used with a variable $x$ rather than a constant $a$.
Can someone explain to me how the two versions of $f(x,t)$ above are the same?
** EDIT **
My question was a simplified version of the actual equation I was dealing with. Here is the actual equation and it's representation using the heaviside function. So can someone explain how these two $W(x,t)'s$ are the same?

Something is wrong. $$\sin(-x+t)u(-x+t)=\begin{cases}0&\text{if $t\le x$}\\\sin(-x+t)&\text{if $t>x$}\end{cases} $$ For your given function, you'd need someting like $f(x,t)=\sin(-x+t)u(t)$ and be careful what happens at $t=0$ (there are different specifications of $u$ in the wild, sometimes $u(0)=\frac12$, sometimes $u(0)=1$, ...)