= Solution
Differentiate the prescribed imaginary part with respect to $y$:
$$
v_y=e^x[(1+x)\cos y-y\sin y].
$$
The <Cauchy-Riemann equation> $u_x=v_y$ integrates to
$$
u=e^x(x\cos y-y\sin y)+F(y).
$$
Its $y$ derivative is $u_y=-e^x[(x+1)\sin y+y\cos y]+F'(y)$. On the other hand, $-v_x=-e^x[(x+1)\sin y+y\cos y]$. The second <Cauchy-Riemann equation> therefore requires $F'(y)=0$. Combining the real and imaginary parts,
$$
e^x[(x\cos y-y\sin y)+i(y\cos y+x\sin y)]=(x+iy)e^{x+iy}.
$$
Thus the most general answer on a connected domain is
$$
\boxed{f(z)=ze^z+C,\qquad C\in\mathbb R.}
$$
A real constant preserves the given imaginary part. Conversely, the difference of any two such <analytic functions> has zero imaginary part, and its Cauchy-Riemann derivatives force it to be constant. This proves completeness, rather than only exhibiting one possible <harmonic conjugate>.
Back to article page