Real-valued functions on complex numbers

Suppose $f$ is a real-valued function of a complex variable that is differentiable at every $z \in \mathbb{C}$. Show that $f'(z)=0$ for all $z \in \mathbb{C}.$

My approach: Since $f$ is a real-valued function of a complex variable that is differentiable at all $z \in \mathbb{C}$, we can write that: $$f'(z)=\lim_{\lambda\to0} \frac{f(z+\lambda)-f(z)}{\lambda}= L$$ for some real function $L$.

If this is true, then $f(z+\lambda) - f(z) = \lambda L + g(\lambda)$ such that $\lim_{\lambda\to0} \frac{g(\lambda)}{\lambda}=0$, where $g(\lambda)$ is a real valued function. However, if L is real, that implies $\lambda L$ is complex and arises from the subtraction of two real-valued functions. Since this is not possible, $\lambda L$ has to be real, which implies $L = 0$ or $L=c\bar{\lambda}$, where $c$ is some constant. But since L is real, L cannot be $\bar{\lambda}$. Hence, L has to be zero. This implies $f'(z) = 0$.

Is this proof correct? If not, how should I correct it?

• In your first paragraph you say that $f$ is differentiable, but in your second you assume that the derivative is constant. Which one is it? – Martin Argerami Feb 2 '18 at 3:40
• That is true. Can I assume that the derivative is a real function? – Sat D Feb 2 '18 at 3:42
• I have posted an answer. – Martin Argerami Feb 2 '18 at 3:54

The problem with your argument is that you have no control over $g$. Also, "complex" does not preclude "real".
Fix $z$. Since $f'(z) =L$ exists, we may approach along any line. So $$L=\lim_{t\to0}\frac {f (z+t)-f (z)}{t}\in\mathbb R.$$ Also, $$L=\lim_{t\to0}\frac {f (z+it)-f (z)}{it}\in i\mathbb R.$$ So $L$ is both real and imaginary: $L=0$.
As $z$ was arbitrary, $f'(z)=0$ for all $z$.
• Should that be $f(z+it)$ in the second numerator? – G Tony Jacobs Feb 2 '18 at 3:58