Is it true that $f(z)=u(z,0)+iv(z,0)$ for complex $z$ and why? As in the title, i came across this equivalence
$$f(z)=f(x+iy)=u(x,y)+iv(x,y)=u(z,0)+iv(z,0)$$ while reading my notes on complex analysis, and tried to see why is it true, but i couldn't figure it out. Maybe it could be true only in the case that f is holomorphic. 
 A: As pointed out by many, as written this doesn't make much sense (unless $z$ is real, in which case it's trivial). However, I think what is trying to be communicated is a certain calculational trick.
Let's start with the example $f(z) = e^z$. Then $u(x,y) = e^x \cos (y)$ and $v(x,y) = e^x \sin (y)$, so if we now redefine $u,v$ using these same formulae as functions of two complex variables, we see
$$ u(z,0) + i v(z,0) = e^z \cos(0) + i e^z \sin(0) = f(z).$$
In general, for any analytic function
$$f(z) = \sum_{n=0}^\infty (a_n + i b_n) z^n,$$ 
with $a_n,b_n$ real, for real $z$ we have
$$ u(z,0) = \sum_n a_n z^n \; \text{ and } \; v(z,0) = \sum_n b_n z^n.$$
Reinterpreting these now as complex analytic functions (i.e. defining $\tilde u : \mathbb C \to \mathbb C : z \mapsto \sum_n a_n z^n$ and likewise $\tilde v$) we have $$f(z) = \tilde u (z) + i \tilde v(z).$$
Thus we get the trick: if you can write down $u(x,0)$ and $v(x,0)$ as some formulae in terms of elementary analytic functions, replacing $x$ with $z$ in $u(x,0) + i v(x,0)$ will give you the correct formula for $f(z)$ on the whole plane.
A: If $z\mapsto f(z)=u(x,y)+i v(x,y)$ is analytic in a disc $D_\rho:=\bigl\{z\>\bigm|\>|z|<\rho\bigr\}$  then so is the function $$\check f(z):=\overline{f(\bar z)}\ .$$
It follows that the functions
$$U(z):={f(z)+\check f(z)\over2},\qquad V(z):={f(z)-\check f(z)\over 2i}$$ are analytic in $D_\rho$ as well, and $$f(z)=U(z)+i V(z)\ .$$ 
On the other hand, when $z=x\in D_\rho\cap{\mathbb R}\>$ one has
$$U(x)={f(x)+\overline {f(x)}\over 2}=u(x,0),\qquad V(x)={f(x)-\overline {f(x)}\over 2i}=v(x,0)\ .$$
This shows that the functions $x\mapsto u(x,0)$ and $x\mapsto v(x,0)$ each have a natural  extension from the $x$-axis to the complex $z$-plane, and these extensions are analytic functions of $z\in D_\rho$. In this way the "strange" functions $z\mapsto u(z,0)$ and $z\mapsto v(z,0)$ appearing in the question have an easy explanation: The $u(z,0)$ from the question is my $U(z)$, and similarly for $v(z,0)=V(z)$.
A: For any function $f\colon \mathbb{C} \to \mathbb{C}$, there exists two unique functions $u, v\colon \mathbb{R}^2 \to \mathbb{R}$ satisfying:
$$f(z) = f(x + iy) = u(x, y) + iv(x, y)$$
They are defined simply by:
$$u(x, y) = \text{Re}(f(x + iy))$$
$$v(x, y) = \text{Im}(f(x + iy))$$
This is valid because each complex number $z$ has a unique expression of the form $x + iy$, with $x$ and $y$ real numbers. The last identity on your question is true if and only if $z$ lies on the real axis. Then, $z$ is a real number and thus it's value at $u(z, 0)$ and $v(z, 0)$ is well defined.
A: It suffices to check when $f(z) = z^n$. Observe
\begin{align}
(x+iy)^n =& \sum^n_{k=1} \binom{n}{k}x^{n-k}(iy)^k = \sum_{k \text{ even}}\binom{n}{k}x^{n-k}(iy)^k + \sum_{k\text{ odd}}\binom{n}{k}x^{n-k}(iy)^k \\
=&\ \sum \binom{n}{2\ell}(-1)^\ell x^{n-2\ell}y^{2\ell} + i\sum \binom{n}{2\ell+1}(-1)^\ell x^{n-2\ell-1}y^{2\ell+1} \\ 
=&\ u(x, y) + iv(x, y)
\end{align} 
and observe 
\begin{align}
u(z, 0) + iv(z, 0) = z^n. 
\end{align}
Thus, when $f(z) = z^n$, we have $f(z) = u(z, 0) + iv(z, 0)$. 
In the case when $f$ is not analytic the claim is false. For instance, 
\begin{align}
f(z) = \bar z  = x-iy  \ \ \text{ but } \ \ u(z, 0)+iv(z, 0) = z \neq \bar z. 
\end{align}
A: You need to know what your functions $V,U$ are allowed to be.If   $U,V \colon \mathbb{R}^2 \to \mathbb{R}$ then the only option $z$ is  $z \in  \mathbb{R}$   and your statement is true.You cant pick a different $z$ when your functions are not  defined accordingly.
