Rewrite a function of $x+iy$ in terms of $z$ only How can you rewrite a function like
$$f(x+iy)=e^{2xy}\cos(x^2-y^2)-i\left[e^{2xy}\sin(x^2-y^2)+C\right]$$
in terms of just $z$? Are there any tricks that you can use or is it just the fact that you need to recognize the functions when you see them?

Suppose we have an expression for $f$ in terms of $z$. If we restrict $z$ to be real, then we are effectively replacing the complex variable $z$ by the expression $x + 0i$ where $x$ is a real variable. What we end up with  is an expression for $f$ along the real line in terms of $x$. What is miraculous is that we can reverse this process. That is, if we know an expression for $f$ when restricted to the real line in terms of the real variable $x$, we can recover an expression for $f$ on the complex plane in terms of the complex variable $z$. This follows from the Identity Theorem.
For example, given $f(x + iy) = e^{2xy}\cos(x^2-y^2) - i[e^{2xy}\sin(x^2-y^2) + C]$, when we restrict to the real axis (i.e. set $y = 0$), we obtain $f(x) = \cos(x^2)-i\sin(x^2) - iC = e^{-ix^2} -iC$. How do we get an expression for $f(z)$? Replace $x$ by $z$. That is, once we know that $f$ restricted to the real line is given by $f(x) = e^{-ix^2} - iC$ we know that $f(z) = e^{-iz^2} - iC$ for all $z \in \mathbb{C}$.

As Rob Arthan points out below, in order to use the method above, you need to know in advance that $f$ is holomorphic (that is, the expression you are trying to obtain is in terms of $z$ only rather than $z$ and $\bar{z}$); you can check this by verifying the Cauchy-Riemann equations. The reason you need to know that $f$ is holomorphic in advance is the use of the Identity Theorem.
