PDE involving curl I need to solve the equation:
$$\operatorname{curl} \left(\operatorname{curl}(\mathbf{u}(x,y,z)) \right)=\mathbf{v}(x,y,z)$$ 
Because $$\operatorname{curl}(\operatorname{curl}(\mathbf{f}))=-\nabla^2 \mathbf{f}+\nabla(\nabla \cdot \mathbf{f})$$ the previous equation is equivalent to:
$$-\nabla^2 \mathbf{u}(x,y,z)+\nabla(\nabla \cdot \mathbf{u}(x,y,z))=\mathbf{v}(x,y,z)$$
Given $\mathbf{v}(x,y,z)$ how can I solve this PDE in $\mathbf{u}(x,y,z)$?
Thanks in advance.
 A: In general you can't.  Assuming your vector fields are to be defined on all of ${\mathbb R}^3$, the criterion for $\nabla \times {\bf w}) = {\bf v}$ to be solvable is $\nabla \cdot {\bf v} = 0$.
If that is satisfied, $\bf w$ is called a vector potential for $\bf v$.  Now if there is
a vector potential for $\bf v$ there are lots of them, because you can add the gradient of any function.  In this case,  you want $\bf w$ to have a vector potential $\bf u$, so you
want to use the "Coulomb gauge condition" $\nabla \cdot {\bf w} = 0$.  Then let $\bf u$ be any vector potential for $\bf w$. 
One way to find a vector potential $\bf w$ for $\bf v$ satisfying the Coulomb gauge is to start with a vector potential satisfying an easier gauge condition, e.g. $w_1 = 0$.  This can be found by integrating: $v_2 = - \frac{\partial}{\partial x} w_3$ so
$w_3 = - \int  v_2 \ dx + g(y,z)$, 
 $v_3 = \frac{\partial}{\partial x} w_2$ so $w_2 = \int v_3\ dx + h(y,z)$, and choose
$g$ and $h$ so $v_1 = \frac{\partial w_3}{\partial y} - \frac{\partial w_2}{\partial z} = 0$.  If the divergence of this $\bf w$ is $\psi(x,y,z)$, you now want to replace $\bf w$ by $\bf w + \nabla \phi$ where $\nabla^2 \phi = -\psi$: thus you solve a Poisson equation for $\phi$.
A: Split your second order equation into the system
$$
   {\rm curl\,}\mathbf{u}=\mathbf{w}, \qquad {\rm curl\,}\mathbf{w}=\mathbf{v}.
$$
Since your $\mathbf{v}$ must have divergence 0, you can use Biot-Savart to
find a value of
$$\mathbf{w}(\mathbf{r})
 =\int_{R^3}\mathbf{v}(\mathbf{r'})\times\frac{\mathbf{r-r'}}{4\pi|\mathbf{r-r'}|^3}d\mathbf{r'}$$
which also has divergence 0, assuming the integral converges. This solves
the second equation.
You might repeat that for $\mathbf{u}$ if the integrals converge, but since
you don't need $\mathbf{u}$ to have divergence 0, it suffices to
use a version of the Poincare lemma which says that
$$
 \mathbf{w}(\mathbf{r})={\rm curl\,}\left(
        \int_0^1\mathbf{w}(t\mathbf{r})\times t\mathbf{r}\,dt
                          \right)
      +\int_0^1 t^2\mathbf{r}\,{\rm div\,}\mathbf{w}(t\mathbf{r})\,dt
$$
where I'm writing $t\mathbf{r}=(tx,ty,tz)$.
Since our $\mathbf{w}$ has divergence 0, you can set
$\mathbf{u}(\mathbf{r}) =\int_0^1\mathbf{w}(t\mathbf{r})\times t\mathbf{r}\,dt$ which gives
the first equation
$\mathbf{w}={\rm curl\,}\mathbf{u}.$ I think that does it if I didn't mess up.
