If $f: [0,1] \rightarrow \mathbb{R}$, $f(x) = \sin x$
If $g: [1/2, 2] \rightarrow \mathbb{R}$, $g(x) = \cos x$
Is $h(x)= f(x) + g(x)$ a valid function directly
or
we need to specify $h:[1/2,1] \rightarrow \mathbb{R}$ and then say $h(x) = f(x) + g(x)$
I wish to know is it automatic or needs clarification?