# Analytic function on a domain

If $f(z) + \sin(z)$ is an analytic function on a domain D and $f(z) + \cos(z)$ is analytic on D, then $f(z)$ is constant on D. Is this true?

-
let take $f(z)=3$ ,then does both $3+sin(z)$ and $3+cos(z)$ are analytic or continuous? –  dato datuashvili Feb 25 '14 at 13:10
Take a boringly simple example to contradict that: $\;f(z)=z\;$ , on any domain. –  DonAntonio Feb 25 '14 at 13:42

Why would this be true? Since $\cos$ and $\sin$ are both analytic functions, if you take any analytic function $f$, the functions $f+\sin$ and $f+\cos$ will both be analytic.