Vector and scalar potentials of plane wave Consider a simplest 3D solution of Maxwell's equations:
$$\vec B=\vec e_z \cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$
$$\vec E=\vec e_y\cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$
and propagation is in direction of $\vec e_x$.
I'd like to find some vector potential $\vec A$ and scalar potential $\phi$ for such wave. I've tried using known expression for static uniform magnetic field: $\vec A=\vec e_y B x$, which satisfies $\vec B=\nabla\times \vec A$ and multiplying it by the cosine factor:
$$\vec A=\vec e_y B x\cos\left(\frac{2\pi}{\lambda}(ct-x)\right),$$
but despite it does satisfy $\vec B=\nabla\times \vec A$, it appears that I can't have correct result for $\vec E=-\nabla\phi-\frac{\partial\vec A}{\partial t}$ (at least if I use $\phi=\mathrm{const}$). Using another expression for static part of $\vec A$, $\vec A=\frac{B}2\left(\vec e_y x-\vec e_x y\right)$, gave even worse result. Seems either I use wrong expression for $\vec A$, or I have to add non-const $\phi$.
What would be the correct way of determining the potentials?
 A: There are actually an infinite number of possible answers. The E- and B-field do not uniquely specify the potentials - you have gauge freedom. That is, you can specify some $\vec{A}$, $\phi$, which will give you $\vec{E}$ and $\vec{B}$, but you could equally add the gradient of any scalar function to $\vec{A}$ and subtract the time derivative of the same scalar function from $\phi$ and you would get the same result.
So you need to specify what gauge you are working in. Typically for a plane electromagnetic wave you would choose $\phi=0$ and then all you need to do is 
$$ \vec{A} = -\int \vec{E}\ dt = -\vec{e}_y\frac{\lambda}{2\pi c}\sin\left(\frac{2\pi}{\lambda}(ct-x)\right) + \vec{A}_0(\vec{r}), $$
where $\vec{A}_0$ is some time-independent vector field with a zero curl (see below).
If you take the curl of this A-field you get
$$\nabla \times \vec{A} = \vec{e}_k \frac{1}{c} \cos\left( \frac{2\pi}{\lambda}(ct-x)\right) + \nabla \times \vec{A}_0$$
This is (or should be) your magnetic field, providing that $\vec{A}_0$ is curl-free (or zero for convenience). I say should be, because judging from your expression for the E-field in terms of the potentials, you are using SI units. In which case the amplitude of the B-field should be $c$ times less than the E-field amplitude.
