differentiating a complex function $f=z\bar{z}$ w.r.t. $z$ If $z$ is a complex number, what is the derivative $df/dz$, where $f=z\bar{z}$? The straight differentiation gives me $df/dz=\bar{z}+z(d\bar{z}/dz)$. Here, 
$d\bar{z}/dz = \lim_{\Delta z\rightarrow 0} \frac{\overline{z+\Delta z}-\bar{z}}{\Delta z}=\ldots = \lim_{\Delta z\rightarrow 0} \frac{\overline{\Delta z}}{\Delta z}$
If I take $\Delta z$ as real, then this last limit is one and $df/dz=z + \bar{z} = 2\,{\rm Re}(z)$. If I take $\Delta z$ as imaginary, this limit is -1 and then $df/dz = \bar{z}-z=-2\,{\rm Im}(z)$. It looks as if the function $f$ is not differentiable, am I correct?
Just to show you what I need. I have a function $F=\int_V \left[A\phi^2({\bf r}) d{\bf r}+\ldots\right]\,dV$ that I need to transform into the Fourier space (there are extra terms that don't allow me to stay in real space). By the Parseval's identity, the function above is $F=\int_\Omega \left[A|\tilde\phi({\bf k})|^2+\ldots\right]\, d{\bf k}$. Now, I need to differentiate the integrand w.r.t. $\tilde\phi({\bf k})$ which leads to the problem above. Is there any trick that would help here or I am wrong completely? 
 A: From the context you have given in comments, it is clear that you need to treat $z$ and $\bar z$ as independent variables, i.e.
$$
\frac{\partial}{\partial z}(z\bar z) = \bar z ~,~ \frac{\partial}{\partial \bar z}(z\bar z) = z
$$
As has already been pointed out, $df/dz$ only makes sense for holomorphic $f$.
In general, when you are looking for stationary points of action functionals, you need to vary with respect to $\phi$ and $\bar \phi$ independently -- this is equivalent to varying the real and imaginary parts of $\phi$ independently.
A: This function is not complex-differentiable for any $z\in \mathbb{C}$. By the open mapping theorem, an analytic function which is nonconstant sends open sets to open sets. The image of $f(z) = |z|^2$ is always real, and no subset $S\subset \mathbb{C}$ composed entirely of real numbers can be open. Since $f$ is not constant, it cannot be analytic in any open set. 
A: You need to look at the Cauchy-Riemann equations.  These will tell you that the conjugacy map $z\mapsto{\overline z}$ and even the square of the absolute value map $z\mapsto |z|^2$ are not analytic.
A: As was pointed out, this function is nowhere analytic. However, is it differentiable at $0$ and this is the only point where it is so. It's one of those strange-case functions that's differentiable at isolated points.
