Vector Field, so that Divergence is a specified constant To find is vector field $\vec{w}(\vec{x})$ so that the divergence results in a specified constant $C$. 
I set up the folling the equation: 
$$ \frac{\partial x_1}{\partial x_1} + \frac{\partial x_2}{\partial x_2} + \frac{\partial x_3}{\partial x_3} = C$$
I thought that is a partial differential equation way too intricated to be solved reasonably. 
Is there another,  simpler was to find $\vec{w}$ ? 
 A: A vector field of the form
$$
{\bf w}({\bf x}) = \frac{c}{3} {\bf x} + \nabla\times{\bf F}
$$
has constant divergence
$$
\nabla \cdot {\bf w} = \frac{c}{3}\nabla \cdot {\bf x} + \nabla \cdot (\nabla \times {\bf F}) = c
$$
${\bf F}$ is an arbitrary $C^1$ field
A: A suitable vector field can be found, with a bit of work, via the exterior differential calculus. Given a vector field $\vec w = (w_x,w_y,w_z)$, we can form the 2-form $$\tau = w_x\,dy\wedge dz+w_y\,dz\wedge dx+w_z\,dx\wedge dy.$$ This form has the convenient property that $d\tau = (\operatorname{div}{\vec w})\,dx\wedge dy\wedge dz$. So, let $\omega = C\,dx\wedge dy\wedge dz$. We can find a two-form $\tau$ such that $\omega = d\tau$ via the following steps: 


*

*Make the substitutions $dx\to t\,dx+x\,dt$, $dy\to t\,dy+y\,dt$, $dz\to t\,dz+z\,dt$.

*Rearrange the terms so that $dt$ is on the left of each one and discard any terms that don’t involve $t$.

*Drop the $dt$’s from the resulting form and integrate it with respect to $t$ from $0$ to $1$ as if it were an ordinary integrand.  


(See this answer for a more detailed explanation of this method of finding the antiderivative of a differential form.)
Applying this to $\omega$ we get $$\int_0^1 Ct^2(x\,dy\wedge dz+y\,dz\wedge dx+z\,dx\wedge dy)\,dt = \frac C3(x\,dy\wedge dz+y\,dz\wedge dx+z\,dx\wedge dy).$$ This 2-form corresponds to the vector field $\vec w = \frac C3(x,y,z)$. There are other possibilities for $\vec w$, but they all differ from this field by a “constant of integration,” i.e., some vector field $\vec v$ such that $\nabla\cdot\vec v=0$.
A: What about the vector fields
$$f(x,y,z)=(kx,a,b)\,,\;\,g(x,y,z)=(a,ky,b)\,,\,\,h(x,y,z)=(a,b,kz)$$
for any constants $\;a,b\in\Bbb R\ ?$
Or even
$$r(x,y,z)=\left(\frac12kx,\,\frac12ky,a\right)\;\ldots\text{etc.}\;?$$
A: $$f(x,y,z)=\frac {<cx,cy,cz>}{3}$$ serves as a simple example.
