(counting $\sin x$ as a variation of $\cos x$).
They are self-similar in that their derivative is also a function of themselves. Crucially, this sort of feedback means that higher derivatives are also similar, resulting in curves that are smooth in what seems to me to be a unique way. For the examples in the title:
$f'(x) = f(x)$ is true for $f(x)=e^x$
$f'(x) = f(x+\pi/2)$ is true for $f(x)=\cos x$
EDIT: That's for the two functions given in the title. The question is: are there any other functions that are similar to their derivative in some other way? Just one example is enough (the "duplicate" doesn't address this).
BTW It seems to me that these are the only solutions to these differential equations, and e.g. a different offset for the second one just changes the period of the $\cos$ function. But I don't see how to show this - or even how to think about it.
BTW this was inspired by Euler's equation, relating $\cos, \sin,$ and $e$. I think the fundamental connection is that they all are self-similar, and the rest is clever bit-twiddling (like how integers alternate even/odd, and $f(x) = (-1)^x$ alternates positive/negative).