I have this function $$h(x)=\begin{cases}1 & \text{if } x \geq 0 \\ 0 & \text{if } x < 0 \end{cases}$$ and I was wondering if I apply this function to itself $h \circ h$, can I just say the resulting function would be $h$? Seeing as they are both dependent on passing the same 'if' statement. If not, could you please help steer me in the right path? Thanks.
Result of applying an 'if' dependant function on itself?
0
$\begingroup$
functions
discrete-mathematics
relations
1 Answers
2
$$ h(h(x)) = \begin{cases} 1 & \text{ if } h(x) \geq 0\\ 0 & \text{ if } h(x) < 0 \end{cases} $$ But $h(x)$ is never negative. Thus the second case does not occur, which means $h(h(x))=1$ for all $x$.
-
0Aww ok I get it now! That's a lot simpler than I thought I was trying to join the functions without even thinking about that you will always get a positive number from the first one! Thanks, silly mistake! – 2017-01-19