My textbook has the following problem:

They apparently mean in $\displaystyle \mathbb{R}^2$. Recall that a "weak solution" (in this case) is a solution $\displaystyle u$ which satisfiesShow that for a continuous function $\displaystyle f$ the expression $\displaystyle u=f(x-ct)$ is a weak solution of the partial differential equation

$\displaystyle u_t+cu_x=0.$

[Hint: Transform for $\displaystyle \phi\in C_0^1(\mathbb{R}^2)$ the integral

$\displaystyle \int\int(\phi_t+c\phi_x)u\;dx\;dt$

to the coordinates $\displaystyle y_1=x-ct,y_2=x$. Use $\displaystyle \phi=\psi(y_1)X(y_2)$.]

(1) $\displaystyle 0=\int\int(\phi_t+c\phi_x)u\;dx\;dt$

for every test function $\displaystyle \phi\in C^1_0(\mathbb{R}^2)$, i.e. for every continuously differentiable function with compact support in $\displaystyle \mathbb{R}^2$. However it is (supposedly) sufficient to show that (1) holds for all $\displaystyle \phi\in C^\infty_0(\mathbb{R}^2)$, i.e. all smooth functions with compact support in $\displaystyle \mathbb{R}^2$.

My question is this: Why can we assume that a smooth (or continuously differentiable) function of two variables $\displaystyle \phi:\mathbb{R}^2\to\mathbb{R}^2$ can be written as the product of functions of a single variable $\displaystyle \phi(y_1,y_2)=\psi(y_1)X(y_2)$ ? Or am I missing something here ?

Thanks !